45 static consteval uint32_t
dim()
47 return IdxVecType::dim();
50 template<concepts::TypeOrVector<
typename T_End::type> T_OpType>
56 template<concepts::TypeOrVector<
typename T_End::type> T_OpType>
65 template<concepts::TypeOrVector<
typename T_End::type> T_OpType>
88 [[nodiscard]]
constexpr auto begin()
const
98 [[nodiscard]]
constexpr auto end()
const
108 std::string
toString(std::string
const separator =
",", std::string
const enclosings =
"{}")
const
110 std::string locale_enclosing_begin;
111 std::string locale_enclosing_end;
112 size_t enclosing_dim = enclosings.size();
114 if(enclosing_dim > 0)
117 locale_enclosing_begin = enclosings[0 % enclosing_dim];
118 locale_enclosing_end = enclosings[1 % enclosing_dim];
121 std::stringstream stream;
122 stream << locale_enclosing_begin;
124 stream << locale_enclosing_end;
132 using type =
typename T_Begin::type;
135 template<u
int32_t T_dim, alpaka::concepts::Vector T_LowHaloVec, alpaka::concepts::Vector T_UpHaloVec>
142 for(uint32_t i = 0; i < T_dim; ++i)
144 switch(boundaryDir.
data[i])
147 m_begin[i] = range.m_begin[i];
152 m_end[i] = range.m_end[i];
155 m_begin[i] = range.m_begin[i] + boundaryDir.
lowerHaloSize[i];
164 return IdxRange{m_begin, m_end, range.m_stride};
174 struct PCast::Op<T_To,
IdxRange<T_End, T_Begin, T_Stride>>
176 constexpr auto operator()(
auto&& input)
const
177 requires std::convertible_to<typename T_End::type, T_To> && (!std::same_as<T_To, typename T_End::type>)
182 constexpr decltype(
auto)
operator()(
auto&& input)
const requires std::same_as<T_To, typename T_End::type>
184 return std::forward<decltype(input)>(input);
190 template<concepts::VectorOrScalar T_Extents>
193 template<concepts::VectorOrScalar T_Begin, concepts::VectorOrScalar T_End>
199 template<concepts::VectorOrScalar T_Begin, concepts::VectorOrScalar T_End, concepts::VectorOrScalar T_Str
ide>
212 template<concepts::SpecializationOf<IdxRange> T>
238 template<
typename T,
typename T_ValueType = alpaka::NotRequired, u
int32_t T_dim = alpaka::notRequiredDim>
241 && (std::same_as<T_ValueType, typename T::IdxType> || std::same_as<T_ValueType, alpaka::NotRequired>)
#define ALPAKA_ASSERT_ACC(...)
ALPAKA_ASSERT_ACC is an assert-like macro.
ALPAKA_FN_ACC const_iterator_end end() const
ALPAKA_FN_ACC const_iterator begin() const
#define ALPAKA_FN_HOST_ACC
All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_F...
#define ALPAKA_TYPEOF(...)
Get the type of instance.
Concept to check if a type is an index range.
Concept to check if a type is a lazy-evaluated index range.
Concept to check if a type is a vector or scalar variable.
Concept to check if a type is a vector.
constexpr auto contiguous
typename GetVec< T >::type getVec_t
constexpr uint32_t notRequiredDim
constexpr auto makeDirectionSubRange(auto const range, alpaka::BoundaryDirection< T_dim, T_LowHaloVec, T_UpHaloVec > const &boundaryDir)
constexpr bool isLazyIndexRange_v
constexpr bool isIndexRange_v
ALPAKA_FN_HOST_ACC IdxRange(T_Extents const &) -> IdxRange< typename trait::getVec_t< T_Extents >::UniVec >
consteval auto iotaCVec()
Create and return a CVector of the given length with values 1, 2, ...
constexpr decltype(auto) pCast(auto &&input)
Performs a static_cast on the storage type of combined data type.
An n-dimensional boundary direction.
T_LowHaloVec lowerHaloSize
T_UpHaloVec upperHaloSize
constexpr auto begin() const
Begin iterator to iterate all positions in the range.
constexpr IdxRange(T_Begin const &begin, T_End const &end, T_Stride const &stride)
ALPAKA_FN_HOST_ACC constexpr auto operator<<(T_OpType const &rhs) const
ALPAKA_FN_HOST_ACC constexpr auto operator%(T_OpType const &rhs) const
typename T_End::UniVec IdxVecType
constexpr IdxRange(T_End const &extent)
typename T_Begin::type type
typename T_End::type IdxType
std::string toString(std::string const separator=",", std::string const enclosings="{}") const
constexpr auto end() const
constexpr auto distance() const
ALPAKA_FN_HOST_ACC constexpr auto operator>>(T_OpType const &rhs) const
constexpr IdxRange(T_Begin const &begin, T_End const &end)
static consteval uint32_t dim()
static constexpr auto fill()