cf4ocl (C Framework for OpenCL)
v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
|
Dependent filters perform device selection based on the characteristics of all devices present in the list passed to them. More...
Functions | |
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... | |
Dependent filters perform device selection based on the characteristics of all devices present in the list passed to them.
In practice, dependent filters are functions which implement the ccl_devsel_dep prototype. Functions of this type accept a list of device wrappers and optional user data, returning a new list with the devices present in the original list and which were accepted by the filter.
cf4ocl includes several dependent filters (e.g. a filter to select devices which belong to the platform associated with the first device in the list, and a filter to select devices using a menu). Other dependent filters can be implemented by client code and used in the device selection mechanism.
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.
Device indexes depend on the order in which devices appear in the devices
parameter.
[in] | devices | List of devices. |
[in] | data | Must point to a valid device index of type cl_uint . |
[out] | err | Return location for a CCLErr object, or NULL if error reporting is to be ignored. |
Definition at line 1175 of file ccl_device_selector.c.
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.
[in] | devices | List of devices. |
[in] | data | If not NULL, can contain a device index, such that the device is automatically selected by this filter. |
[out] | err | Return location for a CCLErr object, or NULL if error reporting is to be ignored. |
Definition at line 1091 of file ccl_device_selector.c.
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).
[in] | devices | Currently available OpenCL devices. |
[in] | data | Filter data, ignored. |
[out] | err | Return location for a CCLErr object, or NULL if error reporting is to be ignored. |
Definition at line 1007 of file ccl_device_selector.c.