From 48887cfe0261abde6de23fc5d1d76694426b7e8e Mon Sep 17 00:00:00 2001 From: Mengchi Zhang Date: Thu, 12 Sep 2019 02:01:01 -0400 Subject: Remove GPGPUsim_ctx_ptr() Signed-off-by: Mengchi Zhang --- libopencl/opencl_runtime_api.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libopencl') 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; } -- cgit v1.3