DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::nd_item< dimensions > Class Template Reference

Identifies an instance of the function object executing at each point in an nd_range. More...

#include <sycl/nd_item.hpp>

Public Member Functions

 nd_item ()=delete
 
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 >
device_event async_work_group_copy (local_ptr< dataT > dest, global_ptr< dataT > src, size_t numElements) const
 
template<typename dataT >
device_event async_work_group_copy (global_ptr< dataT > dest, local_ptr< dataT > src, size_t numElements) const
 
template<typename dataT >
device_event async_work_group_copy (local_ptr< dataT > dest, global_ptr< dataT > src, size_t numElements, size_t srcStride) const
 
template<typename dataT >
device_event async_work_group_copy (global_ptr< dataT > dest, local_ptr< dataT > src, size_t numElements, size_t destStride) const
 
template<typename... eventTN>
void wait_for (eventTN... events) const
 
 nd_item (const nd_item &rhs)=default
 
 nd_item (nd_item &&rhs)=default
 
nd_itemoperator= (const nd_item &rhs)=default
 
nd_itemoperator= (nd_item &&rhs)=default
 
bool operator== (const nd_item &rhs) const
 
bool operator!= (const nd_item &rhs) const
 

Protected Member Functions

 nd_item (const item< dimensions, true > &GL, const item< dimensions, false > &L, const group< dimensions > &GR)
 

Friends

class detail::Builder
 

Detailed Description

template<int dimensions = 1>
class sycl::_V1::nd_item< dimensions >

Identifies an instance of the function object executing at each point in an nd_range.

Definition at line 36 of file nd_item.hpp.

Constructor & Destructor Documentation

◆ nd_item() [1/4]

template<int dimensions = 1>
sycl::_V1::nd_item< dimensions >::nd_item ( )
delete

◆ nd_item() [2/4]

template<int dimensions = 1>
sycl::_V1::nd_item< dimensions >::nd_item ( const nd_item< dimensions > &  rhs)
default

◆ nd_item() [3/4]

template<int dimensions = 1>
sycl::_V1::nd_item< dimensions >::nd_item ( nd_item< dimensions > &&  rhs)
default

◆ nd_item() [4/4]

template<int dimensions = 1>
sycl::_V1::nd_item< dimensions >::nd_item ( const item< dimensions, true > &  GL,
const item< dimensions, false > &  L,
const group< dimensions > &  GR 
)
inlineprotected

Definition at line 183 of file nd_item.hpp.

Member Function Documentation

◆ async_work_group_copy() [1/4]

template<int dimensions = 1>
template<typename dataT >
device_event sycl::_V1::nd_item< dimensions >::async_work_group_copy ( global_ptr< dataT >  dest,
local_ptr< dataT >  src,
size_t  numElements 
) const
inline

Definition at line 141 of file nd_item.hpp.

◆ async_work_group_copy() [2/4]

template<int dimensions = 1>
template<typename dataT >
device_event sycl::_V1::nd_item< dimensions >::async_work_group_copy ( global_ptr< dataT >  dest,
local_ptr< dataT >  src,
size_t  numElements,
size_t  destStride 
) const
inline

Definition at line 156 of file nd_item.hpp.

◆ async_work_group_copy() [3/4]

template<int dimensions = 1>
template<typename dataT >
device_event sycl::_V1::nd_item< dimensions >::async_work_group_copy ( local_ptr< dataT >  dest,
global_ptr< dataT >  src,
size_t  numElements 
) const
inline

Definition at line 134 of file nd_item.hpp.

◆ async_work_group_copy() [4/4]

template<int dimensions = 1>
template<typename dataT >
device_event sycl::_V1::nd_item< dimensions >::async_work_group_copy ( local_ptr< dataT >  dest,
global_ptr< dataT >  src,
size_t  numElements,
size_t  srcStride 
) const
inline

Definition at line 148 of file nd_item.hpp.

◆ barrier()

◆ get_global_id() [1/2]

template<int dimensions = 1>
id<dimensions> sycl::_V1::nd_item< dimensions >::get_global_id ( ) const
inline

Definition at line 40 of file nd_item.hpp.

Referenced by sycl::_V1::detail::writeNDItem().

◆ get_global_id() [2/2]

template<int dimensions = 1>
size_t __SYCL_ALWAYS_INLINE sycl::_V1::nd_item< dimensions >::get_global_id ( int  dimension) const
inline

Definition at line 42 of file nd_item.hpp.

References __SYCL_ASSUME_INT.

◆ get_global_linear_id()

template<int dimensions = 1>
size_t __SYCL_ALWAYS_INLINE sycl::_V1::nd_item< dimensions >::get_global_linear_id ( ) const
inline

Definition at line 48 of file nd_item.hpp.

References __SYCL_ASSUME_INT.

