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).
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user