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_ctx* cl_make_ctx(cl_context ctx, int flags)
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>

Public Members

GPUCONTEXT_HEAD
cl_context ctx
cl_command_queue q
char* exts
char* preamble