summaryrefslogtreecommitdiff
path: root/libopencl
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-02 00:57:01 -0400
committerGitHub <[email protected]>2019-07-02 00:57:01 -0400
commitc7b8987b313602bf0c3a6edb4830bfba3aa083ae (patch)
treef0175d95d1354851ba9043c4be373565d53d6d43 /libopencl
parent067ca5fcce6ef4fa51ed3949dbffe62f60f6ad12 (diff)
parent3600ed5c59adafe40840524d19f622aa25e60dd6 (diff)
Merge pull request #20 from echoedit/dev
Dev
Diffstat (limited to 'libopencl')
-rw-r--r--libopencl/opencl_runtime_api.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc
index 50a02fa..e91e2e0 100644
--- a/libopencl/opencl_runtime_api.cc
+++ b/libopencl/opencl_runtime_api.cc
@@ -648,7 +648,9 @@ class _cl_device_id *GPGPUSim_Init()
{
static _cl_device_id *the_device = NULL;
if( !the_device ) {
- gpgpu_sim *the_gpu = gpgpu_ptx_sim_init_perf();
+ gpgpu_context *ctx;
+ ctx = GPGPU_Context();
+ gpgpu_sim *the_gpu = ctx->gpgpu_ptx_sim_init_perf();
the_device = new _cl_device_id(the_gpu);
}
start_sim_thread(2);