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>

Collaboration diagram for sycl::_V1::nd_item< Dimensions >:

Public Member Functions

 nd_item ()=delete
 
id< Dimensionsget_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< Dimensionsget_local_id () const
 
size_t __SYCL_ALWAYS_INLINE get_local_id (int Dimension) const
 
size_t get_local_linear_id () const
 
group< Dimensionsget_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< Dimensionsget_group_range () const
 
size_t __SYCL_ALWAYS_INLINE get_group_range (int Dimension) const
 
range< Dimensionsget_global_range () const
 
size_t get_global_range (int Dimension) const
 
range< Dimensionsget_local_range () const
 
size_t get_local_range (int Dimension) const
 
id< Dimensionsget_offset () const
 
nd_range< Dimensionsget_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 DestDataT , typename SrcDataT >
std::enable_if_t< std::is_same_v< DestDataT, std::remove_const_t< SrcDataT > >, device_eventasync_work_group_copy (decorated_local_ptr< DestDataT > dest, decorated_global_ptr< SrcDataT > src, size_t numElements) const
 
template<typename DestDataT , typename SrcDataT >
std::enable_if_t< std::is_same_v< DestDataT, std::remove_const_t< SrcDataT > >, device_eventasync_work_group_copy (decorated_global_ptr< DestDataT > dest, decorated_local_ptr< SrcDataT > src, size_t numElements) const
 
template<typename DestDataT , typename SrcDataT >
std::enable_if_t< std::is_same_v< DestDataT, std::remove_const_t< SrcDataT > >, device_eventasync_work_group_copy (decorated_local_ptr< DestDataT > dest, decorated_global_ptr< SrcDataT > src, size_t numElements, size_t srcStride) const
 
template<typename DestDataT , typename SrcDataT >
std::enable_if_t< std::is_same_v< DestDataT, std::remove_const_t< SrcDataT > >, device_eventasync_work_group_copy (decorated_global_ptr< DestDataT > dest, decorated_local_ptr< SrcDataT > src, size_t numElements, size_t destStride) const
 
template<typename... eventTN>
void wait_for (eventTN... events) const
 
sycl::ext::oneapi::experimental::root_group< Dimensionsext_oneapi_get_root_group () 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
 

Static Public Attributes

static constexpr int dimensions = Dimensions
 

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 544 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 739 of file nd_item.hpp.

Member Function Documentation

◆ async_work_group_copy() [1/8]

template<int Dimensions = 1>
template<typename DestDataT , typename SrcDataT >
std::enable_if_t< std::is_same_v<DestDataT, std::remove_const_t<SrcDataT> >, device_event> sycl::_V1::nd_item< Dimensions >::async_work_group_copy ( decorated_global_ptr< DestDataT >  dest,
decorated_local_ptr< SrcDataT >  src,
size_t  numElements 
) const
inline

Definition at line 688 of file nd_item.hpp.

◆ async_work_group_copy() [2/8]

template<int Dimensions = 1>
template<typename DestDataT , typename SrcDataT >
std::enable_if_t< std::is_same_v<DestDataT, std::remove_const_t<SrcDataT> >, device_event> sycl::_V1::nd_item< Dimensions >::async_work_group_copy ( decorated_global_ptr< DestDataT >  dest,
decorated_local_ptr< SrcDataT >  src,
size_t  numElements,
size_t  destStride 
) const
inline

Definition at line 707 of file nd_item.hpp.

◆ async_work_group_copy() [3/8]

template<int Dimensions = 1>
template<typename DestDataT , typename SrcDataT >
std::enable_if_t< std::is_same_v<DestDataT, std::remove_const_t<SrcDataT> >, device_event> sycl::_V1::nd_item< Dimensions >::async_work_group_copy ( decorated_local_ptr< DestDataT >  dest,
decorated_global_ptr< SrcDataT >  src,
size_t  numElements 
) const
inline

Definition at line 679 of file nd_item.hpp.

◆ async_work_group_copy() [4/8]

template<int Dimensions = 1>
template<typename DestDataT , typename SrcDataT >
std::enable_if_t< std::is_same_v<DestDataT, std::remove_const_t<SrcDataT> >, device_event> sycl::_V1::nd_item< Dimensions >::async_work_group_copy ( decorated_local_ptr< DestDataT >  dest,
decorated_global_ptr< SrcDataT >  src,
size_t  numElements,
size_t  srcStride 
) const
inline

Definition at line 697 of file nd_item.hpp.

◆ async_work_group_copy() [5/8]

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 654 of file nd_item.hpp.

◆ async_work_group_copy() [6/8]

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 671 of file nd_item.hpp.

◆ async_work_group_copy() [7/8]

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 646 of file nd_item.hpp.

◆ async_work_group_copy() [8/8]

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 662 of file nd_item.hpp.

◆ barrier()

◆ ext_oneapi_get_root_group()

template<int Dimensions = 1>
sycl::ext::oneapi::experimental::root_group<Dimensions> sycl::_V1::nd_item< Dimensions >::ext_oneapi_get_root_group ( ) const
inline

Definition at line 718 of file nd_item.hpp.

◆ get_global_id() [1/2]

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

Definition at line 550 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 552 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 558 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 602 of file nd_item.hpp.

Referenced by sycl::_V1::nd_item< Dimensions >::get_nd_range().

◆ 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 604 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 578 of file nd_item.hpp.

Referenced by syclcompat::experimental::nd_range_barrier().

◆ 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 582 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 594 of file nd_item.hpp.

Referenced by syclcompat::experimental::nd_range_barrier().

◆ 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 596 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

◆ 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

◆ get_local_linear_id()

◆ get_local_range() [1/2]

◆ get_local_range() [2/2]

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

◆ get_nd_range()

◆ get_offset()

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

Definition at line 615 of file nd_item.hpp.

Referenced by sycl::_V1::nd_item< Dimensions >::get_nd_range().

◆ get_sub_group()

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

Definition at line 580 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 633 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 735 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 730 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 713 of file nd_item.hpp.

Friends And Related Function Documentation

◆ detail::Builder

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

Definition at line 738 of file nd_item.hpp.

Member Data Documentation

◆ dimensions

template<int Dimensions = 1>
constexpr int sycl::_V1::nd_item< Dimensions >::dimensions = Dimensions
staticconstexpr

Definition at line 546 of file nd_item.hpp.


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