summaryrefslogtreecommitdiff
path: root/libcuda/cuda_api_object.h
diff options
context:
space:
mode:
authortgrogers <[email protected]>2019-07-12 10:30:08 -0400
committertgrogers <[email protected]>2019-07-12 10:30:08 -0400
commit89e913f7b28e342b9023a01105cb441cfafbee8b (patch)
tree39224ede8f55cac67884b92100e3d50451e635ba /libcuda/cuda_api_object.h
parent3429bfacff71a0da92ffb05e964c90dbf26ccac0 (diff)
parentaa12db699a540ea7b4ed4b913be6ef3155fc68d6 (diff)
Merge branch 'dev' of github.com:purdue-aalp/gpgpu-sim_distribution into dev
Diffstat (limited to 'libcuda/cuda_api_object.h')
-rw-r--r--libcuda/cuda_api_object.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libcuda/cuda_api_object.h b/libcuda/cuda_api_object.h
index 0054697..db5e6a4 100644
--- a/libcuda/cuda_api_object.h
+++ b/libcuda/cuda_api_object.h
@@ -169,9 +169,10 @@ private:
class cuda_runtime_api {
public:
- cuda_runtime_api() {
+ cuda_runtime_api( gpgpu_context* ctx ) {
g_glbmap = NULL;
g_active_device = 0; //active gpu that runs the code
+ gpgpu_ctx = ctx;
}
// global list
std::list<cuobjdumpSection*> cuobjdumpSectionList;
@@ -187,6 +188,8 @@ class cuda_runtime_api {
std::map<void *, size_t> pinned_memory_size;
glbmap_entry_t* g_glbmap;
int g_active_device; //active gpu that runs the code
+ // backward pointer
+ class gpgpu_context* gpgpu_ctx;
// member function list
void cuobjdumpInit();
void extract_code_using_cuobjdump();