Creates the kernel with the given name from the given program. */
| 210 | Creates the kernel with the given name from the given program. |
| 211 | */ |
| 212 | cl_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 | |
| 223 | cl_device_id get_context_device (cl_context context) |
| 224 | { |