36 #include <OpenCL/cl.h>
47 #include "no_slip_wall_kernel.cl.h"
60 "no_slip_wall_apply_scalar_kernel", &err);
63 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void *) &msk));
64 CL_CHECK(clSetKernelArg(kernel, 1,
sizeof(cl_mem), (
void *) &
x));
65 CL_CHECK(clSetKernelArg(kernel, 2,
sizeof(
int), m));
67 const int nb = ((*m) + 256 - 1) / 256;
68 const size_t global_item_size = 256 * nb;
69 const size_t local_item_size = 256;
72 NULL, &global_item_size, &local_item_size,
87 "no_slip_wall_apply_vector_kernel", &err);
90 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void *) &msk));
91 CL_CHECK(clSetKernelArg(kernel, 1,
sizeof(cl_mem), (
void *) &
x));
92 CL_CHECK(clSetKernelArg(kernel, 2,
sizeof(cl_mem), (
void *) &y));
93 CL_CHECK(clSetKernelArg(kernel, 3,
sizeof(cl_mem), (
void *) &z));
94 CL_CHECK(clSetKernelArg(kernel, 4,
sizeof(
int), m));
96 const int nb = ((*m) + 256 - 1) / 256;
97 const size_t global_item_size = 256 * nb;
98 const size_t local_item_size = 256;
101 NULL, &global_item_size, &local_item_size,
__global__ void const T *__restrict__ x
void opencl_kernel_jit(const char *kernel, cl_program *program)
void opencl_no_slip_wall_apply_vector(void *msk, void *x, void *y, void *z, int *m)
void opencl_no_slip_wall_apply_scalar(void *msk, void *x, int *m)
void * no_slip_wall_program