31 #include <OpenCL/cl.h>
42 #include "scalar_residual_kernel.cl.h"
52 "scalar_residual_update_kernel", &err);
55 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void *) &s_res));
56 CL_CHECK(clSetKernelArg(kernel, 1,
sizeof(cl_mem), (
void *) &f_s));
57 CL_CHECK(clSetKernelArg(kernel, 2,
sizeof(
int), n));
59 const int nb = ((*n) + 256 - 1) / 256;
60 const size_t global_item_size = 256 * nb;
61 const size_t local_item_size = 256;
64 NULL, &global_item_size, &local_item_size,
void opencl_kernel_jit(const char *kernel, cl_program *program)
void * scalar_residual_program
void scalar_residual_update_opencl(void *s_res, void *f_s, int *n)