13 #ifdef ALPAKA_ACC_SYCL_ENABLED
15 # include <sycl/sycl.hpp>
19 template<
typename TExtent>
20 inline auto make_sycl_range(TExtent
const& ext, std::size_t multiplier = 1)
22 constexpr
auto dim = Dim<TExtent>::value;
24 if constexpr(dim == 0)
25 return sycl::range<1>{multiplier};
28 auto const width =
getWidth(ext) * multiplier;
29 if constexpr(dim == 1)
30 return sycl::range<1>{width};
31 else if constexpr(dim == 2)
32 return sycl::range<2>{width,
getHeight(ext)};
38 template<
typename TView>
39 inline auto make_sycl_offset(TView
const& view)
41 constexpr
auto dim = Dim<TView>::value;
43 if constexpr(dim == 0)
44 return sycl::range<1>{1};
47 if constexpr(dim == 1)
49 else if constexpr(dim == 2)
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getHeight(TExtent const &extent=TExtent()) -> Idx< TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getOffsetX(TOffsets const &offsets=TOffsets()) -> Idx< TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getOffsetZ(TOffsets const &offsets=TOffsets()) -> Idx< TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getOffsetY(TOffsets const &offsets=TOffsets()) -> Idx< TOffsets >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getDepth(TExtent const &extent=TExtent()) -> Idx< TExtent >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getWidth(TExtent const &extent=TExtent()) -> Idx< TExtent >