Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
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 1332 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 1335 of file flow_graph_opencl_node.h.

1336  {
1337  for ( cl_uint i = 0; i < num_devices; ++i )
1338  if ( filter(device_list[i]) ) {
1339  device_list[i--] = device_list[--num_devices];
1340  }
1341  if ( !num_devices )
1342  enforce_cl_retcode( CL_DEVICE_NOT_AVAILABLE, message );
1343  }
void enforce_cl_retcode(cl_int err, std::string msg)

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:

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.