summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-06-10 22:42:27 -0400
committerMengchi Zhang <[email protected]>2019-06-10 22:42:27 -0400
commit269fbbdb72dacdf4dc3c482b213174336c3eeb1f (patch)
tree442de4c9934d4847b8569dc524d9539d8c95d409
parenta34d4295ca856297ad76d5a6408cdaa163554809 (diff)
Move getters for gpgpu_context to globals
Signed-off-by: Mengchi Zhang <[email protected]>
-rw-r--r--libcuda/cuda_runtime_api.cc2
-rw-r--r--libcuda/gpgpu_context.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 2e2b50b..c5ebc20 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -273,7 +273,7 @@ static CUctx_st* GPGPUSim_Context()
return the_context;
}
-static gpgpu_context* GPGPU_Context()
+gpgpu_context* GPGPU_Context()
{
static gpgpu_context *gpgpu_ctx = NULL;
if( gpgpu_ctx == NULL ) {
diff --git a/libcuda/gpgpu_context.h b/libcuda/gpgpu_context.h
index 4622f00..6c8a293 100644
--- a/libcuda/gpgpu_context.h
+++ b/libcuda/gpgpu_context.h
@@ -12,4 +12,6 @@ class gpgpu_context {
cuda_runtime_api* api;
// member function list
};
+gpgpu_context* GPGPU_Context();
+
#endif /* __gpgpu_context_h__ */