File private_opencl.h¶
Defines
-
CL_CHECK
(e, cmd) do { \ cl_int err = (cmd); \ if (err != CL_SUCCESS) \ return error_cl(e, #cmd, err); \ } while(0)¶
-
CL_CHECKN
(e, cmd) do { \ cl_int err = (cmd); \ if (err != CL_SUCCESS) { \ error_cl(e, #cmd, err); \ return NULL; \ } \ } while(0)¶
-
CL_GET_PROP
(e, fn, obj, prop, val) do { \ size_t sz; \ cl_int err; \ CL_CHECK(e, fn (obj, prop, 0, NULL, &sz)); \ val = malloc(sz); \ if (val == NULL) return error_sys(e, "malloc"); \ err = fn (obj, prop, sz, val, NULL); \ if (err != CL_SUCCESS) { \ free(val); \ val = NULL; \ return error_cl(e, #fn, err); \ } \ } while(0)¶
Functions
-
const char*
cl_error_string
(cl_int)¶
-
static int
error_cl
(error * e, const char * msg, cl_int err)¶
-
cl_command_queue
cl_get_stream
(gpucontext * ctx)¶
-
gpudata*
cl_make_buf
(gpucontext * c, cl_mem buf)¶
-
cl_mem
cl_get_buf
(gpudata * g)¶
-
struct
cl_ctx
¶ - #include <private_opencl.h>