Identifies an instance of the function object executing at each point in an nd_range. More...
#include <sycl/nd_item.hpp>
Public Member Functions | |
id< Dimensions > | get_global_id () const |
size_t __SYCL_ALWAYS_INLINE | get_global_id (int Dimension) const |
size_t __SYCL_ALWAYS_INLINE | get_global_linear_id () const |
id< Dimensions > | get_local_id () const |
size_t __SYCL_ALWAYS_INLINE | get_local_id (int Dimension) const |
size_t | get_local_linear_id () const |
group< Dimensions > | get_group () const |
sub_group | get_sub_group () const |
size_t __SYCL_ALWAYS_INLINE | get_group (int Dimension) const |
size_t __SYCL_ALWAYS_INLINE | get_group_linear_id () const |
range< Dimensions > | get_group_range () const |
size_t __SYCL_ALWAYS_INLINE | get_group_range (int Dimension) const |
range< Dimensions > | get_global_range () const |
size_t | get_global_range (int Dimension) const |
range< Dimensions > | get_local_range () const |
size_t | get_local_range (int Dimension) const |
id< Dimensions > | get_offset () const |
nd_range< Dimensions > | get_nd_range () const |
void | barrier (access::fence_space accessSpace=access::fence_space::global_and_local) const |
template<access::mode accessMode = access::mode::read_write> | |
void | mem_fence (typename std::enable_if_t< accessMode==access::mode::read||accessMode==access::mode::write||accessMode==access::mode::read_write, access::fence_space > accessSpace=access::fence_space::global_and_local) const |
Executes a work-group mem-fence with memory ordering on the local address space, global address space or both based on the value of accessSpace . More... | |
template<typename dataT > | |
std::enable_if_t<!detail::is_bool< dataT >::value, device_event > | async_work_group_copy (local_ptr< dataT > dest, global_ptr< dataT > src, size_t numElements, size_t srcStride) const |
Asynchronously copies a number of elements specified by numElements from the source pointed by src to destination pointed by dest with a source stride specified by srcStride , and returns a SYCL device_event which can be used to wait on the completion of the copy. More... | |
template<typename dataT > | |
std::enable_if_t<!detail::is_bool< dataT >::value, device_event > | async_work_group_copy (global_ptr< dataT > dest, local_ptr< dataT > src, size_t numElements, size_t destStride) const |
Asynchronously copies a number of elements specified by numElements from the source pointed by src to destination pointed by dest with the destination stride specified by destStride , and returns a SYCL device_event which can be used to wait on the completion of the copy. More... | |
template<typename DestDataT , typename SrcDataT > | |
std::enable_if_t<!detail::is_bool< DestDataT >::value &&std::is_same_v< std::remove_const_t< SrcDataT >, DestDataT >, device_event > | async_work_group_copy (decorated_local_ptr< DestDataT > dest, decorated_global_ptr< SrcDataT > src, size_t numElements, size_t srcStride) const |
Asynchronously copies a number of elements specified by numElements from the source pointed by src to destination pointed by dest with a source stride specified by srcStride , and returns a SYCL device_event which can be used to wait on the completion of the copy. More... | |
template<typename DestDataT , typename SrcDataT > | |
std::enable_if_t<!detail::is_bool< DestDataT >::value &&std::is_same_v< std::remove_const_t< SrcDataT >, DestDataT >, device_event > | async_work_group_copy (decorated_global_ptr< DestDataT > dest, decorated_local_ptr< SrcDataT > src, size_t numElements, size_t destStride) const |
Asynchronously copies a number of elements specified by numElements from the source pointed by src to destination pointed by dest with the destination stride specified by destStride , and returns a SYCL device_event which can be used to wait on the completion of the copy. More... | |
template<typename T , access::address_space DestS, access::address_space SrcS> | |
std::enable_if_t< detail::is_scalar_bool< T >::value, device_event > | async_work_group_copy (multi_ptr< T, DestS, access::decorated::legacy > Dest, multi_ptr< T, SrcS, access::decorated::legacy > Src, size_t NumElements, size_t Stride) const |
Specialization for scalar bool type. More... | |
template<typename T , access::address_space DestS, access::address_space SrcS> | |
std::enable_if_t< detail::is_vector_bool< T >::value, device_event > | async_work_group_copy (multi_ptr< T, DestS, access::decorated::legacy > Dest, multi_ptr< T, SrcS, access::decorated::legacy > Src, size_t NumElements, size_t Stride) const |
Specialization for vector bool type. More... | |
template<typename DestT , access::address_space DestS, typename SrcT , access::address_space SrcS> | |
std::enable_if_t< detail::is_scalar_bool< DestT >::value &&std::is_same_v< std::remove_const_t< SrcT >, DestT >, device_event > | async_work_group_copy (multi_ptr< DestT, DestS, access::decorated::yes > Dest, multi_ptr< SrcT, SrcS, access::decorated::yes > Src, size_t NumElements, size_t Stride) const |
Specialization for scalar bool type. More... | |
template<typename DestT , access::address_space DestS, typename SrcT , access::address_space SrcS> | |
std::enable_if_t< detail::is_vector_bool< DestT >::value &&std::is_same_v< std::remove_const_t< SrcT >, DestT >, device_event > | async_work_group_copy (multi_ptr< DestT, DestS, access::decorated::yes > Dest, multi_ptr< SrcT, SrcS, access::decorated::yes > Src, size_t NumElements, size_t Stride) const |
Specialization for vector bool type. More... | |
template<typename dataT > | |
device_event | async_work_group_copy (local_ptr< dataT > dest, global_ptr< dataT > src, size_t numElements) const |
Asynchronously copies a number of elements specified by numElements from the source pointed by src to destination pointed by dest and returns a SYCL device_event which can be used to wait on the completion of the copy. More... | |
template<typename dataT > | |
device_event | async_work_group_copy (global_ptr< dataT > dest, local_ptr< dataT > src, size_t numElements) const |
Asynchronously copies a number of elements specified by numElements from the source pointed by src to destination pointed by dest and returns a SYCL device_event which can be used to wait on the completion of the copy. More... | |
template<typename DestDataT , typename SrcDataT > | |
std::enable_if_t< std::is_same_v< DestDataT, std::remove_const_t< SrcDataT > >, device_event > | async_work_group_copy (decorated_local_ptr< DestDataT > dest, decorated_global_ptr< SrcDataT > src, size_t numElements) const |
Asynchronously copies a number of elements specified by numElements from the source pointed by src to destination pointed by dest and returns a SYCL device_event which can be used to wait on the completion of the copy. More... | |
template<typename DestDataT , typename SrcDataT > | |
std::enable_if_t< std::is_same_v< DestDataT, std::remove_const_t< SrcDataT > >, device_event > | async_work_group_copy (decorated_global_ptr< DestDataT > dest, decorated_local_ptr< SrcDataT > src, size_t numElements) const |
Asynchronously copies a number of elements specified by numElements from the source pointed by src to destination pointed by dest and returns a SYCL device_event which can be used to wait on the completion of the copy. More... | |
template<typename... eventTN> | |
void | wait_for (eventTN... events) const |
sycl::ext::oneapi::experimental::root_group< Dimensions > | ext_oneapi_get_root_group () const |
nd_item (const nd_item &rhs)=default | |
nd_item (nd_item &&rhs)=default | |
nd_item & | operator= (const nd_item &rhs)=default |
nd_item & | operator= (nd_item &&rhs)=default |
bool | operator== (const nd_item &) const |
bool | operator!= (const nd_item &rhs) const |
Static Public Attributes | |
static constexpr int | dimensions = Dimensions |
Protected Member Functions | |
nd_item () | |
nd_item (const item< Dimensions, true > &, const item< Dimensions, false > &, const group< Dimensions > &) | |
void | waitForHelper () const |
void | waitForHelper (device_event Event) const |
template<typename T , typename... Ts> | |
void | waitForHelper (T E, Ts... Es) const |
id< Dimensions > | get_group_id () const |
Friends | |
class | detail::Builder |
Identifies an instance of the function object executing at each point in an nd_range.
Definition at line 48 of file nd_item.hpp.
|
default |
|
default |
|
inlineprotected |
Definition at line 514 of file nd_item.hpp.
|
inlineprotected |
Definition at line 515 of file nd_item.hpp.
|
inline |
Asynchronously copies a number of elements specified by numElements
from the source pointed by src
to destination pointed by dest
and returns a SYCL device_event which can be used to wait on the completion of the copy.
Permitted types for DestDataT are all scalar and vector types. SrcDataT must be either the same as DestDataT or const DestDataT.
Definition at line 488 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::async_work_group_copy().
|
inline |
Asynchronously copies a number of elements specified by numElements
from the source pointed by src
to destination pointed by dest
with the destination stride specified by destStride
, and returns a SYCL device_event which can be used to wait on the completion of the copy.
Permitted types for DestDataT are all scalar and vector types, except boolean. SrcDataT must be either the same as DestDataT or const DestDataT.
Definition at line 316 of file nd_item.hpp.
References __SYCL_OpGroupAsyncCopyLocalToGlobal(), and __spv::Scope::Workgroup.
|
inline |
Asynchronously copies a number of elements specified by numElements
from the source pointed by src
to destination pointed by dest
and returns a SYCL device_event which can be used to wait on the completion of the copy.
Permitted types for DestDataT are all scalar and vector types. SrcDataT must be either the same as DestDataT or const DestDataT.
Definition at line 473 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::async_work_group_copy().
|
inline |
Asynchronously copies a number of elements specified by numElements
from the source pointed by src
to destination pointed by dest
with a source stride specified by srcStride
, and returns a SYCL device_event which can be used to wait on the completion of the copy.
Permitted types for DestDataT are all scalar and vector types, except boolean. SrcDataT must be either the same as DestDataT or const DestDataT.
Definition at line 294 of file nd_item.hpp.
References __SYCL_OpGroupAsyncCopyGlobalToLocal(), and __spv::Scope::Workgroup.
|
inline |
Asynchronously copies a number of elements specified by numElements
from the source pointed by src
to destination pointed by dest
and returns a SYCL device_event which can be used to wait on the completion of the copy.
Permitted types for dataT are all scalar and vector types.
Definition at line 459 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::async_work_group_copy().
|
inline |
Asynchronously copies a number of elements specified by numElements
from the source pointed by src
to destination pointed by dest
with the destination stride specified by destStride
, and returns a SYCL device_event which can be used to wait on the completion of the copy.
Permitted types for dataT are all scalar and vector types, except boolean.
Definition at line 270 of file nd_item.hpp.
References __SYCL_OpGroupAsyncCopyLocalToGlobal(), and __spv::Scope::Workgroup.
|
inline |
Asynchronously copies a number of elements specified by numElements
from the source pointed by src
to destination pointed by dest
and returns a SYCL device_event which can be used to wait on the completion of the copy.
Permitted types for dataT are all scalar and vector types.
Definition at line 446 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::async_work_group_copy().
|
inline |
Asynchronously copies a number of elements specified by numElements
from the source pointed by src
to destination pointed by dest
with a source stride specified by srcStride
, and returns a SYCL device_event which can be used to wait on the completion of the copy.
Permitted types for dataT are all scalar and vector types, except boolean.
Definition at line 249 of file nd_item.hpp.
References __SYCL_OpGroupAsyncCopyGlobalToLocal(), and __spv::Scope::Workgroup.
Referenced by sycl::_V1::nd_item< Dimensions >::async_work_group_copy().
|
inline |
Specialization for scalar bool type.
Asynchronously copies a number of elements specified by NumElements
from the source pointed by Src
to destination pointed by Dest
with a stride specified by Stride
, and returns a SYCL device_event which can be used to wait on the completion of the copy.
Definition at line 391 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::async_work_group_copy(), sycl::_V1::detail::cast_AS(), and sycl::_V1::access::yes.
|
inline |
Specialization for vector bool type.
Asynchronously copies a number of elements specified by NumElements
from the source pointed by Src
to destination pointed by Dest
with a stride specified by Stride
, and returns a SYCL device_event which can be used to wait on the completion of the copy.
Definition at line 419 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::async_work_group_copy(), sycl::_V1::detail::cast_AS(), and sycl::_V1::access::yes.
|
inline |
Specialization for scalar bool type.
Asynchronously copies a number of elements specified by NumElements
from the source pointed by Src
to destination pointed by Dest
with a stride specified by Stride
, and returns a SYCL device_event which can be used to wait on the completion of the copy.
Definition at line 337 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::async_work_group_copy().
|
inline |
Specialization for vector bool type.
Asynchronously copies a number of elements specified by NumElements
from the source pointed by Src
to destination pointed by Dest
with a stride specified by Stride
, and returns a SYCL device_event which can be used to wait on the completion of the copy.
Definition at line 363 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::async_work_group_copy().
|
inline |
Definition at line 212 of file nd_item.hpp.
References __spirv_ControlBarrier(), sycl::_V1::detail::getSPIRVMemorySemanticsMask(), and __spv::Scope::Workgroup.
Referenced by syclcompat::experimental::nd_range_barrier(), sycl::_V1::detail::reduAuxCGFuncImplArrayHelper(), and sycl::_V1::detail::reduCGFuncImplArrayHelper().
|
inline |
Definition at line 499 of file nd_item.hpp.
|
inline |
Definition at line 52 of file nd_item.hpp.
Referenced by sycl::_V1::nd_item< Dimensions >::get_global_id(), sycl::_V1::nd_item< Dimensions >::get_global_linear_id(), and sycl::_V1::detail::writeNDItem().
|
inline |
Definition at line 62 of file nd_item.hpp.
References __SYCL_ASSUME_INT, and sycl::_V1::nd_item< Dimensions >::get_global_id().
|
inline |
Definition at line 68 of file nd_item.hpp.
References __SYCL_ASSUME_INT, sycl::_V1::Dimensions, sycl::_V1::nd_item< Dimensions >::get_global_id(), sycl::_V1::nd_item< Dimensions >::get_global_range(), and sycl::_V1::nd_item< Dimensions >::get_offset().
Referenced by sycl::_V1::detail::reduAuxCGFunc().
|
inline |
Definition at line 164 of file nd_item.hpp.
Referenced by sycl::_V1::nd_item< Dimensions >::get_global_linear_id(), sycl::_V1::nd_item< Dimensions >::get_global_range(), sycl::_V1::nd_item< Dimensions >::get_group(), and sycl::_V1::nd_item< Dimensions >::get_nd_range().
|
inline |
Definition at line 174 of file nd_item.hpp.
References __SYCL_ASSUME_INT, and sycl::_V1::nd_item< Dimensions >::get_global_range().
|
inline |
Definition at line 117 of file nd_item.hpp.
References sycl::_V1::detail::Builder::createGroup(), sycl::_V1::nd_item< Dimensions >::get_global_range(), sycl::_V1::nd_item< Dimensions >::get_group_id(), sycl::_V1::nd_item< Dimensions >::get_group_range(), and sycl::_V1::nd_item< Dimensions >::get_local_range().
Referenced by syclcompat::experimental::nd_range_barrier().
|
inline |
Definition at line 126 of file nd_item.hpp.
References __SYCL_ASSUME_INT, and sycl::_V1::nd_item< Dimensions >::get_group_id().
|
inlineprotected |
Definition at line 528 of file nd_item.hpp.
Referenced by sycl::_V1::nd_item< Dimensions >::get_group(), and sycl::_V1::nd_item< Dimensions >::get_group_linear_id().
|
inline |
Definition at line 132 of file nd_item.hpp.
References __SYCL_ASSUME_INT, sycl::_V1::Dimensions, sycl::_V1::nd_item< Dimensions >::get_group_id(), and sycl::_V1::nd_item< Dimensions >::get_group_range().
Referenced by sycl::_V1::detail::reduAuxCGFunc(), sycl::_V1::detail::reduAuxCGFuncImplArrayHelper(), sycl::_V1::detail::reduAuxCGFuncImplScalar(), sycl::_V1::detail::reduCGFuncImplArrayHelper(), and sycl::_V1::detail::reduCGFuncImplScalar().
|
inline |
Definition at line 148 of file nd_item.hpp.
Referenced by sycl::_V1::nd_item< Dimensions >::get_group(), sycl::_V1::nd_item< Dimensions >::get_group_linear_id(), sycl::_V1::nd_item< Dimensions >::get_group_range(), and syclcompat::experimental::nd_range_barrier().
|
inline |
Definition at line 158 of file nd_item.hpp.
References __SYCL_ASSUME_INT, and sycl::_V1::nd_item< Dimensions >::get_group_range().
|
inline |
Definition at line 85 of file nd_item.hpp.
Referenced by sycl::_V1::nd_item< Dimensions >::get_local_id(), sycl::_V1::nd_item< Dimensions >::get_local_linear_id(), and sycl::_V1::detail::writeNDItem().
|
inline |
Definition at line 95 of file nd_item.hpp.
References __SYCL_ASSUME_INT, and sycl::_V1::nd_item< Dimensions >::get_local_id().
|
inline |
Definition at line 101 of file nd_item.hpp.
References __SYCL_ASSUME_INT, sycl::_V1::Dimensions, sycl::_V1::nd_item< Dimensions >::get_local_id(), and sycl::_V1::nd_item< Dimensions >::get_local_range().
Referenced by sycl::_V1::detail::doTreeReduction(), syclcompat::experimental::logical_group::get_group_linear_id(), syclcompat::experimental::logical_group::get_local_linear_id(), syclcompat::experimental::logical_group::get_local_linear_range(), syclcompat::experimental::nd_range_barrier(), sycl::_V1::detail::reduAuxCGFunc(), sycl::_V1::detail::reduCGFuncImplArrayHelper(), and sycl::_V1::detail::reduCGFuncImplScalar().
|
inline |
Definition at line 180 of file nd_item.hpp.
Referenced by sycl::_V1::detail::doTreeReduction(), sycl::_V1::nd_item< Dimensions >::get_group(), sycl::_V1::nd_item< Dimensions >::get_local_linear_id(), sycl::_V1::nd_item< Dimensions >::get_local_range(), sycl::_V1::nd_item< Dimensions >::get_nd_range(), sycl::_V1::detail::reduAuxCGFunc(), sycl::_V1::detail::reduCGFuncImplArrayHelper(), and sycl::_V1::detail::reduCGFuncImplScalar().
|
inline |
Definition at line 190 of file nd_item.hpp.
References __SYCL_ASSUME_INT, and sycl::_V1::nd_item< Dimensions >::get_local_range().
|
inline |
Definition at line 207 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::get_global_range(), sycl::_V1::nd_item< Dimensions >::get_local_range(), and sycl::_V1::nd_item< Dimensions >::get_offset().
|
inline |
Definition at line 197 of file nd_item.hpp.
Referenced by sycl::_V1::nd_item< Dimensions >::get_global_linear_id(), and sycl::_V1::nd_item< Dimensions >::get_nd_range().
|
inline |
Definition at line 124 of file nd_item.hpp.
|
inline |
Executes a work-group mem-fence with memory ordering on the local address space, global address space or both based on the value of accessSpace
.
Definition at line 223 of file nd_item.hpp.
References __spirv_MemoryBarrier(), sycl::_V1::detail::getSPIRVMemorySemanticsMask(), and __spv::Scope::Workgroup.
|
inline |
Definition at line 510 of file nd_item.hpp.
|
default |
|
default |
|
inline |
Definition at line 509 of file nd_item.hpp.
|
inline |
Definition at line 494 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::waitForHelper().
|
inlineprotected |
Definition at line 518 of file nd_item.hpp.
Referenced by sycl::_V1::nd_item< Dimensions >::wait_for(), and sycl::_V1::nd_item< Dimensions >::waitForHelper().
|
inlineprotected |
Definition at line 520 of file nd_item.hpp.
References sycl::_V1::device_event::wait().
|
inlineprotected |
Definition at line 523 of file nd_item.hpp.
References sycl::_V1::nd_item< Dimensions >::waitForHelper().
|
friend |
Definition at line 513 of file nd_item.hpp.
|
staticconstexpr |
Definition at line 50 of file nd_item.hpp.