cf4ocl (C Framework for OpenCL)
v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
|
Classes and functions for filtering and selecting OpenCL contexts and associated devices. More...
Go to the source code of this file.
Data Structures | |
struct | ccl_devsel_filter |
Device filter class, includes a filter function (independent or dependent) and the respective filter data. More... | |
Typedefs | |
typedef void(* | ccl_devsel_fp )(void) |
Generic filter function pointer. More... | |
typedef struct ccl_devsel_filter | CCLDevSelFilter |
Device filter class, includes a filter function (independent or dependent) and the respective filter data. | |
Functions | |
void | ccl_devsel_add_dep_filter (CCLDevSelFilters *filters, ccl_devsel_dep filter, void *data) |
Add a dependent filter to the filter set. More... | |
void | ccl_devsel_add_indep_filter (CCLDevSelFilters *filters, ccl_devsel_indep filter, void *data) |
Add an independent filter to the filter set. More... | |
CCLDevSelDevices | ccl_devsel_dep_index (CCLDevSelDevices devices, void *data, CCLErr **err) |
Dependent filter function which selects the device at the specified index, failing if no device is found at that index. More... | |
CCLDevSelDevices | ccl_devsel_dep_menu (CCLDevSelDevices devices, void *data, CCLErr **err) |
Dependent filter function which presents a menu to the user allowing him to select the desired device. More... | |
CCLDevSelDevices | ccl_devsel_dep_platform (CCLDevSelDevices devices, void *data, CCLErr **err) |
Dependent filter function which only accepts devices of the same platform (the platform to which the first device belong to). More... | |
void | ccl_devsel_devices_destroy (CCLDevSelDevices devices) |
Destroy an object containing device wrappers. More... | |
CCLDevSelDevices | ccl_devsel_devices_new (CCLErr **err) |
Create and return an object with device wrappers for all OpenCL devices present in the system. More... | |
gchar ** | ccl_devsel_get_device_strings (CCLErr **err) |
Returns a NULL-terminated array of strings, each one containing the name and vendor of each device in the system. More... | |
cl_bool | ccl_devsel_indep_platform (CCLDevice *device, void *data, CCLErr **err) |
Independent filter function which only accepts devices of a specified platform. More... | |
cl_bool | ccl_devsel_indep_string (CCLDevice *dev, void *data, CCLErr **err) |
Independent filter which selects devices based on device name, device vendor and/or platform name. More... | |
cl_bool | ccl_devsel_indep_type (CCLDevice *dev, void *data, CCLErr **err) |
Independent filter function which accepts devices of the type given in the data parameter. More... | |
cl_bool | ccl_devsel_indep_type_accel (CCLDevice *dev, void *data, CCLErr **err) |
Independent filter function which only accepts accelerator devices. More... | |
cl_bool | ccl_devsel_indep_type_cpu (CCLDevice *dev, void *data, CCLErr **err) |
Independent filter function which only accepts CPU devices. More... | |
cl_bool | ccl_devsel_indep_type_gpu (CCLDevice *dev, void *data, CCLErr **err) |
Independent filter function which only accepts GPU devices. More... | |
void | ccl_devsel_print_device_strings (CCLErr **err) |
Print to stdout a device description string for each device in the system. More... | |
CCLDevSelDevices | ccl_devsel_select (CCLDevSelFilters *filters, CCLErr **err) |
Select one or more OpenCL devices based on the provided filters. More... | |
Classes and functions for filtering and selecting OpenCL contexts and associated devices.
Definition in file ccl_device_selector.c.
typedef void(* ccl_devsel_fp)(void) |
Generic filter function pointer.
Used to keep either a dependent or independent filter function in a CCLDevSelFilter object.
Definition at line 38 of file ccl_device_selector.c.