36 #include <OpenCL/cl.h>
48 #include "filter_kernels.cl.h"
66 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void*)&
x));
67 CL_CHECK(clSetKernelArg(kernel, 1,
sizeof(
real), edge0));
68 CL_CHECK(clSetKernelArg(kernel, 2,
sizeof(
real), edge1));
69 CL_CHECK(clSetKernelArg(kernel, 3,
sizeof(
int), n));
71 const int nb = ((*n) + 256 - 1) / 256;
72 const size_t global_item_size = 256 * nb;
73 const size_t local_item_size = 256;
76 (cl_command_queue)
glb_cmd_queue, kernel, 1, NULL, &global_item_size,
77 &local_item_size, 0, NULL, NULL));
103 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void*)&
x));
104 CL_CHECK(clSetKernelArg(kernel, 1,
sizeof(
real), edge));
105 CL_CHECK(clSetKernelArg(kernel, 2,
sizeof(
real), left));
106 CL_CHECK(clSetKernelArg(kernel, 3,
sizeof(
real), right));
107 CL_CHECK(clSetKernelArg(kernel, 4,
sizeof(
int), n));
109 const int nb = ((*n) + 256 - 1) / 256;
110 const size_t global_item_size = 256 * nb;
111 const size_t local_item_size = 256;
114 (cl_command_queue)
glb_cmd_queue, kernel, 1, NULL, &global_item_size,
115 &local_item_size, 0, NULL, NULL));
136 CL_CHECK(clSetKernelArg(kernel, 0,
sizeof(cl_mem), (
void*)&
x));
140 CL_CHECK(clSetKernelArg(kernel, 4,
sizeof(
int), n));
142 const int nb = ((*n) + 256 - 1) / 256;
143 const size_t global_item_size = 256 * nb;
144 const size_t local_item_size = 256;
147 (cl_command_queue)
glb_cmd_queue, kernel, 1, NULL, &global_item_size,
148 &local_item_size, 0, NULL, NULL));
__global__ void const T *__restrict__ x
void opencl_step_function(void *x, real *edge, real *left, real *right, int *n)
void opencl_permeability(void *x, real *k_0, real *k_1, real *q, int *n)
void opencl_smooth_step(void *x, real *edge0, real *edge1, int *n)
void opencl_kernel_jit(const char *kernel, cl_program *program)