| 497 | } |
| 498 | |
| 499 | bool run_2D(cl_command_queue command_queue, const cl_kernel kernel, size_t width, size_t height) |
| 500 | { |
| 501 | cl_serializer serializer(this); |
| 502 | |
| 503 | size_t num_global_items[2] = { width, height }; |
| 504 | //size_t num_local_items[2] = { 1, 1 }; |
| 505 | |
| 506 | cl_int ret = clEnqueueNDRangeKernel(command_queue, kernel, |
| 507 | 2, // work_dim |
| 508 | nullptr, // global_work_offset |
| 509 | num_global_items, // global_work_size |
| 510 | nullptr, // local_work_size |
| 511 | 0, // num_events_in_wait_list |
| 512 | nullptr, // event_wait_list |
| 513 | nullptr // event |
| 514 | ); |
| 515 | |
| 516 | if (ret != CL_SUCCESS) |
| 517 | { |
| 518 | ocl_error_printf("ocl::run_2D: clEnqueueNDRangeKernel() failed!\n"); |
| 519 | return false; |
| 520 | } |
| 521 | |
| 522 | return true; |
| 523 | } |
| 524 | |
| 525 | bool run_2D(cl_command_queue command_queue, const cl_kernel kernel, size_t ofs_x, size_t ofs_y, size_t width, size_t height) |
| 526 | { |
no test coverage detected