summaryrefslogtreecommitdiff
path: root/libcuda/cuda_api_object.h
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-09 15:34:59 -0400
committerGitHub <[email protected]>2019-07-09 15:34:59 -0400
commit460e779f45faa545c263e2d3316935b9fc083876 (patch)
tree8d7a8fb41bfebf528f0f1a9d7c3011bca9de1c4d /libcuda/cuda_api_object.h
parent109a03655326ed23d26a3496589b21be51089bbb (diff)
parentb3655bf28a7402db347f9d7f87049806b9315a05 (diff)
Merge pull request #23 from echoedit/dev
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();