DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::item< Dimensions, with_offset > Class Template Reference

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

#include <sycl/item.hpp>

Collaboration diagram for sycl::_V1::item< Dimensions, with_offset >:

Public Member Functions

 item ()=delete
 
id< Dimensionsget_id () const
 
size_t __SYCL_ALWAYS_INLINE get_id (int Dimension) const
 
size_t __SYCL_ALWAYS_INLINE operator[] (int Dimension) const
 
range< Dimensionsget_range () const
 
size_t __SYCL_ALWAYS_INLINE get_range (int Dimension) const
 
 operator EnableIfT< Dimensions==1, std::size_t > () const
 
template<bool has_offset = with_offset>
std::enable_if_t< has_offset, id< Dimensions > > get_offset () const
 
template<bool has_offset = with_offset>
std::enable_if_t< has_offset, size_t > __SYCL_ALWAYS_INLINE get_offset (int Dimension) const
 
template<bool has_offset = with_offset>
 operator std::enable_if_t<!has_offset, item< Dimensions, true >> () const
 
size_t __SYCL_ALWAYS_INLINE get_linear_id () const
 
 item (const item &rhs)=default
 
 item (item< Dimensions, with_offset > &&rhs)=default
 
itemoperator= (const item &rhs)=default
 
itemoperator= (item &&rhs)=default
 
bool operator== (const item &rhs) const
 
bool operator!= (const item &rhs) const
 

Static Public Attributes

static constexpr int dimensions = Dimensions
 

Protected Member Functions

template<bool has_offset = with_offset>
 item (std::enable_if_t< has_offset, const range< Dimensions >> &extent, const id< Dimensions > &index, const id< Dimensions > &offset)
 
template<bool has_offset = with_offset>
 item (std::enable_if_t<!has_offset, const range< Dimensions >> &extent, const id< Dimensions > &index)
 

Friends

class detail::Builder
 

Detailed Description

template<int Dimensions = 1, bool with_offset = true>
class sycl::_V1::item< Dimensions, with_offset >

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

Definition at line 37 of file item.hpp.

Constructor & Destructor Documentation

◆ item() [1/5]

template<int Dimensions = 1, bool with_offset = true>
sycl::_V1::item< Dimensions, with_offset >::item ( )
delete

◆ item() [2/5]

template<int Dimensions = 1, bool with_offset = true>
sycl::_V1::item< Dimensions, with_offset >::item ( const item< Dimensions, with_offset > &  rhs)
default

◆ item() [3/5]

template<int Dimensions = 1, bool with_offset = true>
sycl::_V1::item< Dimensions, with_offset >::item ( item< Dimensions, with_offset > &&  rhs)
default

◆ item() [4/5]

template<int Dimensions = 1, bool with_offset = true>
template<bool has_offset = with_offset>
sycl::_V1::item< Dimensions, with_offset >::item ( std::enable_if_t< has_offset, const range< Dimensions >> &  extent,
const id< Dimensions > &  index,
const id< Dimensions > &  offset 
)
inlineprotected

Definition at line 120 of file item.hpp.

◆ item() [5/5]

template<int Dimensions = 1, bool with_offset = true>
template<bool has_offset = with_offset>
sycl::_V1::item< Dimensions, with_offset >::item ( std::enable_if_t<!has_offset, const range< Dimensions >> &  extent,
const id< Dimensions > &  index 
)
inlineprotected

Definition at line 125 of file item.hpp.

Member Function Documentation

◆ get_id() [1/2]

◆ get_id() [2/2]

template<int Dimensions = 1, bool with_offset = true>
size_t __SYCL_ALWAYS_INLINE sycl::_V1::item< Dimensions, with_offset >::get_id ( int  Dimension) const
inline

Definition at line 57 of file item.hpp.

References __SYCL_ASSUME_INT.

◆ get_linear_id()

template<int Dimensions = 1, bool with_offset = true>
size_t __SYCL_ALWAYS_INLINE sycl::_V1::item< Dimensions, with_offset >::get_linear_id ( ) const
inline

Definition at line 100 of file item.hpp.

References __SYCL_ASSUME_INT.

◆ get_offset() [1/2]

template<int Dimensions = 1, bool with_offset = true>
template<bool has_offset = with_offset>
std::enable_if_t<has_offset, id<Dimensions> > sycl::_V1::item< Dimensions, with_offset >::get_offset ( ) const
inline

Definition at line 81 of file item.hpp.

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

◆ get_offset() [2/2]

template<int Dimensions = 1, bool with_offset = true>
template<bool has_offset = with_offset>
std::enable_if_t<has_offset, size_t> __SYCL_ALWAYS_INLINE sycl::_V1::item< Dimensions, with_offset >::get_offset ( int  Dimension) const
inline

Definition at line 88 of file item.hpp.

References __SYCL_ASSUME_INT.

◆ get_range() [1/2]

◆ get_range() [2/2]

template<int Dimensions = 1, bool with_offset = true>
size_t __SYCL_ALWAYS_INLINE sycl::_V1::item< Dimensions, with_offset >::get_range ( int  Dimension) const
inline

Definition at line 71 of file item.hpp.

References __SYCL_ASSUME_INT.

◆ operator EnableIfT< Dimensions==1, std::size_t >()

template<int Dimensions = 1, bool with_offset = true>
sycl::_V1::item< Dimensions, with_offset >::operator EnableIfT< Dimensions==1, std::size_t > ( ) const
inline

Definition at line 77 of file item.hpp.

References sycl::_V1::item< Dimensions, with_offset >::get_id().

◆ operator std::enable_if_t<!has_offset, item< Dimensions, true >>()

template<int Dimensions = 1, bool with_offset = true>
template<bool has_offset = with_offset>
sycl::_V1::item< Dimensions, with_offset >::operator std::enable_if_t<!has_offset, item< Dimensions, true >> ( ) const
inline

Definition at line 95 of file item.hpp.

◆ operator!=()

template<int Dimensions = 1, bool with_offset = true>
bool sycl::_V1::item< Dimensions, with_offset >::operator!= ( const item< Dimensions, with_offset > &  rhs) const
inline

Definition at line 116 of file item.hpp.

◆ operator=() [1/2]

template<int Dimensions = 1, bool with_offset = true>
item& sycl::_V1::item< Dimensions, with_offset >::operator= ( const item< Dimensions, with_offset > &  rhs)
default

◆ operator=() [2/2]

template<int Dimensions = 1, bool with_offset = true>
item& sycl::_V1::item< Dimensions, with_offset >::operator= ( item< Dimensions, with_offset > &&  rhs)
default

◆ operator==()

template<int Dimensions = 1, bool with_offset = true>
bool sycl::_V1::item< Dimensions, with_offset >::operator== ( const item< Dimensions, with_offset > &  rhs) const
inline

Definition at line 114 of file item.hpp.

◆ operator[]()

template<int Dimensions = 1, bool with_offset = true>
size_t __SYCL_ALWAYS_INLINE sycl::_V1::item< Dimensions, with_offset >::operator[] ( int  Dimension) const
inline

Definition at line 63 of file item.hpp.

References __SYCL_ASSUME_INT.

Friends And Related Function Documentation

◆ detail::Builder

template<int Dimensions = 1, bool with_offset = true>
friend class detail::Builder
friend

Definition at line 129 of file item.hpp.

Member Data Documentation

◆ dimensions

template<int Dimensions = 1, bool with_offset = true>
constexpr int sycl::_V1::item< Dimensions, with_offset >::dimensions = Dimensions
staticconstexpr

Definition at line 39 of file item.hpp.


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