29 #ifndef _CCL_PLATFORM_WRAPPER_H_
30 #define _CCL_PLATFORM_WRAPPER_H_
136 #define ccl_platform_get_info(platf, param_name, err) \
137 ccl_wrapper_get_info((CCLWrapper*) platf, NULL, param_name, 0, \
138 CCL_INFO_PLATFORM, CL_FALSE, err)
156 #define ccl_platform_get_info_scalar(platf, param_name, param_type, err) \
157 *((param_type*) ccl_wrapper_get_info_value((CCLWrapper*) platf, \
158 NULL, param_name, sizeof(param_type), \
159 CCL_INFO_PLATFORM, CL_FALSE, err))
177 #define ccl_platform_get_info_array(platf, param_name, param_type, err) \
178 (param_type) ccl_wrapper_get_info_value((CCLWrapper*) platf, \
179 NULL, param_name, sizeof(param_type), \
180 CCL_INFO_PLATFORM, CL_FALSE, err)
195 #define ccl_platform_get_info_string(platf, param_name, err) \
196 ccl_platform_get_info_array(platf, param_name, char*, err)
203 #define ccl_platform_ref(platform) \
204 ccl_wrapper_ref((CCLWrapper*) platform)
212 #define ccl_platform_unref(platform) ccl_platform_destroy(platform)
220 #define ccl_platform_unwrap(platform) \
221 ((cl_platform_id) ccl_wrapper_unwrap((CCLWrapper*) platform))
Definition of a wrapper class and its methods for OpenCL device objects.
CCLPlatform * ccl_platform_new_from_device(CCLDevice *dev, CCLErr **err)
Get the platform wrapper for the given device wrapper.
CCLPlatform * ccl_platform_new_wrap(cl_platform_id platform)
Get the platform wrapper for the given OpenCL platform.
CCLDevice *const * ccl_platform_get_all_devices(CCLPlatform *platf, CCLErr **err)
Get all device wrappers in platform.
Convert OpenCL error codes to readable strings (function header).
cl_uint ccl_platform_get_num_devices(CCLPlatform *platf, CCLErr **err)
Return number of devices in platform.
void ccl_platform_destroy(CCLPlatform *platf)
Decrements the reference count of the platform wrapper object.
GError CCLErr
Error handling class.
Common cf4ocl definitions.
CCLDevice * ccl_platform_get_device(CCLPlatform *platf, cl_uint index, CCLErr **err)
Get CCLDevice wrapper at given index.
cl_uint ccl_platform_get_opencl_version(CCLPlatform *platf, CCLErr **err)
Get the OpenCL version of this platform.