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

Function create_kernel_helper

test_conformance/spir/run_services.cpp:212–221  ·  view source on GitHub ↗

Creates the kernel with the given name from the given program. */

Source from the content-addressed store, hash-verified

210 Creates the kernel with the given name from the given program.
211 */
212cl_kernel create_kernel_helper( cl_program program, const std::string& kernel_name )
213{
214 int error = CL_SUCCESS;
215 cl_kernel kernel = NULL;
216 /* And create a kernel from it */
217 kernel = clCreateKernel( program, kernel_name.c_str(), &error );
218 if( kernel == NULL || error != CL_SUCCESS)
219 throw Exceptions::TestError("Unable to create kernel\n", error);
220 return kernel;
221}
222
223cl_device_id get_context_device (cl_context context)
224{

Callers 5

run_testFunction · 0.85
compareResultMethod · 0.85
test_image_enumerationFunction · 0.85
test_kernel_attributesFunction · 0.85

Calls 1

TestErrorClass · 0.85

Tested by 4

run_testFunction · 0.68
test_image_enumerationFunction · 0.68
test_kernel_attributesFunction · 0.68