24 template <
typename TransformedArgType,
int Dims,
typename KernelType>
25 class RoundedRangeKernel;
26 template <
typename TransformedArgType,
int Dims,
typename KernelType>
27 class RoundedRangeKernelWithKH;
29 template <
int dimensions>
class id;
30 template <
int dimensions>
class range;
36 template <
int dimensions = 1,
bool with_offset = true>
class item {
37 #ifndef __SYCL_DISABLE_ITEM_TO_INT_CONV__
42 class __private_class;
44 template <
bool B,
typename T>
45 using EnableIfT = detail::conditional_t<B, T, __private_class>;
46 #endif // __SYCL_DISABLE_ITEM_TO_INT_CONV__
53 size_t Id = MImpl.MIndex[dimension];
59 size_t Id = MImpl.MIndex[dimension];
67 size_t Id = MImpl.MExtent[dimension];
71 #ifndef __SYCL_DISABLE_ITEM_TO_INT_CONV__
72 operator EnableIfT<dimensions == 1, std::size_t>()
const {
return get_id(0); }
73 #endif // __SYCL_DISABLE_ITEM_TO_INT_CONV__
74 template <
bool has_offset = with_offset>
76 detail::
enable_if_t<has_offset,
id<dimensions>> get_offset()
const {
80 template <
bool has_offset = with_offset>
83 get_offset(
int dimension)
const {
84 size_t Id = MImpl.MOffset[dimension];
89 template <
bool has_offset = with_offset>
91 return detail::Builder::createItem<dimensions, true>(
92 MImpl.MExtent, MImpl.MIndex, {});
96 size_t Id = MImpl.get_linear_id();
105 item &operator=(
const item &rhs) =
default;
107 item &operator=(
item &&rhs) =
default;
114 template <
bool has_offset = with_offset>
117 : MImpl{extent, index, offset} {}
119 template <
bool has_offset = with_offset>
122 : MImpl{extent, index} {}
129 template <
typename,
int,
typename>
139 #ifdef __SYCL_DEVICE_ONLY__
144 "Free function calls are not supported on host device");
150 namespace experimental {
152 #ifdef __SYCL_DEVICE_ONLY__
157 "Free function calls are not supported on host device");