summaryrefslogtreecommitdiff
path: root/libcuda/cuda_api_object.h
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-09 14:32:24 -0400
committerMengchi Zhang <[email protected]>2019-07-09 14:32:24 -0400
commitcda7a145b9e28eff0f3e9ac8197c2b6215755fc8 (patch)
tree130b10d0f93ece2e531b1fab9a8bd80729566461 /libcuda/cuda_api_object.h
parent5b015d4347c4945de5a6a7b0559e67e3824d76d6 (diff)
Move g_ptx_kernel_count
Signed-off-by: Mengchi Zhang <[email protected]>
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();