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

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

#include <CL/sycl/detail/helpers.hpp>

Public Member Functions

 item ()=delete
 
id< dimensions > get_id () const
 
size_t __SYCL_ALWAYS_INLINE get_id (int dimension) const
 
size_t __SYCL_ALWAYS_INLINE operator[] (int dimension) const
 
range< dimensions > get_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>
detail::enable_if_t< has_offset, id< dimensions > > get_offset () const
 
template<bool has_offset = with_offset>
detail::enable_if_t< has_offset, size_t > __SYCL_ALWAYS_INLINE get_offset (int dimension) const
 
template<bool has_offset = with_offset>
 operator detail::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
 

Protected Member Functions

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

Friends

class detail::Builder
 
template<typename , int , typename >
class detail::RoundedRangeKernel
 
template<typename , int , typename >
class detail::RoundedRangeKernelWithKH
 

Detailed Description

template<int dimensions = 1, bool with_offset = true>
class cl::sycl::item< dimensions, with_offset >

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

Definition at line 28 of file helpers.hpp.

Constructor & Destructor Documentation

◆ item() [1/5]

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

◆ item() [2/5]

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

◆ item() [3/5]

template<int dimensions = 1, bool with_offset = true>
cl::sycl::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>
cl::sycl::item< dimensions, with_offset >::item ( detail::enable_if_t< has_offset, const range< dimensions >> &  extent,
const id< dimensions > &  index,
const id< dimensions > &  offset 
)
inlineprotected

Definition at line 115 of file item.hpp.

◆ item() [5/5]

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

Definition at line 120 of file item.hpp.

Member Function Documentation

◆ get_id() [1/2]

template<int dimensions = 1, bool with_offset = true>
id<dimensions> cl::sycl::item< dimensions, with_offset >::get_id ( ) const
inline

Definition at line 50 of file item.hpp.

Referenced by cl::sycl::detail::ItemToStr(), and cl::sycl::detail::writeItem().

◆ get_id() [2/2]

template<int dimensions = 1, bool with_offset = true>
size_t __SYCL_ALWAYS_INLINE cl::sycl::item< dimensions, with_offset >::get_id ( int  dimension) const
inline

Definition at line 52 of file item.hpp.

◆ get_linear_id()

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

Definition at line 95 of file item.hpp.

Referenced by cl::sycl::private_memory< T, Dimensions >::operator()().

◆ get_offset() [1/2]

template<int dimensions = 1, bool with_offset = true>
template<bool has_offset = with_offset>
detail::enable_if_t<has_offset, id<dimensions> > cl::sycl::item< dimensions, with_offset >::get_offset ( ) const
inline

Definition at line 76 of file item.hpp.

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

◆ get_offset() [2/2]

template<int dimensions = 1, bool with_offset = true>
template<bool has_offset = with_offset>
detail::enable_if_t<has_offset, size_t> __SYCL_ALWAYS_INLINE cl::sycl::item< dimensions, with_offset >::get_offset ( int  dimension) const
inline

Definition at line 83 of file item.hpp.

◆ get_range() [1/2]

template<int dimensions = 1, bool with_offset = true>
range<dimensions> cl::sycl::item< dimensions, with_offset >::get_range ( ) const
inline

Definition at line 64 of file item.hpp.

Referenced by cl::sycl::detail::ItemToStr(), and cl::sycl::detail::writeItem().

◆ get_range() [2/2]

template<int dimensions = 1, bool with_offset = true>
size_t __SYCL_ALWAYS_INLINE cl::sycl::item< dimensions, with_offset >::get_range ( int  dimension) const
inline

Definition at line 66 of file item.hpp.

◆ operator detail::enable_if_t<!has_offset, item< dimensions, true >>()

template<int dimensions = 1, bool with_offset = true>
template<bool has_offset = with_offset>
cl::sycl::item< dimensions, with_offset >::operator detail::enable_if_t<!has_offset, item< dimensions, true >> ( ) const
inline

Definition at line 90 of file item.hpp.

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

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

Definition at line 72 of file item.hpp.

◆ operator!=()

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

Definition at line 111 of file item.hpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

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

Definition at line 109 of file item.hpp.

◆ operator[]()

template<int dimensions = 1, bool with_offset = true>
size_t __SYCL_ALWAYS_INLINE cl::sycl::item< dimensions, with_offset >::operator[] ( int  dimension) const
inline

Definition at line 58 of file item.hpp.

Friends And Related Function Documentation

◆ detail::Builder

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

Definition at line 124 of file item.hpp.

◆ detail::RoundedRangeKernel

template<int dimensions = 1, bool with_offset = true>
template<typename , int , typename >
friend class detail::RoundedRangeKernel
friend

Definition at line 128 of file item.hpp.

◆ detail::RoundedRangeKernelWithKH

template<int dimensions = 1, bool with_offset = true>
template<typename , int , typename >
friend class detail::RoundedRangeKernelWithKH
friend

Definition at line 130 of file item.hpp.


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