cf4ocl (C Framework for OpenCL)  v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ccl_context Struct Reference

The context wrapper class. More...

Inheritance diagram for ccl_context:
Inheritance graph
Collaboration diagram for ccl_context:
Collaboration graph

Public Member Functions

void ccl_context_destroy (CCLContext *ctx)
 Decrements the reference count of the context wrapper object. More...
 
CCLDevice *const * ccl_context_get_all_devices (CCLContext *ctx, CCLErr **err)
 Get all device wrappers in context. More...
 
CCLDeviceccl_context_get_device (CCLContext *ctx, cl_uint index, CCLErr **err)
 Get CCLDevice wrapper at given index. More...
 
cl_uint ccl_context_get_num_devices (CCLContext *ctx, CCLErr **err)
 Return number of devices in context. More...
 
cl_uint ccl_context_get_opencl_version (CCLContext *ctx, CCLErr **err)
 Get the OpenCL version of the platform associated with this context. More...
 
CCLPlatformccl_context_get_platform (CCLContext *ctx, CCLErr **err)
 Get the platform associated with the context devices. More...
 
const cl_image_format * ccl_context_get_supported_image_formats (CCLContext *ctx, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint *num_image_formats, CCLErr **err)
 Get the list of image formats supported by a given context. More...
 
CCLContextccl_context_new_from_devices_full (const cl_context_properties *properties, cl_uint num_devices, CCLDevice *const *devices, ccl_context_callback pfn_notify, void *user_data, CCLErr **err)
 Creates a context wrapper given an array of CCLDevice wrappers and the remaining parameters required by the clCreateContext() function. More...
 
CCLContextccl_context_new_from_filter (CCLDevSelFilterType ftype, void *filter, void *data, CCLErr **err)
 Creates a context wrapper using one device filter specified in the function parameters. More...
 
CCLContextccl_context_new_from_filters_full (const cl_context_properties *properties, CCLDevSelFilters *filters, ccl_context_callback pfn_notify, void *user_data, CCLErr **err)
 Create a new context wrapper object selecting devices using the given set of filters. More...
 
CCLContextccl_context_new_wrap (cl_context context)
 Get the context wrapper for the given OpenCL context. More...
 
- Public Member Functions inherited from ccl_wrapper
CCLWrapperInfoccl_wrapper_get_info (CCLWrapper *wrapper1, CCLWrapper *wrapper2, cl_uint param_name, size_t min_size, CCLInfo info_type, cl_bool use_cache, CCLErr **err)
 Get information about any wrapped OpenCL object. More...
 
size_t ccl_wrapper_get_info_size (CCLWrapper *wrapper1, CCLWrapper *wrapper2, cl_uint param_name, size_t min_size, CCLInfo info_type, cl_bool use_cache, CCLErr **err)
 Get information size. More...
 
void * ccl_wrapper_get_info_value (CCLWrapper *wrapper1, CCLWrapper *wrapper2, cl_uint param_name, size_t min_size, CCLInfo info_type, cl_bool use_cache, CCLErr **err)
 Get pointer to information value. More...
 
cl_bool ccl_wrapper_memcheck ()
 Debug function which checks if memory allocated by wrappers has been properly freed. More...
 
void ccl_wrapper_ref (CCLWrapper *wrapper)
 Increase the reference count of the wrapper object. More...
 
int ccl_wrapper_ref_count (CCLWrapper *wrapper)
 Returns the wrapper object reference count. More...
 
void * ccl_wrapper_unwrap (CCLWrapper *wrapper)
 Get the wrapped OpenCL object. More...
 

Detailed Description

The context wrapper class.

Examples:
ca.c, canon.c, device_filter.c, image_fill.c, and image_filter.c.

Definition at line 38 of file ccl_context_wrapper.c.