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