DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
24 template <
typename TransformedArgType,
int Dims,
typename KernelType>
25 class RoundedRangeKernel;
26 template <
typename TransformedArgType,
int Dims,
typename KernelType>
27 class RoundedRangeKernelWithKH;
39 template <
int dimensions = 1,
bool with_offset = true>
class item {
40 #ifndef __SYCL_DISABLE_ITEM_TO_INT_CONV__
45 class __private_class;
47 template <
bool B,
typename T>
49 #endif // __SYCL_DISABLE_ITEM_TO_INT_CONV__
56 size_t Id = MImpl.MIndex[dimension];
62 size_t Id = MImpl.MIndex[dimension];
70 size_t Id = MImpl.MExtent[dimension];
74 #ifndef __SYCL_DISABLE_ITEM_TO_INT_CONV__
75 operator EnableIfT<dimensions == 1, std::size_t>()
const {
return get_id(0); }
76 #endif // __SYCL_DISABLE_ITEM_TO_INT_CONV__
77 template <
bool has_offset = with_offset>
79 detail::
enable_if_t<has_offset,
id<dimensions>> get_offset()
const {
83 template <
bool has_offset = with_offset>
86 get_offset(
int dimension)
const {
87 size_t Id = MImpl.MOffset[dimension];
92 template <
bool has_offset = with_offset>
94 return detail::Builder::createItem<dimensions, true>(
95 MImpl.MExtent, MImpl.MIndex, {});
99 size_t Id = MImpl.get_linear_id();
117 template <
bool has_offset = with_offset>
120 : MImpl{extent, index, offset} {}
122 template <
bool has_offset = with_offset>
125 : MImpl{extent, index} {}
132 template <
typename,
int,
typename>
146 #ifdef __SYCL_DEVICE_ONLY__
149 throw sycl::exception(
151 "Free function calls are not supported on host");
155 namespace ext::oneapi::experimental {
157 #ifdef __SYCL_DEVICE_ONLY__
160 throw sycl::exception(
162 "Free function calls are not supported on host");
size_t __SYCL_ALWAYS_INLINE get_range(int dimension) const
std::error_code make_error_code(sycl::errc E) noexcept
Constructs an error code using e and sycl_category()
#define __SYCL_INLINE_VER_NAMESPACE(X)
item(detail::enable_if_t<!has_offset, const range< dimensions >> &extent, const id< dimensions > &index)
#define __SYCL_ALWAYS_INLINE
id< dimensions > get_id() const
---— Error handling, matching OpenCL plugin semantics.
#define __SYCL_DEPRECATED(message)
typename std::enable_if< B, T >::type enable_if_t
Identifies an instance of the function object executing at each point in a range.
bool operator!=(const item &rhs) const
annotated_arg & operator=(annotated_arg &)=default
size_t __SYCL_ALWAYS_INLINE get_linear_id() const
auto reduction(buffer< T, 1, AllocatorT > Var, handler &CGH, BinaryOperation Combiner, const property_list &PropList={})
Constructs a reduction object using the given buffer Var, handler CGH, reduction operation Combiner,...
range< dimensions > get_range() const
#define __SYCL_ASSUME_INT(x)
size_t __SYCL_ALWAYS_INLINE get_id(int dimension) const
item(detail::enable_if_t< has_offset, const range< dimensions >> &extent, const id< dimensions > &index, const id< dimensions > &offset)
item< Dims, false > getDelinearizedItem(range< Dims > Range, id< Dims > Id)
bool operator==(const item &rhs) const
typename std::conditional< B, T, F >::type conditional_t
size_t __SYCL_ALWAYS_INLINE operator[](int dimension) const
#define __SYCL2020_DEPRECATED(message)