From bd65ec07441cbb19fc2d3570da32a0205dad52c2 Mon Sep 17 00:00:00 2001 From: Alexandru Dutu Date: Fri, 16 Sep 2016 12:32:36 -0400 Subject: 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). --- src/gpu-compute/wavefront.hh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/gpu-compute/wavefront.hh') 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) -- cgit v1.2.3