17 template<
typename T,
typename TSource>
18 using MimicConst = std::conditional_t<std::is_const_v<TSource>, std::add_const_t<T>, std::remove_const_t<T>>;
20 template<
typename TView,
typename TSfinae =
void>
23 using TViewDecayed = std::decay_t<TView>;
67 template<
typename TIter>
70 return m_currentIdx == other.m_currentIdx;
73 template<
typename TIter>
76 return m_currentIdx != other.m_currentIdx;
81 if constexpr(Dim::value == 0)
86 = mapIdx<Dim::value>(
Vec<
DimInt<1>, Idx>{m_currentIdx}, m_extents);
87 auto const offsetInBytes = (currentIdxDimx * m_pitchBytes).sum();
90 # pragma GCC diagnostic push
92 # pragma GCC diagnostic ignored "-Wcast-align"
94 return *
reinterpret_cast<Elem*
>(
reinterpret_cast<QualifiedByte*
>(m_nativePtr) + offsetInBytes);
96 # pragma GCC diagnostic pop
109 template<
typename TView,
typename TSfinae =
void>
118 template<
typename TView,
typename TSfinae =
void>
129 template<
typename TView>
132 template<
typename TView>
138 template<
typename TView>
#define ALPAKA_UNREACHABLE(...)
Before CUDA 11.5 nvcc is unable to correctly identify return statements in 'if constexpr' branches....
ALPAKA_FN_HOST_ACC auto operator*() const -> Elem &
ALPAKA_FN_HOST IteratorView(TView &view)
ALPAKA_FN_HOST_ACC auto operator++() -> IteratorView &
ALPAKA_FN_HOST IteratorView(TView &view, Idx const idx)
ALPAKA_FN_HOST_ACC auto operator++(int) -> IteratorView
ALPAKA_FN_HOST_ACC auto operator==(TIter &other) const -> bool
ALPAKA_FN_HOST_ACC auto operator!=(TIter &other) const -> bool
ALPAKA_FN_HOST_ACC auto operator--(int) -> IteratorView
ALPAKA_FN_HOST_ACC auto operator--() -> IteratorView &
#define ALPAKA_FN_HOST_ACC
std::conditional_t< std::is_const_v< TSource >, std::add_const_t< T >, std::remove_const_t< T > > MimicConst
ALPAKA_FN_HOST auto end(TView &view) -> Iterator< TView >
ALPAKA_FN_HOST auto begin(TView &view) -> Iterator< TView >
typename trait::IdxType< T >::type Idx
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getExtents(T const &object) -> Vec< Dim< T >, Idx< T >>
ALPAKA_FN_HOST auto getPitchesInBytes(TView const &view) -> Vec< Dim< TView >, Idx< TView >>
ALPAKA_FN_HOST auto getPtrNative(TView const &view) -> Elem< TView > const *
Gets the native pointer of the memory view.
std::remove_volatile_t< typename trait::ElemType< TView >::type > Elem
The element type trait alias template to remove the ::type.
std::integral_constant< std::size_t, N > DimInt
typename trait::DimType< T >::type Dim
The dimension type trait alias template to remove the ::type.
static ALPAKA_FN_HOST auto begin(TView &view) -> IteratorView< TView >
static ALPAKA_FN_HOST auto end(TView &view) -> IteratorView< TView >