36 #include <OpenCL/cl.h>
47 #include "dong_outflow_kernel.cl.h"
53 void *normal_y,
void *normal_z,
54 void *
u,
void *
v,
void *
w,
62 "dong_outflow_apply_scalar_kernel", &err);
65 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void *) &msk));
66 CL_CHECK(clSetKernelArg(kernel, 1,
sizeof(cl_mem), (
void *) &
x));
67 CL_CHECK(clSetKernelArg(kernel, 2,
sizeof(cl_mem), (
void *) &normal_x));
68 CL_CHECK(clSetKernelArg(kernel, 3,
sizeof(cl_mem), (
void *) &normal_y));
69 CL_CHECK(clSetKernelArg(kernel, 4,
sizeof(cl_mem), (
void *) &normal_z));
70 CL_CHECK(clSetKernelArg(kernel, 5,
sizeof(cl_mem), (
void *) &
u));
71 CL_CHECK(clSetKernelArg(kernel, 6,
sizeof(cl_mem), (
void *) &
v));
72 CL_CHECK(clSetKernelArg(kernel, 7,
sizeof(cl_mem), (
void *) &
w));
74 CL_CHECK(clSetKernelArg(kernel, 9,
sizeof(
real), delta));
75 CL_CHECK(clSetKernelArg(kernel, 10,
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 T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ w
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ u
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ v
__global__ void const T *__restrict__ x
void opencl_dong_outflow_apply_scalar(void *msk, void *x, void *normal_x, void *normal_y, void *normal_z, void *u, void *v, void *w, real *uinf, real *delta, int *m)
void opencl_kernel_jit(const char *kernel, cl_program *program)