20 #include <type_traits>
23 inline namespace _V1 {
27 template <
typename TransformedArgType,
int Dims,
typename KernelType>
28 class RoundedRangeKernel;
29 template <
typename TransformedArgType,
int Dims,
typename KernelType>
30 class RoundedRangeKernelWithKH;
37 template <
int Dimensions = 1,
bool with_offset = true>
class item {
42 #ifndef __SYCL_DISABLE_ITEM_TO_INT_CONV__
47 class __private_class;
49 template <
bool B,
typename T>
50 using EnableIfT = std::conditional_t<B, T, __private_class>;
58 size_t Id = MImpl.MIndex[Dimension];
64 size_t Id = MImpl.MIndex[Dimension];
72 size_t Id = MImpl.MExtent[Dimension];
76 #ifndef __SYCL_DISABLE_ITEM_TO_INT_CONV__
77 operator EnableIfT<Dimensions == 1, std::size_t>()
const {
return get_id(0); }
79 template <
bool has_offset = with_offset>
85 template <
bool has_offset = with_offset>
89 size_t Id = MImpl.MOffset[Dimension];
94 template <
bool has_offset = with_offset>
95 operator std::enable_if_t<!has_offset, item<Dimensions, true>>()
const {
96 return detail::Builder::createItem<Dimensions, true>(
97 MImpl.MExtent, MImpl.MIndex, {});
101 size_t Id = MImpl.get_linear_id();
119 template <
bool has_offset = with_offset>
122 : MImpl{extent, index, offset} {}
124 template <
bool has_offset = with_offset>
127 : MImpl{extent, index} {}
A unique identifier of an item in an index space.
Identifies an instance of the function object executing at each point in a range.
item(std::enable_if_t<!has_offset, const range< Dimensions >> &extent, const id< Dimensions > &index)
item(item< Dimensions, with_offset > &&rhs)=default
size_t __SYCL_ALWAYS_INLINE operator[](int Dimension) const
bool operator==(const item &rhs) const
item & operator=(item &&rhs)=default
id< Dimensions > get_id() const
item(std::enable_if_t< has_offset, const range< Dimensions >> &extent, const id< Dimensions > &index, const id< Dimensions > &offset)
std::enable_if_t< has_offset, id< Dimensions > > get_offset() const
size_t __SYCL_ALWAYS_INLINE get_range(int Dimension) const
size_t __SYCL_ALWAYS_INLINE get_id(int Dimension) const
static constexpr int dimensions
range< Dimensions > get_range() const
item(const item &rhs)=default
size_t __SYCL_ALWAYS_INLINE get_linear_id() const
item & operator=(const item &rhs)=default
bool operator!=(const item &rhs) const
#define __SYCL_ASSUME_INT(x)
#define __SYCL_ALWAYS_INLINE
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_EBO __SYCL_SPECIAL_CLASS Dimensions
signed char __SYCL2020_DEPRECATED