summaryrefslogtreecommitdiff
path: root/libopencl
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-09 15:34:59 -0400
committerGitHub <[email protected]>2019-07-09 15:34:59 -0400
commit460e779f45faa545c263e2d3316935b9fc083876 (patch)
tree8d7a8fb41bfebf528f0f1a9d7c3011bca9de1c4d /libopencl
parent109a03655326ed23d26a3496589b21be51089bbb (diff)
parentb3655bf28a7402db347f9d7f87049806b9315a05 (diff)
Merge pull request #23 from echoedit/dev
Dev
Diffstat (limited to 'libopencl')
-rw-r--r--libopencl/opencl_runtime_api.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc
index 03ec80c..0a6eb3e 100644
--- a/libopencl/opencl_runtime_api.cc
+++ b/libopencl/opencl_runtime_api.cc
@@ -877,6 +877,8 @@ clEnqueueNDRangeKernel(cl_command_queue command_queue,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0
{
+ gpgpu_context *ctx;
+ ctx = GPGPU_Context();
int _global_size[3];
int zeros[3] = { 0, 0, 0};
printf("\n\n\n");
@@ -954,9 +956,9 @@ clEnqueueNDRangeKernel(cl_command_queue command_queue,
gpgpu_ptx_sim_memcpy_symbol( "%_global_launch_offset", zeros, 3 * sizeof(int), 0, 1, gpu );
gpgpu_ptx_sim_memcpy_symbol( "%_global_block_offset", zeros, 3 * sizeof(int), 0, 1, gpu );
}
- kernel_info_t *grid = gpgpu_opencl_ptx_sim_init_grid(kernel->get_implementation(),params,GridDim,BlockDim,gpu);
+ kernel_info_t *grid = ctx->func_sim->gpgpu_opencl_ptx_sim_init_grid(kernel->get_implementation(),params,GridDim,BlockDim,gpu);
if ( g_ptx_sim_mode )
- gpgpu_opencl_ptx_sim_main_func( grid );
+ ctx->func_sim->gpgpu_opencl_ptx_sim_main_func( grid );
else
gpgpu_opencl_ptx_sim_main_perf( grid );
return CL_SUCCESS;