tbb::flow::interface11::opencl_program< Factory >::opencl_device_filter Class Reference
Collaboration diagram for tbb::flow::interface11::opencl_program< Factory >::opencl_device_filter:

## Public Member Functions

template<typename Filter >
| opencl_device_filter (cl_uint &num_devices, cl_device_id *device_list, Filter filter, const char *message)

## Detailed Description

### template<typename Factory = opencl_info::default_opencl_factory>
class tbb::flow::interface11::opencl_program< Factory >::opencl_device_filter

Definition at line 1318 of file flow_graph_opencl_node.h.

## Constructor & Destructor Documentation

## opencl_device_filter()

template<typename Factory = opencl_info::default_opencl_factory>
template<typename Filter >

tbb::flow::interface11::opencl_program< Factory >::opencl_device_filter::opencl_device_filter | ( | cl_uint & | num_devices,
|  | cl_device_id * | device_list,
|  | Filter | filter,
|  | const char * | message
| ) |  |

inline

Definition at line 1321 of file flow_graph_opencl_node.h.

{
for ( cl_uint i = 0; i < num_devices; ++i )
if ( filter(device_list[i]) ) {
device_list[i--] = device_list[--num_devices];
}
if ( !num_devices )
enforce_cl_retcode( CL_DEVICE_NOT_AVAILABLE, message );
}

References tbb::flow::interface11::enforce_cl_retcode().

Here is the call graph for this function:

The documentation for this class was generated from the following file:

- flow_graph_opencl_node.h

tbb::flow::interface11::enforce_cl_retcode
void enforce_cl_retcode(cl_int err, std::string msg)
Definition: flow_graph_opencl_node.h:57

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.