MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CTS / run_kernel

Function run_kernel

test_conformance/spir/run_services.cpp:728–748  ·  view source on GitHub ↗

Run the single kernel */

Source from the content-addressed store, hash-verified

726 Run the single kernel
727 */
728void run_kernel( cl_kernel kernel, cl_command_queue queue, WorkSizeInfo &ws, TestResult& result )
729{
730 clEventWrapper execute_event;
731
732 set_kernel_args(kernel, result.kernelArgs());
733
734 int error = clEnqueueNDRangeKernel( queue, kernel, ws.work_dim, ws.global_work_offset, ws.global_work_size, ws.local_work_size, 0, NULL, &execute_event );
735 if( error != CL_SUCCESS )
736 {
737 throw Exceptions::TestError("clEnqueueNDRangeKernel failed\n", error);
738 }
739
740 error = clWaitForEvents( 1, &execute_event );
741 if( error != CL_SUCCESS )
742 {
743 throw Exceptions::TestError("clWaitForEvents failed\n", error);
744 }
745
746 // read all the buffers back to host
747 result.readToHost(queue);
748}
749
750/**
751 Compare two test results

Callers 4

run_testFunction · 0.70
compareResultMethod · 0.70
test_image_enumerationFunction · 0.70

Calls 3

set_kernel_argsFunction · 0.85
TestErrorClass · 0.85
readToHostMethod · 0.45

Tested by 3

run_testFunction · 0.56
test_image_enumerationFunction · 0.56