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_type & | global_range () const
const nd_range_type & | local_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

typedef std::array<range_index_type, 3> tbb::flow::interface11::opencl_range::nd_range_type

Definition at line 785 of file flow_graph_opencl_node.h.

## range_index_type

typedef size_t tbb::flow::interface11::opencl_range::range_index_type

Definition at line 784 of file flow_graph_opencl_node.h.

## 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.

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

## 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.

{ 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.

{ 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:

- flow_graph_opencl_node.h

__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.