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:
Alexandru Dutu
2016-09-16 12:32:36 -04:00
parent e9b14d5111
commit bd65ec0744
2 changed files with 137 additions and 0 deletions

View File

@@ -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)