36 #include <OpenCL/cl.h>
47 #include "facet_normal_kernel.cl.h"
53 void *
x,
void *y,
void *z,
54 void *
u,
void *
v,
void *
w,
55 void *nx,
void * ny,
void *nz,
56 void *area,
int *lx,
int *m) {
64 "facet_normal_apply_surfvec_kernel", &err);
67 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void *) &msk));
68 CL_CHECK(clSetKernelArg(kernel, 1,
sizeof(cl_mem), (
void *) &facet));
69 CL_CHECK(clSetKernelArg(kernel, 2,
sizeof(cl_mem), (
void *) &
x));
70 CL_CHECK(clSetKernelArg(kernel, 3,
sizeof(cl_mem), (
void *) &y));
71 CL_CHECK(clSetKernelArg(kernel, 4,
sizeof(cl_mem), (
void *) &z));
72 CL_CHECK(clSetKernelArg(kernel, 5,
sizeof(cl_mem), (
void *) &
u));
73 CL_CHECK(clSetKernelArg(kernel, 6,
sizeof(cl_mem), (
void *) &
v));
74 CL_CHECK(clSetKernelArg(kernel, 7,
sizeof(cl_mem), (
void *) &
w));
75 CL_CHECK(clSetKernelArg(kernel, 8,
sizeof(cl_mem), (
void *) &nx));
76 CL_CHECK(clSetKernelArg(kernel, 9,
sizeof(cl_mem), (
void *) &ny));
77 CL_CHECK(clSetKernelArg(kernel, 10,
sizeof(cl_mem), (
void *) &nz));
78 CL_CHECK(clSetKernelArg(kernel, 11,
sizeof(cl_mem), (
void *) &area));
79 CL_CHECK(clSetKernelArg(kernel, 12,
sizeof(
int), lx));
80 CL_CHECK(clSetKernelArg(kernel, 13,
sizeof(
int), m));
82 const int nb = ((*m) + 256 - 1) / 256;
83 const size_t global_item_size = 256 * nb;
84 const size_t local_item_size = 256;
87 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_facet_normal_apply_surfvec(void *msk, void *facet, void *x, void *y, void *z, void *u, void *v, void *w, void *nx, void *ny, void *nz, void *area, int *lx, int *m)
void opencl_kernel_jit(const char *kernel, cl_program *program)
void * facet_normal_program