Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface10::opencl_program< Factory >::opencl_device_filter Class Reference
Collaboration diagram for tbb::flow::interface10::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::interface10::opencl_program< Factory >::opencl_device_filter

Definition at line 1319 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::interface10::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 1322 of file flow_graph_opencl_node.h.

1323  {
1324  for ( cl_uint i = 0; i < num_devices; ++i )
1325  if ( filter(device_list[i]) ) {
1326  device_list[i--] = device_list[--num_devices];
1327  }
1328  if ( !num_devices )
1329  enforce_cl_retcode( CL_DEVICE_NOT_AVAILABLE, message );
1330  }
void enforce_cl_retcode(cl_int err, std::string msg)

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

Here is the call graph for this function:

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

Copyright © 2005-2019 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.