36 #include <OpenCL/cl.h>
47 #include "fdm_kernel.cl.h"
55 const size_t global_item_size = 256 * (*nel);
56 const size_t local_item_size = 256;
62 cl_kernel kernel = clCreateKernel(fdm_program, \
63 STR(fdm_do_fast_kernel_nl##NL), &err); \
66 CL_CHECK(clSetKernelArg(kernel, 0, sizeof(cl_mem), (void *) &e)); \
67 CL_CHECK(clSetKernelArg(kernel, 1, sizeof(cl_mem), (void *) &r)); \
68 CL_CHECK(clSetKernelArg(kernel, 2, sizeof(cl_mem), (void *) &s)); \
69 CL_CHECK(clSetKernelArg(kernel, 3, sizeof(cl_mem), (void *) &d)); \
71 CL_CHECK(clEnqueueNDRangeKernel((cl_command_queue) glb_cmd_queue, kernel,\
72 1, NULL, &global_item_size, \
73 &local_item_size, 0, NULL, NULL)); \
void opencl_fdm_do_fast(void *e, void *r, void *s, void *d, int *nl, int *nel)
void opencl_kernel_jit(const char *kernel, cl_program *program)