summaryrefslogtreecommitdiff
path: root/libopencl/opencl_runtime_api.cc
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2019-09-12 18:30:18 -0400
committerMahmoud <[email protected]>2019-09-12 18:30:18 -0400
commit5753f2236b73be3e2a1a49a55fc5c52310eba622 (patch)
treec30d62bb70f62a7930f4fa0763c219b103b622d3 /libopencl/opencl_runtime_api.cc
parent6ce5e06d2389cad5041b495d5516b503ec7d2cd2 (diff)
parentbea40c4a22a86fddbf1f7845265697716727f8b1 (diff)
Merge branch 'dev' of https://github.com/purdue-aalp/gpgpu-sim_distribution into dev-traces
Diffstat (limited to 'libopencl/opencl_runtime_api.cc')
-rw-r--r--libopencl/opencl_runtime_api.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc
index 7f029c7..b032c05 100644
--- a/libopencl/opencl_runtime_api.cc
+++ b/libopencl/opencl_runtime_api.cc
@@ -647,13 +647,13 @@ unsigned _cl_kernel::sm_context_uid = 0;
class _cl_device_id *GPGPUSim_Init()
{
static _cl_device_id *the_device = NULL;
+ gpgpu_context *ctx;
+ ctx = GPGPU_Context();
if( !the_device ) {
- 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);
+ ctx->start_sim_thread(2);
return the_device;
}
@@ -960,7 +960,7 @@ clEnqueueNDRangeKernel(cl_command_queue command_queue,
if ( ctx->func_sim->g_ptx_sim_mode )
ctx->func_sim->gpgpu_opencl_ptx_sim_main_func( grid );
else
- gpgpu_opencl_ptx_sim_main_perf( grid );
+ ctx->gpgpu_opencl_ptx_sim_main_perf( grid );
return CL_SUCCESS;
}