36 #include <OpenCL/cl.h>
47 #include "inhom_dirichlet_kernel.cl.h"
53 void *
x,
void *y,
void *z,
54 void *bla_x,
void *bla_y,
void *bla_z,
62 "inhom_dirichlet_apply_vector_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 *) &y));
68 CL_CHECK(clSetKernelArg(kernel, 3,
sizeof(cl_mem), (
void *) &z));
69 CL_CHECK(clSetKernelArg(kernel, 4,
sizeof(cl_mem), (
void *) &bla_x));
70 CL_CHECK(clSetKernelArg(kernel, 5,
sizeof(cl_mem), (
void *) &bla_y));
71 CL_CHECK(clSetKernelArg(kernel, 6,
sizeof(cl_mem), (
void *) &bla_z));
72 CL_CHECK(clSetKernelArg(kernel, 7,
sizeof(
int), m));
74 const int nb = ((*m) + 256 - 1) / 256;
75 const size_t global_item_size = 256 * nb;
76 const size_t local_item_size = 256;
79 NULL, &global_item_size, &local_item_size,
97 "inhom_dirichlet_apply_scalar_kernel", &err);
100 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void *) &msk));
101 CL_CHECK(clSetKernelArg(kernel, 1,
sizeof(cl_mem), (
void *) &
x));
102 CL_CHECK(clSetKernelArg(kernel, 2,
sizeof(cl_mem), (
void *) &bla_x));
103 CL_CHECK(clSetKernelArg(kernel, 3,
sizeof(
int), m));
105 const int nb = ((*m) + 256 - 1) / 256;
106 const size_t global_item_size = 256 * nb;
107 const size_t local_item_size = 256;
110 NULL, &global_item_size, &local_item_size,
__global__ void const T *__restrict__ x
void opencl_inhom_dirichlet_apply_scalar(void *msk, void *x, void *bla_x, int *m)
void opencl_inhom_dirichlet_apply_vector(void *msk, void *x, void *y, void *z, void *bla_x, void *bla_y, void *bla_z, int *m)
void opencl_kernel_jit(const char *kernel, cl_program *program)
void * inhom_dirichlet_program