Referenced by sycl::_V1::detail::reduAuxCGFunc().

◆ get_global_range() [1/2]

template<int dimensions = 1>
range<dimensions> sycl::_V1::nd_item< dimensions >::get_global_range ( ) const
inline

Definition at line 92 of file nd_item.hpp.

◆ get_global_range() [2/2]

template<int dimensions = 1>
size_t sycl::_V1::nd_item< dimensions >::get_global_range ( int  dimension) const
inline

Definition at line 94 of file nd_item.hpp.

◆ get_group() [1/2]

template<int dimensions = 1>
group<dimensions> sycl::_V1::nd_item< dimensions >::get_group ( ) const
inline

Definition at line 68 of file nd_item.hpp.

◆ get_group() [2/2]

template<int dimensions = 1>
size_t __SYCL_ALWAYS_INLINE sycl::_V1::nd_item< dimensions >::get_group ( int  dimension) const
inline

Definition at line 72 of file nd_item.hpp.

References __SYCL_ASSUME_INT.

◆ get_group_linear_id()

◆ get_group_range() [1/2]

template<int dimensions = 1>
range<dimensions> sycl::_V1::nd_item< dimensions >::get_group_range ( ) const
inline

Definition at line 84 of file nd_item.hpp.

◆ get_group_range() [2/2]

template<int dimensions = 1>
size_t __SYCL_ALWAYS_INLINE sycl::_V1::nd_item< dimensions >::get_group_range ( int  dimension) const
inline

Definition at line 86 of file nd_item.hpp.

References __SYCL_ASSUME_INT.

◆ get_local_id() [1/2]

template<int dimensions = 1>
id<dimensions> sycl::_V1::nd_item< dimensions >::get_local_id ( ) const
inline

Definition at line 54 of file nd_item.hpp.

Referenced by sycl::_V1::detail::writeNDItem().

◆ get_local_id() [2/2]

template<int dimensions = 1>
size_t __SYCL_ALWAYS_INLINE sycl::_V1::nd_item< dimensions >::get_local_id ( int  dimension) const
inline

Definition at line 56 of file nd_item.hpp.

References __SYCL_ASSUME_INT.

◆ get_local_linear_id()

template<int dimensions = 1>
size_t sycl::_V1::nd_item< dimensions >::get_local_linear_id ( ) const
inline

◆ get_local_range() [1/2]

template<int dimensions = 1>
range<dimensions> sycl::_V1::nd_item< dimensions >::get_local_range ( ) const
inline

◆ get_local_range() [2/2]

template<int dimensions = 1>
size_t sycl::_V1::nd_item< dimensions >::get_local_range ( int  dimension) const
inline

Definition at line 100 of file nd_item.hpp.

◆ get_nd_range()

template<int dimensions = 1>
nd_range<dimensions> sycl::_V1::nd_item< dimensions >::get_nd_range ( ) const
inline

Definition at line 107 of file nd_item.hpp.

◆ get_offset()

template<int dimensions = 1>
id<dimensions> sycl::_V1::nd_item< dimensions >::get_offset ( ) const
inline

Definition at line 105 of file nd_item.hpp.

◆ get_sub_group()

template<int dimensions = 1>
sub_group sycl::_V1::nd_item< dimensions >::get_sub_group ( ) const
inline

Definition at line 70 of file nd_item.hpp.

◆ mem_fence()

template<int dimensions = 1>
template<access::mode accessMode = access::mode::read_write>
void sycl::_V1::nd_item< dimensions >::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
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 123 of file nd_item.hpp.

◆ operator!=()

template<int dimensions = 1>
bool sycl::_V1::nd_item< dimensions >::operator!= ( const nd_item< dimensions > &  rhs) const
inline

Definition at line 179 of file nd_item.hpp.

◆ operator=() [1/2]

template<int dimensions = 1>
nd_item& sycl::_V1::nd_item< dimensions >::operator= ( const nd_item< dimensions > &  rhs)
default

◆ operator=() [2/2]

template<int dimensions = 1>
nd_item& sycl::_V1::nd_item< dimensions >::operator= ( nd_item< dimensions > &&  rhs)
default

◆ operator==()

template<int dimensions = 1>
bool sycl::_V1::nd_item< dimensions >::operator== ( const nd_item< dimensions > &  rhs) const
inline

Definition at line 174 of file nd_item.hpp.

◆ wait_for()

template<int dimensions = 1>
template<typename... eventTN>
void sycl::_V1::nd_item< dimensions >::wait_for ( eventTN...  events) const
inline

Definition at line 162 of file nd_item.hpp.

Friends And Related Function Documentation

◆ detail::Builder

template<int dimensions = 1>
friend class detail::Builder
friend

Definition at line 182 of file nd_item.hpp.


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