19 #if !defined(__TBB_show_deprecation_message_flow_graph_opencl_node_H) && defined(__TBB_show_deprecated_header_message)    20 #define  __TBB_show_deprecation_message_flow_graph_opencl_node_H    21 #pragma message("TBB Warning: tbb/flow_graph_opencl_node.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.")    24 #if defined(__TBB_show_deprecated_header_message)    25 #undef __TBB_show_deprecated_header_message    28 #ifndef __TBB_flow_graph_opencl_node_H    29 #define __TBB_flow_graph_opencl_node_H    31 #define __TBB_flow_graph_opencl_node_H_include_area    35 #if __TBB_PREVIEW_OPENCL_NODE    48 #include <OpenCL/opencl.h>    56 namespace interface11 {
    58 template <
typename DeviceFilter>
    61 namespace opencl_info {
    65 template <
typename Factory>
    69     if (err != CL_SUCCESS) {
    70         std::cerr << msg << 
"; error code: " << err << std::endl;
    78     enforce_cl_retcode(clGetEventInfo(e, i, 
sizeof(res), &res, NULL), 
"Failed to get OpenCL event information");
    85     enforce_cl_retcode(clGetDeviceInfo(
d, i, 
sizeof(res), &res, NULL), 
"Failed to get OpenCL device information");
    90 inline std::string device_info<std::string>(cl_device_id 
d, cl_device_info i) {
    92     enforce_cl_retcode(clGetDeviceInfo(
d, i, 0, NULL, &required), 
"Failed to get OpenCL device information");
    94     char *buff = (
char*)alloca(required);
    95     enforce_cl_retcode(clGetDeviceInfo(
d, i, required, buff, NULL), 
"Failed to get OpenCL device information");
   100 template <
typename T>
   103     enforce_cl_retcode(clGetPlatformInfo(
p, i, 
sizeof(res), &res, NULL), 
"Failed to get OpenCL platform information");
   108 inline std::string platform_info<std::string>(cl_platform_id 
p, cl_platform_info  i) {
   110     enforce_cl_retcode(clGetPlatformInfo(
p, i, 0, NULL, &required), 
"Failed to get OpenCL platform information");
   112     char *buff = (
char*)alloca(required);
   113     enforce_cl_retcode(clGetPlatformInfo(
p, i, required, buff, NULL), 
"Failed to get OpenCL platform information");
   127     opencl_device() : my_device_id( unknown ), my_cl_device_id( NULL ), my_cl_command_queue( NULL ) {}
   129     opencl_device( cl_device_id d_id ) : my_device_id( unknown ), my_cl_device_id( d_id ), my_cl_command_queue( NULL ) {}
   131     opencl_device( cl_device_id cl_d_id, 
device_id_type device_id ) : my_device_id( device_id ), my_cl_device_id( cl_d_id ), my_cl_command_queue( NULL ) {}
   134         return platform_info<std::string>( platform_id(), CL_PLATFORM_PROFILE );
   137         return platform_info<std::string>( platform_id(), CL_PLATFORM_VERSION );
   140         return platform_info<std::string>( platform_id(), CL_PLATFORM_NAME );
   143         return platform_info<std::string>( platform_id(), CL_PLATFORM_VENDOR );
   146         return platform_info<std::string>( platform_id(), CL_PLATFORM_EXTENSIONS );
   149     template <
typename T>
   150     void info( cl_device_info i, T &t )
 const {
   151         t = device_info<T>( my_cl_device_id, i );
   155         return device_info<std::string>( my_cl_device_id, CL_DEVICE_VERSION );
   159         std::sscanf( version().c_str(), 
"OpenCL %d", &major );
   164         std::sscanf( version().c_str(), 
"OpenCL %d.%d", &major, &minor );
   169         if ( major_version() >= 2 )
   170             return (device_info<cl_command_queue_properties>( my_cl_device_id, CL_DEVICE_QUEUE_ON_HOST_PROPERTIES ) & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) != 0;
   173             return (device_info<cl_command_queue_properties>( my_cl_device_id, CL_DEVICE_QUEUE_PROPERTIES ) & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) != 0;
   177         if ( major_version() >= 2 )
   178             return (device_info<cl_command_queue_properties>( my_cl_device_id, CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES ) & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) != 0;
   184         return device_info<std::array<size_t, 3>>( my_cl_device_id, CL_DEVICE_MAX_WORK_ITEM_SIZES );
   187         return device_info<size_t>( my_cl_device_id, CL_DEVICE_MAX_WORK_GROUP_SIZE );
   190         const std::string semi = 
";";
   192         return (semi + built_in_kernels() + semi).find( semi + k + semi ) != std::string::npos;
   195         return device_info<std::string>( my_cl_device_id, CL_DEVICE_BUILT_IN_KERNELS );
   198         return device_info<std::string>( my_cl_device_id, CL_DEVICE_NAME );
   201         return device_info<cl_bool>( my_cl_device_id, CL_DEVICE_AVAILABLE );
   204         return device_info<cl_bool>( my_cl_device_id, CL_DEVICE_COMPILER_AVAILABLE );
   207         return device_info<cl_bool>( my_cl_device_id, CL_DEVICE_LINKER_AVAILABLE );
   210         const std::string space = 
" ";
   212         return (space + extensions() + space).find( space + ext + space ) != std::string::npos;
   215         return device_info<std::string>( my_cl_device_id, CL_DEVICE_EXTENSIONS );
   219         return device_info<cl_device_type>( my_cl_device_id, CL_DEVICE_TYPE );
   223         return device_info<std::string>( my_cl_device_id, CL_DEVICE_VENDOR );
   227         return device_info<cl_uint>( my_cl_device_id, CL_DEVICE_ADDRESS_BITS );
   231         return my_cl_device_id;
   235         return my_cl_command_queue;
   239         my_cl_command_queue = cmd_queue;
   243         return device_info<cl_platform_id>( my_cl_device_id, CL_DEVICE_PLATFORM );
   254     template <
typename DeviceFilter>
   256     template <
typename Factory>
   258     template <
typename Factory>
   262     template <
typename T, 
typename Factory>
   279     bool empty()
 const { 
return my_container.empty(); }
   297     cl_uint num_platforms;
   298     enforce_cl_retcode(clGetPlatformIDs(0, NULL, &num_platforms), 
"clGetPlatformIDs failed");
   300     std::vector<cl_platform_id> platforms(num_platforms);
   301     enforce_cl_retcode(clGetPlatformIDs(num_platforms, platforms.data(), NULL), 
"clGetPlatformIDs failed");
   304     std::vector<cl_platform_id>::iterator platforms_it = platforms.begin();
   305     cl_uint num_all_devices = 0;
   306     while (platforms_it != platforms.end()) {
   307         cl_int err = clGetDeviceIDs(*platforms_it, CL_DEVICE_TYPE_ALL, 0, NULL, &num_devices);
   308         if (err == CL_DEVICE_NOT_FOUND) {
   309             platforms_it = platforms.erase(platforms_it);
   313             num_all_devices += num_devices;
   318     std::vector<cl_device_id> devices(num_all_devices);
   319     std::vector<cl_device_id>::iterator devices_it = devices.begin();
   320     for (
auto p = platforms.begin(); 
p != platforms.end(); ++
p) {
   321         enforce_cl_retcode(clGetDeviceIDs((*
p), CL_DEVICE_TYPE_ALL, (cl_uint)std::distance(devices_it, devices.end()), &*devices_it, &num_devices), 
"clGetDeviceIDs failed");
   322         devices_it += num_devices;
   325     for (
auto d = devices.begin(); 
d != devices.end(); ++
d) {
   329     return opencl_devices;
   335 namespace opencl_info {
   348     virtual void call() = 0;
   352 template <
typename Callback, 
typename T>
   364 template <
typename T, 
typename Factory = opencl_info::default_opencl_factory>
   383         if ( my_is_event && wait ) {
   391     const T& 
data( 
bool wait = 
true )
 const {
   392         if ( my_is_event && wait ) {
   401         my_data(dmsg.my_data), my_event(dmsg.my_event), my_is_event( dmsg.my_is_event ),
   402         my_callback_flag_ptr(dmsg.my_callback_flag_ptr)
   409         my_data(std::
move(dmsg.my_data)), my_event(dmsg.my_event), my_is_event(dmsg.my_is_event),
   410         my_callback_flag_ptr( std::
move(dmsg.my_callback_flag_ptr) )
   412         dmsg.my_is_event = 
false;
   439     cl_event 
const * 
get_event()
 const { 
return my_is_event ? &my_event : NULL; }
   442             cl_command_queue cq = event_info<cl_command_queue>( my_event, CL_EVENT_COMMAND_QUEUE );
   443             if ( cq != event_info<cl_command_queue>( e, CL_EVENT_COMMAND_QUEUE ) )
   449         clRetainEvent( my_event );
   454             enforce_cl_retcode( clFlush( event_info<cl_command_queue>( my_event, CL_EVENT_COMMAND_QUEUE ) ), 
"Failed to flush an OpenCL command queue" );
   460     template <
typename Callback>
   462         __TBB_ASSERT( my_is_event, 
"The OpenCL event is not set" );
   466     operator T&() { 
return data(); }
   467     operator const T&() 
const { 
return data(); }
   474         if (! my_callback_flag_ptr->fetch_and_store(
true)) {
   477                 register_callback([a](
const T& t) 
mutable {
   491         __TBB_ASSERT( event_command_exec_status == CL_COMPLETE, NULL );
   500     mutable bool my_is_event = 
false;
   505 template <
typename K, 
typename T, 
typename Factory>
   508     const T &t = dmsg.
data( 
false );
   510     return key_from_message<K, T>( t );
   513 template <
typename Factory>
   571                     my_factory->enqueue_unmap_buffer(device, *
this, 
d);
   601 template <
typename Factory>
   614         cl_buffer_region region = { index, 
size };
   615         this->
my_cl_mem = clCreateSubBuffer( m, 0, CL_BUFFER_CREATE_TYPE_REGION, ®ion, &err );
   624         this->
my_factory->enqueue_map_buffer( device, *
this, dmsg );
   628     template <
typename, 
typename>
   639 template <
typename T, 
typename Factory = opencl_info::default_opencl_factory>
   643 template <
typename T, 
typename Factory = opencl_info::default_opencl_factory>
   653     template <access_type a>
   655         T* ptr = (T*)my_impl->get_host_ptr();
   660     T* 
data()
 const { 
return &access<read_write>()[0]; }
   662     template <access_type a = read_write>
   665     template <access_type a = read_write>
   668     size_t size()
 const { 
return my_impl->size()/
sizeof(T); }
   670     T& operator[] ( ptrdiff_t k ) { 
return begin()[k]; }
   677         return my_impl->get_cl_mem();
   687         const cl_event *e = 
d.get_event();
   694         const cl_event *e = 
d.get_event();
   714     template <
typename, 
typename>
   718 template <
typename T, 
typename Factory>
   725         opencl_buffer<T, Factory>( *owner.my_impl->factory(), owner.native_object(), index, 
size ), my_owner( owner ) {}
   728 template <
typename T, 
typename Factory>
   734 #define is_typedef(type)                                                    \   735     template <typename T>                                                   \   737         template <typename C>                                               \   738         static std::true_type check( typename C::type* );                   \   739         template <typename C>                                               \   740         static std::false_type check( ... );                                \   742         static const bool value = decltype(check<T>(0))::value;             \   748 template <
typename T>
   750     return t.native_object();
   753 template <
typename T>
   759 template <
typename T, 
typename Factory>
   761     const T &t = dmsg.
data( 
false );
   762     typedef typename T::memory_object_type mem_obj_t;
   763     mem_obj_t mem_obj = t.memory_object();
   766     mem_obj.send( device, 
d );
   767     if ( 
d.get_event() ) dmsg.
set_event( *
d.get_event() );
   770 template <
typename T>
   772     typedef typename T::memory_object_type mem_obj_t;
   773     mem_obj_t mem_obj = t.memory_object();
   775     mem_obj.send( device, dmsg );
   778 template <
typename T>
   782 template <
typename T, 
typename Factory>
   784     const T &t = dmsg.
data( 
false );
   785     typedef typename T::memory_object_type mem_obj_t;
   786     mem_obj_t mem_obj = t.memory_object();
   789     mem_obj.receive( 
d );
   790     if ( 
d.get_event() ) dmsg.
set_event( *
d.get_event() );
   793 template <
typename T>
   801     template <
typename G = std::initializer_list<
int>, 
typename L = std::initializer_list<
int>,
   802         typename = 
typename std::enable_if<!std::is_same<
typename std::decay<G>::type, opencl_range>::value>::type>
   803     opencl_range(G&& global_work = std::initializer_list<int>({ 0 }), L&& local_work = std::initializer_list<int>({ 0, 0, 0 })) {
   804         auto g_it = global_work.begin();
   805         auto l_it = local_work.begin();
   806         my_global_work_size = { {size_t(-1), size_t(-1), size_t(-1)} };
   808         for (
int s = 0; 
s < 3 && g_it != global_work.end(); ++g_it, ++l_it, ++
s) {
   809             __TBB_ASSERT(l_it != local_work.end(), 
"global_work & local_work must have same size");
   810             my_global_work_size[
s] = *g_it;
   811             my_local_work_size[
s] = *l_it;
   823 template <
typename DeviceFilter>
   835             std::vector<char> kernel_name;
   836             for ( 
size_t curr_size = 32;; curr_size <<= 1 ) {
   837                 kernel_name.resize( curr_size <<= 1 );
   838                 enforce_cl_retcode( clGetKernelInfo( k.
my_cl_kernel, CL_KERNEL_FUNCTION_NAME, curr_size, kernel_name.data(), &ret_size ), 
"Failed to get kernel info" );
   839                 if ( ret_size < curr_size ) 
break;
   862         template <
typename DeviceFilter_>
   865         template <
typename Factory>
   877         if ( my_devices.size() ) {
   878             for ( 
auto d = my_devices.begin(); 
d != my_devices.end(); ++
d ) {
   879                 enforce_cl_retcode( clReleaseCommandQueue( (*d).my_cl_command_queue ), 
"Failed to release a command queue" );
   881             enforce_cl_retcode( clReleaseContext( my_cl_context ), 
"Failed to release a context" );
   887         if ( !my_devices.size() ) {
   888             my_devices = device_list;
   896     template <
typename Factory>
   902             e1 == NULL ? 0 : 1, e1, &e2, &err );
   904         dmsg.
data( 
false ) = ptr;
   910     template <
typename Factory>
   916            "Failed to unmap a buffer" );
   922     template <
size_t NUM_ARGS, 
typename T>
   925         enforce_cl_retcode( clSetKernelArg(kernel.my_cl_kernel, place++, 
sizeof(
p), &
p), 
"Failed to set a kernel argument" );
   928     template <
size_t NUM_ARGS, 
typename T, 
typename F>
   930         __TBB_ASSERT((
static_cast<typename std::array<cl_event, NUM_ARGS>::size_type
>(num_events) < events.size()), NULL);
   932         const cl_event * 
const e = msg.
get_event();
   934             events[num_events++] = *e;
   937         process_one_arg( kernel, events, num_events, place, msg.
data(
false) );
   940     template <
size_t NUM_ARGS, 
typename T, 
typename ...Rest>
   941     void process_arg_list( 
const kernel_type& kernel, std::array<cl_event, NUM_ARGS>& events, 
int& num_events, 
int& place, 
const T& t, 
const Rest&... args ) {
   942         process_one_arg( kernel, events, num_events, place, t );
   943         process_arg_list( kernel, events, num_events, place, args... );
   946     template <
size_t NUM_ARGS>
   949     template <
typename T>
   952     template <
typename T, 
typename F>
   957     template <
typename T, 
typename ...Rest>
   959         update_one_arg( e, t );
   960         update_arg_list( e, args... );
   966     template <
typename ...Args>
   968         std::array<cl_event, 
sizeof...(Args)> events;
   971         process_arg_list( kernel, events, num_events, place, args... );
   973         const cl_event e = send_kernel_impl( device, kernel.my_cl_kernel, work_size, num_events, events.data() );
   975         update_arg_list(e, args...);
   982     template <
typename T, 
typename ...Rest>
   985         send_data( device, args... );
   993         const range_type& work_size, cl_uint num_events, cl_event* event_list ) {
   998         for ( 
s = 1; 
s < 3 && g_size[
s] != size_t(-1); ++
s) {}
  1002                 g_offset.data(), g_size.data(), l_size[0] ? l_size.data() : NULL, num_events, num_events ? event_list : NULL, &
event ),
  1003             "Failed to enqueue a kernel" );
  1008     template <
typename T>
  1013     template <
typename T, 
typename F>
  1015         cl_event 
const *e_ptr = msg.
get_event();
  1017         if ( e_ptr != NULL ) {
  1025     template <
typename T, 
typename ...Rest>
  1027         if ( get_event_from_one_arg( e, t ) ) {
  1031         return get_event_from_args( e, args... );
  1041         virtual void operator() () {}
  1044     template<
typename Fn>
  1053         __TBB_ASSERT(event_command_exec_status == CL_COMPLETE, NULL);
  1055         finalize_fn * 
const fn_ptr = static_cast<finalize_fn*>(
data);
  1056         __TBB_ASSERT(fn_ptr != NULL, 
"Invalid finalize function pointer");
  1063     template <
typename FinalizeFn, 
typename ...Args>
  1067         if ( get_event_from_args( e, args... ) ) {
  1069                 new finalize_fn_leaf<FinalizeFn>(
fn) ), 
"Failed to set a callback" );
  1094         return my_cl_context;
  1100             if (!my_devices.size())
  1104         enforce_cl_retcode(my_devices.size() ? CL_SUCCESS : CL_INVALID_DEVICE, 
"No devices in the device list");
  1105         cl_platform_id platform_id = my_devices.begin()->platform_id();
  1107             enforce_cl_retcode(it->platform_id() == platform_id ? CL_SUCCESS : CL_INVALID_PLATFORM, 
"All devices should be in the same platform");
  1109         std::vector<cl_device_id> cl_device_ids;
  1110         for (
auto d = my_devices.begin(); 
d != my_devices.end(); ++
d) {
  1111             cl_device_ids.push_back((*d).my_cl_device_id);
  1114         cl_context_properties context_properties[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)platform_id, (cl_context_properties)NULL };
  1116         cl_context ctx = clCreateContext(context_properties,
  1117             (cl_uint)cl_device_ids.size(),
  1118             cl_device_ids.data(),
  1121         my_cl_context = ctx;
  1123         size_t device_counter = 0;
  1124         for (
auto d = my_devices.begin(); 
d != my_devices.end(); 
d++) {
  1125             (*d).my_device_id = device_counter++;
  1127             cl_command_queue cq;
  1129             if ((*d).major_version() >= 2) {
  1130                 if ((*d).out_of_order_exec_mode_on_host_present()) {
  1131                     cl_queue_properties props[] = { CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, 0 };
  1132                     cq = clCreateCommandQueueWithProperties(ctx, (*d).my_cl_device_id, props, &err2);
  1134                     cl_queue_properties props[] = { 0 };
  1135                     cq = clCreateCommandQueueWithProperties(ctx, (*d).my_cl_device_id, props, &err2);
  1140                 cl_command_queue_properties props = (*d).out_of_order_exec_mode_on_host_present() ? CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE : 0;
  1142 #if __TBB_GCC_WARNING_SUPPRESSION_PRESENT  1143 #pragma GCC diagnostic push  1144 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"  1146 #if _MSC_VER || __INTEL_COMPILER  1147 #pragma warning( push )  1148 #if __INTEL_COMPILER  1149 #pragma warning (disable: 1478)  1151 #pragma warning (disable: 4996)  1154                 cq = clCreateCommandQueue(ctx, (*d).my_cl_device_id, props, &err2);
  1155 #if _MSC_VER || __INTEL_COMPILER  1156 #pragma warning( pop )  1158 #if __TBB_GCC_WARNING_SUPPRESSION_PRESENT  1159 #pragma GCC diagnostic pop  1163             (*d).my_cl_command_queue = cq;
  1173     template <
typename Factory>
  1175     template <
typename Factory>
  1177     template <
typename Factory>
  1182 namespace opencl_info {
  1186 template <
typename Factory>
  1189         __TBB_ASSERT(!f.devices().empty(), 
"No available devices");
  1190         return *(f.devices().begin());
  1197         cl_platform_id platform_id = devices.
begin()->platform_id();
  1199             if (it->platform_id() == platform_id) {
  1224 template <
typename T, 
typename Factory>
  1234 template <
typename Factory = opencl_info::default_opencl_factory>
  1250         std::call_once( my_do_once_flag, [](){} );
  1254         return kernel_type( get_cl_kernel(k), my_factory );
  1258     opencl_program( Factory& factory, cl_program program ) : my_factory( factory ), my_cl_program( program ) {
  1260         std::call_once( my_do_once_flag, [](){} );
  1264         std::call_once( my_do_once_flag, [
this, &k](){ this->init( k ); } );
  1266         cl_kernel kernel = clCreateKernel( my_cl_program, k.c_str(), &err );
  1274             std::ifstream file_descriptor( filepath, std::ifstream::binary );
  1275             if ( !file_descriptor.is_open() ) {
  1276                 std::string str = std::string( 
"Could not open file: " ) + filepath;
  1277                 std::cerr << str << std::endl;
  1280             file_descriptor.seekg( 0, file_descriptor.end );
  1281             size_t length = size_t( file_descriptor.tellg() );
  1282             file_descriptor.seekg( 0, file_descriptor.beg );
  1283             my_content.resize( 
length );
  1284             char* 
begin = &*my_content.begin();
  1286             file_descriptor.close();
  1288         const char* 
content() { 
return &*my_content.cbegin(); }
  1289         size_t length() { 
return my_content.length(); }
  1296         typedef void (CL_CALLBACK *cl_callback_type)(cl_program, 
void*);
  1298                                 cl_uint num_devices, cl_device_id* device_list,
  1299                                 const char* options, cl_callback_type 
callback,
  1301             cl_int err = clBuildProgram( program, num_devices, device_list, options,
  1303             if( err == CL_SUCCESS )
  1305             std::string str = std::string( 
"Failed to build program: " ) + 
name;
  1306             if ( err == CL_BUILD_PROGRAM_FAILURE ) {
  1308                 for ( 
auto d = devices.
begin(); 
d != devices.
end(); ++
d ) {
  1309                     std::cerr << 
"Build log for device: " << (*d).name() << std::endl;
  1311                     cl_int query_err = clGetProgramBuildInfo(
  1312                         program, (*d).my_cl_device_id, CL_PROGRAM_BUILD_LOG, 0, NULL,
  1316                         std::vector<char> output;
  1317                         output.resize( log_size );
  1318                         query_err = clGetProgramBuildInfo(
  1319                             program, (*d).my_cl_device_id, CL_PROGRAM_BUILD_LOG,
  1320                             output.size(), output.data(), NULL );
  1322                         std::cerr << output.data() << std::endl;
  1324                         std::cerr << 
"No build log available" << std::endl;
  1334         template<
typename Filter>
  1336                               Filter 
filter, 
const char* message ) {
  1337             for ( cl_uint i = 0; i < num_devices; ++i )
  1338                 if ( 
filter(device_list[i]) ) {
  1339                     device_list[i--] = device_list[--num_devices];
  1346     void init( 
const std::string& )
 const {
  1347         cl_uint num_devices;
  1348         enforce_cl_retcode( clGetContextInfo( my_factory.context(), CL_CONTEXT_NUM_DEVICES, 
sizeof( num_devices ), &num_devices, NULL ),
  1349             "Failed to get OpenCL context info" );
  1352         cl_device_id *device_list = (cl_device_id *)alloca( num_devices*
sizeof( cl_device_id ) );
  1353         enforce_cl_retcode( clGetContextInfo( my_factory.context(), CL_CONTEXT_DEVICES, num_devices*
sizeof( cl_device_id ), device_list, NULL ),
  1354             "Failed to get OpenCL context info" );
  1355         const char *options = NULL;
  1356         switch ( my_type ) {
  1359             const char *
s[] = { fr.
content() };
  1360             const size_t l[] = { fr.
length() };
  1362             my_cl_program = clCreateProgramWithSource( my_factory.context(), 1, 
s, l, &err );
  1365                 num_devices, device_list,
  1367                     return !
d.compiler_available() || !
d.linker_available();
  1368                 }, 
"No one device supports building program from sources" );
  1370                 my_factory, my_arg_str, my_cl_program, num_devices, device_list,
  1371                 options,  NULL, NULL );
  1375             options = 
"-x spir";
  1378             std::vector<const unsigned char*> 
s(
  1379                 num_devices, reinterpret_cast<const unsigned char*>(fr.
content()) );
  1380             std::vector<size_t> l( num_devices, fr.
length() );
  1381             std::vector<cl_int> bin_statuses( num_devices, -1 );
  1383             my_cl_program = clCreateProgramWithBinary( my_factory.context(), num_devices,
  1384                                                        device_list, l.data(), 
s.data(),
  1385                                                        bin_statuses.data(), &err );
  1386             if( err != CL_SUCCESS ) {
  1387                 std::string statuses_str;
  1388                 for (
auto st = bin_statuses.begin(); st != bin_statuses.end(); ++st) {
  1389                     statuses_str += std::to_string((*st));
  1392                 enforce_cl_retcode( err, std::string( 
"Failed to create program, error " + std::to_string( err ) + 
" : " ) + my_arg_str +
  1393                                     std::string( 
", binary_statuses = " ) + statuses_str );
  1396                 my_factory, my_arg_str, my_cl_program, num_devices, device_list,
  1397                 options,  NULL, NULL );
  1411     template <
typename DeviceFilter>
  1414     friend class Factory::kernel;
  1417 template<
typename... Args>
  1420 template<
typename JP, 
typename Factory, 
typename... Ports>
  1428         : 
base_type( g, kernel, opencl_info::default_device_selector< opencl_info::default_opencl_factory >(), opencl_info::
default_factory() )
  1434         : 
base_type( g, kernel, opencl_info::default_device_selector <Factory >(), f )
  1439     template <
typename DeviceSelector>
  1447 template<
typename JP, 
typename... Ports>
  1449 opencl_node< tuple<Ports...>, JP > : 
public opencl_node < tuple<Ports...>, JP, opencl_info::default_opencl_factory > {
  1455         : 
base_type( g, kernel, opencl_info::default_device_selector< opencl_info::default_opencl_factory >(), opencl_info::
default_factory() )
  1458     template <
typename DeviceSelector>
  1464 template<
typename... Ports>
  1466 opencl_node< tuple<Ports...> > : 
public opencl_node < tuple<Ports...>, queueing, opencl_info::default_opencl_factory > {
  1472         : 
base_type( g, kernel, opencl_info::default_device_selector< opencl_info::default_opencl_factory >(), opencl_info::
default_factory() )
  1475     template <
typename DeviceSelector>
  1487 using interface11::opencl_buffer;
  1489 using interface11::opencl_device;
  1490 using interface11::opencl_device_list;
  1491 using interface11::opencl_program;
  1493 using interface11::opencl_async_msg;
  1494 using interface11::opencl_factory;
  1495 using interface11::opencl_range;
  1502 #undef __TBB_flow_graph_opencl_node_H_include_area  1504 #endif // __TBB_flow_graph_opencl_node_H 
std::once_flag my_do_once_flag
 
container_type::const_iterator const_iterator
 
opencl_buffer< T, Factory > my_owner
 
opencl_subbuffer(const opencl_buffer< T, Factory > &owner, size_t index, size_t size)
 
friend bool operator==(opencl_device d1, opencl_device d2)
 
const opencl_buffer & memory_object() const
 
opencl_memory(Factory &f)
 
void receive(const opencl_async_msg< opencl_buffer, Factory > &dependency) const
 
void enqueue_unmap_buffer(opencl_device device, opencl_memory< Factory > &memory, opencl_async_msg< void *, Factory > &dmsg)
 
void update_one_arg(cl_event, T &)
 
bool out_of_order_exec_mode_on_device_present() const
 
std::enable_if< is_native_object_type< T >::value, typename T::native_object_type >::type get_native_object(const T &t)
 
opencl_async_msg(opencl_async_msg &&dmsg)
 
opencl_program(const std::string &program_name)
 
opencl_device_filter(cl_uint &num_devices, cl_device_id *device_list, Filter filter, const char *message)
 
std::shared_ptr< impl_type > my_impl
 
cl_bool linker_available() const
 
std::string vendor() const
 
base_type::kernel_type kernel_type
 
T event_info(cl_event e, cl_event_info i)
 
cl_event my_sending_event
 
iterator< a > end() const
 
std::string built_in_kernels() const
 
opencl_async_msg(const T &data, cl_event event)
 
const T & data(bool wait=true) const
 
opencl_device device_type
 
K key_from_message(const opencl_async_msg< T, Factory > &dmsg)
 
void process_arg_list(const kernel_type &kernel, std::array< cl_event, NUM_ARGS > &events, int &num_events, int &place, const T &t, const Rest &... args)
 
opencl_node(graph &g, const kernel_type &kernel, Factory &f)
 
void finalize(opencl_device device, FinalizeFn fn, Args &... args)
 
bool get_event_from_one_arg(cl_event &, const T &)
 
void enqueue_map_buffer(opencl_device device, opencl_buffer_impl< Factory > &buffer, opencl_async_msg< void *, Factory > &dmsg)
 
opencl_program(Factory &factory, const std::string &program_name)
 
opencl_device(cl_device_id d_id)
 
void map_memory(opencl_device device, opencl_async_msg< void *, Factory > &dmsg) __TBB_override
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark d __itt_event ITT_FORMAT __itt_group_mark d void const wchar_t const wchar_t int ITT_FORMAT __itt_group_sync __itt_group_fsync x void const wchar_t int const wchar_t int int ITT_FORMAT __itt_group_sync __itt_group_fsync x void ITT_FORMAT __itt_group_sync __itt_group_fsync p void ITT_FORMAT __itt_group_sync __itt_group_fsync p void size_t ITT_FORMAT lu no args __itt_obj_prop_t __itt_obj_state_t ITT_FORMAT d const char ITT_FORMAT s const char ITT_FORMAT s __itt_frame ITT_FORMAT p __itt_counter ITT_FORMAT p __itt_counter unsigned long long ITT_FORMAT lu __itt_counter unsigned long long ITT_FORMAT lu __itt_counter __itt_clock_domain unsigned long long void ITT_FORMAT p const wchar_t ITT_FORMAT S __itt_mark_type const wchar_t ITT_FORMAT S __itt_mark_type const char ITT_FORMAT s __itt_mark_type ITT_FORMAT d __itt_caller ITT_FORMAT p __itt_caller ITT_FORMAT p no args const __itt_domain __itt_clock_domain unsigned long long __itt_id ITT_FORMAT lu const __itt_domain __itt_clock_domain unsigned long long __itt_id __itt_id void * fn
 
opencl_program_type my_type
 
opencl_buffer memory_object_type
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp begin
 
device_id_type my_device_id
 
bool init(const opencl_device_list &device_list)
 
bool my_sending_event_present
 
opencl_async_msg< void *, Factory > receive(const cl_event *e)
 
opencl_device(cl_device_id cl_d_id, device_id_type device_id)
 
opencl_factory< DeviceFilter > factory_type
 
void send(opencl_device device, opencl_async_msg< opencl_buffer, Factory > &dependency) const
 
std::string platform_name() const
 
void set_command_queue(cl_command_queue cmd_queue)
 
tbb::spin_mutex my_sending_lock
 
A lock that occupies a single byte.
 
iterator< a > begin() const
 
std::vector< opencl_device > container_type
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t size
 
std::string platform_vendor() const
 
Factory::kernel_type kernel_type
 
opencl_async_msg(const T &data)
 
opencl_device_list operator()(const opencl_device_list &devices)
 
Base class for types that should not be assigned.
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark d __itt_event event
 
opencl_node(graph &g, const kernel_type &kernel)
 
iterator< a > access() const
 
bool out_of_order_exec_mode_on_host_present() const
 
opencl_buffer_impl(size_t size, Factory &f)
 
void init(const std::string &) const
 
kernel(const cl_kernel &k, factory_type &f)
 
std::string platform_profile() const
 
Factory opencl_factory_type
 
#define __TBB_DEPRECATED_IN_VERBOSE_MODE
 
bool get_event_from_one_arg(cl_event &e, const opencl_async_msg< T, F > &msg)
 
bool extension_available(const std::string &ext) const
 
factory_type & my_factory
 
opencl_device_list(std::initializer_list< opencl_device > il)
 
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
 
T device_info(cl_device_id d, cl_device_info i)
 
opencl_program(Factory &factory, cl_program program)
 
container_type my_container
 
bool is_same_context(opencl_device::device_id_type d1, opencl_device::device_id_type d2)
 
file_reader(const std::string &filepath)
 
opencl_async_msg & operator=(const opencl_async_msg &dmsg)
 
static void fgt_multiinput_multioutput_node(void *, string_index, void *, void *)
 
cl_device_type type() const
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void * data
 
opencl_node< tuple< Ports... >, queueing, opencl_info::default_opencl_factory > base_type
 
default_opencl_factory & default_factory()
 
opencl_async_msg< void *, Factory > send(opencl_device device, const cl_event *e)
 
const opencl_device_list & available_devices()
 
T platform_info(cl_platform_id p, cl_platform_info i)
 
#define __TBB_STATIC_ASSERT(condition, msg)
 
opencl_program(Factory &factory, const char *program_name)
 
class __TBB_DEPRECATED_IN_VERBOSE_MODE opencl_subbuffer
 
tbb::atomic< opencl_device::device_id_type > my_curr_device_id
 
bool get_event_from_args(cl_event &)
 
nd_range_type my_global_work_size
 
Factory * factory() const
 
void info(cl_device_info i, T &t) const
 
void process_one_arg(const kernel_type &kernel, std::array< cl_event, NUM_ARGS > &events, int &num_events, int &place, const opencl_async_msg< T, F > &msg)
 
void process_one_arg(const kernel_type &kernel, std::array< cl_event, NUM_ARGS > &, int &, int &place, const T &t)
 
cl_event const  * get_event() const
 
cl_platform_id platform_id() const
 
bool get_event_from_args(cl_event &e, const T &t, const Rest &... args)
 
tbb::spin_mutex my_devices_mutex
 
nd_range_type my_local_work_size
 
opencl_node(graph &g, const kernel_type &kernel)
 
void send_data(opencl_device device, T &t, Rest &... args)
 
friend bool operator==(const opencl_buffer< T, Factory > &lhs, const opencl_buffer< T, Factory > &rhs)
 
const opencl_device_list & devices()
 
cl_mem native_object() const
 
cl_command_queue my_cl_command_queue
 
cl_event send_kernel_impl(opencl_device device, const cl_kernel &kernel, const range_type &work_size, cl_uint num_events, cl_event *event_list)
 
std::enable_if< is_memory_object_type< T >::value >::type receive_if_memory_object(const opencl_async_msg< T, Factory > &dmsg)
 
cl_uint address_bits() const
 
void send_kernel(opencl_device device, const kernel_type &kernel, const range_type &work_size, Args &... args)
 
void update_one_arg(cl_event e, opencl_async_msg< T, F > &msg)
 
opencl_async_msg(const opencl_async_msg &dmsg)
 
void const char const char int ITT_FORMAT __itt_group_sync p
 
opencl_program(const opencl_program &src)
 
std::string platform_version() const
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d
 
opencl_program(opencl_program_type type, const std::string &program_name)
 
streaming_node< tuple< Ports... >, JP, Factory > base_type
 
opencl_subbuffer< T, Factory > subbuffer(size_t index, size_t size) const
 
void send_data(opencl_device)
 
virtual void map_memory(opencl_device, opencl_async_msg< void *, Factory > &)=0
 
base_type::kernel_type kernel_type
 
std::array< range_index_type, 3 > nd_range_type
 
class __TBB_DEPRECATED streaming_node
 
cl_command_queue command_queue() const
 
Represents acquisition of a mutex.
 
container_type::iterator iterator
 
opencl_buffer_impl(cl_mem m, size_t index, size_t size, Factory &f)
 
void update_arg_list(cl_event e, T &t, Rest &... args)
 
Base class for types that should not be copied or assigned.
 
opencl_device_list my_devices
 
static void CL_CALLBACK finalize_callback(cl_event, cl_int event_command_exec_status, void *data)
 
static void CL_CALLBACK register_callback_func(cl_event, cl_int event_command_exec_status, void *data)
 
friend default_opencl_factory & default_factory()
 
opencl_buffer_impl< Factory > impl_type
 
opencl_node(graph &g, const kernel_type &kernel, DeviceSelector d)
 
opencl_node(graph &g, const kernel_type &kernel)
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name
 
cl_mem get_cl_mem() const
 
cl_bool available() const
 
cl_device_id my_cl_device_id
 
std::shared_ptr< tbb::atomic< bool > > my_callback_flag_ptr
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t length
 
void finalize() const __TBB_override
 
std::once_flag my_once_flag
 
void update_arg_list(cl_event)
 
std::string extensions() const
 
opencl_node< tuple< Ports... >, JP, opencl_info::default_opencl_factory > base_type
 
void const char const char int ITT_FORMAT __itt_group_sync s
 
opencl_device operator()(Factory &f)
 
is_typedef(native_object_type)
 
opencl_node(graph &g, const kernel_type &kernel, DeviceSelector d, Factory &f)
 
void register_callback(Callback c) const
 
bool built_in_kernel_available(const std::string &k) const
 
const_iterator begin() const
 
class __TBB_DEPRECATED_IN_VERBOSE_MODE opencl_node
 
void process_arg_list(const kernel_type &, std::array< cl_event, NUM_ARGS > &, int &, int &)
 
opencl_buffer(Factory &f, cl_mem m, size_t index, size_t size)
 
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
 
void call() __TBB_override
 
const nd_range_type & global_range() const
 
void enforce_cl_retcode(cl_int err, std::string msg)
 
opencl_program(const char *program_name)
 
void set_event(cl_event e) const
 
container_type::size_type size_type
 
size_t max_work_group_size() const
 
opencl_device_list find_available_devices()
 
opencl_buffer(Factory &f, size_t size)
 
base_type::kernel_type kernel_type
 
std::enable_if< is_memory_object_type< T >::value >::type send_if_memory_object(opencl_device device, opencl_async_msg< T, Factory > &dmsg)
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void * lock
 
const_iterator end() const
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
 
opencl_range(G &&global_work=std::initializer_list< int >({ 0 }), L &&local_work=std::initializer_list< int >({ 0, 0, 0 }))
 
std::string platform_extensions() const
 
cl_device_id device_id() const
 
int minor_version() const
 
std::array< size_t, 3 > max_work_item_sizes() const
 
default_opencl_factory()=default
 
callback(Callback c, const T &t)
 
opencl_program(Factory &factory, opencl_program_type type, const std::string &program_name)
 
const_iterator cbegin() const
 
cl_kernel get_cl_kernel(const std::string &k) const
 
void add(opencl_device d)
 
opencl_program(opencl_program_type type)
 
int major_version() const
 
const_iterator cend() const
 
cl_bool compiler_available() const
 
const nd_range_type & local_range() const
 
kernel_type get_kernel(const std::string &k) const
 
cl_mem native_object_type
 
opencl_node(graph &g, const kernel_type &kernel, DeviceSelector d)
 
The graph related classes and functions.
 
std::string version() const
 
K key_from_message(const T &t)
 
opencl_program_builder(Factory &f, const std::string &name, cl_program program, cl_uint num_devices, cl_device_id *device_list, const char *options, cl_callback_type callback, void *user_data)
 
void move(tbb_thread &t1, tbb_thread &t2)