36 #include <OpenCL/cl.h>
47 #include "inflow_kernel.cl.h"
53 void *z,
void *g,
int *m) {
61 "inflow_apply_vector_kernel", &err);
68 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void *) &msk));
69 CL_CHECK(clSetKernelArg(kernel, 1,
sizeof(cl_mem), (
void *) &
x));
70 CL_CHECK(clSetKernelArg(kernel, 2,
sizeof(cl_mem), (
void *) &y));
71 CL_CHECK(clSetKernelArg(kernel, 3,
sizeof(cl_mem), (
void *) &z));
75 CL_CHECK(clSetKernelArg(kernel, 7,
sizeof(
int), m));
77 const int nb = ((*m) + 256 - 1) / 256;
78 const size_t global_item_size = 256 * nb;
79 const size_t local_item_size = 256;
82 NULL, &global_item_size, &local_item_size,
__global__ void const T *__restrict__ x
void opencl_inflow_apply_vector(void *msk, void *x, void *y, void *z, void *g, int *m)
void opencl_kernel_jit(const char *kernel, cl_program *program)