summaryrefslogtreecommitdiff
path: root/src/gpu-compute/wavefront.hh
diff options
context:
space:
mode:
authorAlexandru Dutu <alexandru.dutu@amd.com>2016-09-16 12:32:36 -0400
committerAlexandru Dutu <alexandru.dutu@amd.com>2016-09-16 12:32:36 -0400
commitbd65ec07441cbb19fc2d3570da32a0205dad52c2 (patch)
tree16c56549f71ae3d9e221bb96dc9a2d4abd818701 /src/gpu-compute/wavefront.hh
parente9b14d51113def040893d711cc0d5a37cf5235ae (diff)
downloadgem5-bd65ec07441cbb19fc2d3570da32a0205dad52c2.tar.xz
gpu-compute: Adding context serialization methods to Wavefront
This patch adds methods to serialize the context of a particular wavefront to the simulated system memory. Context serialization is used when a wavefront is preempeted (i.e. context switch).
Diffstat (limited to 'src/gpu-compute/wavefront.hh')
-rw-r--r--src/gpu-compute/wavefront.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu-compute/wavefront.hh b/src/gpu-compute/wavefront.hh
index 8caeda91e..ef8c80989 100644
--- a/src/gpu-compute/wavefront.hh
+++ b/src/gpu-compute/wavefront.hh
@@ -354,6 +354,18 @@ class Wavefront : public SimObject
*/
uint32_t getStaticContextSize() const;
+ /**
+ * Returns the hardware context as a stream of bytes
+ * This method is designed for HSAIL execution
+ */
+ void getContext(const void *out);
+
+ /**
+ * Sets the hardware context fromt a stream of bytes
+ * This method is designed for HSAIL execution
+ */
+ void setContext(const void *in);
+
private:
/**
* Stack containing Control Flow Graph nodes (i.e., kernel instructions)