Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface11::opencl_range Class Reference

#include <flow_graph_opencl_node.h>

Collaboration diagram for tbb::flow::interface11::opencl_range:

Public Types

typedef size_t range_index_type
 
typedef std::array< range_index_type, 3 > nd_range_type
 

Public Member Functions

template<typename G = std::initializer_list<int>, typename L = std::initializer_list<int>, typename = typename std::enable_if<!std::is_same<typename std::decay<G>::type, opencl_range>::value>::type>
 opencl_range (G &&global_work=std::initializer_list< int >({ 0 }), L &&local_work=std::initializer_list< int >({ 0, 0, 0 }))
 
const nd_range_typeglobal_range () const
 
const nd_range_typelocal_range () const
 

Private Attributes

nd_range_type my_global_work_size
 
nd_range_type my_local_work_size
 

Detailed Description

Definition at line 782 of file flow_graph_opencl_node.h.

Member Typedef Documentation

◆ nd_range_type

◆ range_index_type

Constructor & Destructor Documentation

◆ opencl_range()

template<typename G = std::initializer_list<int>, typename L = std::initializer_list<int>, typename = typename std::enable_if<!std::is_same<typename std::decay<G>::type, opencl_range>::value>::type>
tbb::flow::interface11::opencl_range::opencl_range ( G &&  global_work = std::initializer_list<int>({ 0 }),
L &&  local_work = std::initializer_list<int>({ 0, 0, 0 }) 
)
inline

Definition at line 789 of file flow_graph_opencl_node.h.

789  { 0 }), L&& local_work = std::initializer_list<int>({ 0, 0, 0 })) {
790  auto g_it = global_work.begin();
791  auto l_it = local_work.begin();
792  my_global_work_size = { {size_t(-1), size_t(-1), size_t(-1)} };
793  // my_local_work_size is still uninitialized
794  for (int s = 0; s < 3 && g_it != global_work.end(); ++g_it, ++l_it, ++s) {
795  __TBB_ASSERT(l_it != local_work.end(), "global_work & local_work must have same size");
796  my_global_work_size[s] = *g_it;
797  my_local_work_size[s] = *l_it;
798  }
799  }

Member Function Documentation

◆ global_range()

const nd_range_type& tbb::flow::interface11::opencl_range::global_range ( ) const
inline

Definition at line 801 of file flow_graph_opencl_node.h.

801 { return my_global_work_size; }

References my_global_work_size.

Referenced by tbb::flow::interface11::opencl_factory< default_device_filter >::send_kernel_impl().

Here is the caller graph for this function:

◆ local_range()

const nd_range_type& tbb::flow::interface11::opencl_range::local_range ( ) const
inline

Definition at line 802 of file flow_graph_opencl_node.h.

802 { return my_local_work_size; }

References my_local_work_size.

Referenced by tbb::flow::interface11::opencl_factory< default_device_filter >::send_kernel_impl().

Here is the caller graph for this function:

Member Data Documentation

◆ my_global_work_size

nd_range_type tbb::flow::interface11::opencl_range::my_global_work_size
private

Definition at line 805 of file flow_graph_opencl_node.h.

Referenced by global_range().

◆ my_local_work_size

nd_range_type tbb::flow::interface11::opencl_range::my_local_work_size
private

Definition at line 806 of file flow_graph_opencl_node.h.

Referenced by local_range().


The documentation for this class was generated from the following file:
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
s
void const char const char int ITT_FORMAT __itt_group_sync s
Definition: ittnotify_static.h:91
tbb::flow::interface11::opencl_range::my_global_work_size
nd_range_type my_global_work_size
Definition: flow_graph_opencl_node.h:805
tbb::flow::interface11::opencl_range::my_local_work_size
nd_range_type my_local_work_size
Definition: flow_graph_opencl_node.h:806

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.