30 #ifndef _CCL_DEVICE_WRAPPER_H_
31 #define _CCL_DEVICE_WRAPPER_H_
96 const cl_device_partition_property *properties,
97 cl_uint *num_devs_ret,
CCLErr** err);
110 #define ccl_device_get_info(dev, param_name, err) \
111 ccl_wrapper_get_info((CCLWrapper*) dev, NULL, param_name, 0, \
112 CCL_INFO_DEVICE, CL_FALSE, err)
130 #define ccl_device_get_info_scalar(dev, param_name, param_type, err) \
131 *((param_type*) ccl_wrapper_get_info_value((CCLWrapper*) dev, \
132 NULL, param_name, sizeof(param_type), \
133 CCL_INFO_DEVICE, CL_FALSE, err))
151 #define ccl_device_get_info_array(dev, param_name, param_type, err) \
152 (param_type) ccl_wrapper_get_info_value((CCLWrapper*) dev, \
153 NULL, param_name, sizeof(param_type), \
154 CCL_INFO_DEVICE, CL_FALSE, err)
161 #define ccl_device_ref(dev) \
162 ccl_wrapper_ref((CCLWrapper*) dev)
170 #define ccl_device_unref(dev) ccl_device_destroy(dev)
178 #define ccl_device_unwrap(dev) \
179 ((cl_device_id) ccl_wrapper_unwrap((CCLWrapper*) dev))
void ccl_device_destroy(CCLDevice *dev)
Decrements the reference count of the device wrapper object.
CCLDevice *const * ccl_device_create_subdevices(CCLDevice *dev, const cl_device_partition_property *properties, cl_uint *num_devs_ret, CCLErr **err)
Creates a NULL-terminated array of sub-devices that each reference a non-intersecting set of compute ...
Definition of an abstract wrapper class and its methods for OpenCL objects.
Header for normalizing OpenCL versions within cf4ocl.
cl_uint ccl_device_get_opencl_c_version(CCLDevice *dev, CCLErr **err)
Get the OpenCL C version supported by the device.
GError CCLErr
Error handling class.
cl_uint ccl_device_get_opencl_version(CCLDevice *dev, CCLErr **err)
Get the OpenCL version supported by the device.
Common cf4ocl definitions.
Convert OpenCL error codes to readable strings (function header).
CCLDevice * ccl_device_new_wrap(cl_device_id device)
Get the device wrapper for the given OpenCL device.