Go to the documentation of this file. 1 #ifndef HALIDE_HALIDERUNTIMEOPENCL_H
2 #define HALIDE_HALIDERUNTIMEOPENCL_H
5 #ifndef HALIDE_HALIDERUNTIME_H
19 #define HALIDE_RUNTIME_OPENCL
28 const char *src,
int size);
31 const char *entry_name,
32 int blocksX,
int blocksY,
int blocksZ,
33 int threadsX,
int threadsY,
int threadsZ,
119 #endif // HALIDE_HALIDERUNTIMEOPENCL_H
signed __INT8_TYPE__ int8_t
uint64_t halide_opencl_get_crop_offset(void *user_context, halide_buffer_t *buf)
Returns the offset associated with the OpenCL memory allocation via device_crop or device_slice.
const char * halide_opencl_get_device_type(void *user_context)
Halide calls this to gets the desired OpenCL device type.
const char * halide_opencl_get_build_options(void *user_context)
Halide calls this to gets the additional build options for OpenCL to use.
const struct halide_device_interface_t * halide_opencl_image_device_interface()
__UINTPTR_TYPE__ uintptr_t
unsigned __INT64_TYPE__ uint64_t
void halide_opencl_finalize_kernels(void *user_context, void *state_ptr)
void halide_opencl_set_platform_name(const char *n)
Set the platform name for OpenCL to use (e.g.
int halide_opencl_initialize_kernels(void *user_context, void **state_ptr, const char *src, int size)
These are forward declared here to allow clients to override the Halide OpenCL runtime.
const struct halide_device_interface_t * halide_opencl_device_interface()
int halide_opencl_image_wrap_cl_mem(void *user_context, struct halide_buffer_t *buf, uint64_t device_ptr)
Same as halide_opencl_wrap_cl_mem but wraps a cl_mem created with clCreateImage.
const char * halide_opencl_get_platform_name(void *user_context)
Halide calls this to get the desired OpenCL platform name.
uintptr_t halide_opencl_get_cl_mem(void *user_context, struct halide_buffer_t *buf)
Return the underlying cl_mem for a halide_buffer_t.
int halide_opencl_wrap_cl_mem(void *user_context, struct halide_buffer_t *buf, uint64_t device_ptr)
Set the underlying cl_mem for a halide_buffer_t.
void halide_opencl_set_device_type(const char *n)
Set the device type for OpenCL to use.
The raw representation of an image passed around by generated Halide code.
Each GPU API provides a halide_device_interface_t struct pointing to the code that manages device all...
int halide_opencl_run(void *user_context, void *state_ptr, const char *entry_name, int blocksX, int blocksY, int blocksZ, int threadsX, int threadsY, int threadsZ, int shared_mem_bytes, size_t arg_sizes[], void *args[], int8_t arg_is_buffer[])
int halide_opencl_detach_cl_mem(void *user_context, struct halide_buffer_t *buf)
Disconnect a halide_buffer_t from the memory it was previously wrapped around.
void halide_opencl_set_build_options(const char *n)
Set the additional build options for OpenCL to use.