DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
cl::sycl::nd_item< dimensions > Class Template Reference

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

#include <CL/sycl/detail/helpers.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 detail::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< dimensions > &rhs)=default
 
 nd_item (nd_item< dimensions > &&rhs)=default
 
nd_item< dimensions > & operator= (const nd_item< dimensions > &rhs)=default
 
nd_item< dimensions > & operator= (nd_item< dimensions > &&rhs)=default
 
bool operator== (const nd_item< dimensions > &rhs) const
 
bool operator!= (const nd_item< dimensions > &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 cl::sycl::nd_item< dimensions >

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

Definition at line 32 of file helpers.hpp.

Constructor & Destructor Documentation

◆ nd_item() [1/4]

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

◆ nd_item() [2/4]

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

◆ nd_item() [3/4]

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

◆ nd_item() [4/4]

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

Definition at line 188 of file nd_item.hpp.

Member Function Documentation

◆ async_work_group_copy() [1/4]

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

Definition at line 144 of file nd_item.hpp.

◆ async_work_group_copy() [2/4]

template<int dimensions = 1>
template<typename dataT >
device_event cl::sycl::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 159 of file nd_item.hpp.

◆ async_work_group_copy() [3/4]

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

Definition at line 137 of file nd_item.hpp.

◆ async_work_group_copy() [4/4]

template<int dimensions = 1>
template<typename dataT >
device_event cl::sycl::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 151 of file nd_item.hpp.

◆ barrier()

template<int dimensions = 1>
void cl::sycl::nd_item< dimensions >::barrier ( access::fence_space  accessSpace = access::fence_space::global_and_local) const
inline

◆ get_global_id() [1/2]

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

◆ get_global_id() [2/2]

template<int dimensions = 1>
size_t __SYCL_ALWAYS_INLINE cl::sycl::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 cl::sycl::nd_item< dimensions >::get_global_linear_id ( ) const
inline

Definition at line 48 of file nd_item.hpp.

References __SYCL_ASSUME_INT.

◆ get_global_range() [1/2]

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

Definition at line 95 of file nd_item.hpp.

Referenced by cl::sycl::ext::oneapi::detail::reductionLoop().

◆ get_global_range() [2/2]

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

Definition at line 97 of file nd_item.hpp.

◆ get_group() [1/2]

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

◆ get_group() [2/2]

template<int dimensions = 1>
size_t __SYCL_ALWAYS_INLINE cl::sycl::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()

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

Definition at line 78 of file nd_item.hpp.

References __SYCL_ASSUME_INT.

◆ get_group_range() [1/2]

template<int dimensions = 1>
range<dimensions> cl::sycl::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 cl::sycl::nd_item< dimensions >::get_group_range ( int  dimension) const
inline

Definition at line 88 of file nd_item.hpp.

References __SYCL_ASSUME_INT.

◆ get_local_id() [1/2]

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

Definition at line 54 of file nd_item.hpp.

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

◆ get_local_id() [2/2]

template<int dimensions = 1>
size_t __SYCL_ALWAYS_INLINE cl::sycl::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 cl::sycl::nd_item< dimensions >::get_local_linear_id ( ) const
inline

Definition at line 62 of file nd_item.hpp.

References __SYCL_ASSUME_INT.

◆ get_local_range() [1/2]

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

Definition at line 101 of file nd_item.hpp.

◆ get_local_range() [2/2]

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

Definition at line 103 of file nd_item.hpp.

◆ get_nd_range()

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

Definition at line 110 of file nd_item.hpp.

◆ get_offset()

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

Definition at line 108 of file nd_item.hpp.

◆ get_sub_group()

template<int dimensions = 1>
sub_group cl::sycl::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 cl::sycl::nd_item< dimensions >::mem_fence ( typename detail::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 126 of file nd_item.hpp.

◆ operator!=()

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

Definition at line 182 of file nd_item.hpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

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

Definition at line 177 of file nd_item.hpp.

◆ wait_for()

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

Definition at line 165 of file nd_item.hpp.

Friends And Related Function Documentation

◆ detail::Builder

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

Definition at line 187 of file nd_item.hpp.


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