11 #include <type_traits>
114 class const_iterator;
132 : elements_{elements}
136 stride_{stride - elements}
138 , index_{std::
min(first, extent)}
154 if(indexElem_ >= elements_)
159 if(index_ >= extent_)
175 return (*(*
this) == *other);
180 return not(*
this == other);
400 if((thread_ < extent_).
all())
445 return (index_ == other.index_);
450 return not(*
this == other);
466 , first_{loop_->extent_}
467 , range_{loop_->extent_}
468 , index_{loop_->extent_}
475 bool overflow =
false;
477 if(index_[I] >= range_[I])
479 index_[I] = first_[I];
495 if(not nth_elements_loop<N - 1>())
501 return do_elements_loops<N - 1>();
510 bool overflow =
false;
511 first_[I] += loop_->stride_[I];
512 if(first_[I] >= loop_->extent_[I])
514 first_[I] = loop_->thread_[I];
517 index_[I] = first_[I];
518 range_[I] =
std::min(first_[I] + loop_->elements_[I], loop_->extent_[I]);
532 if(not nth_strided_loop<N - 1>())
538 return do_strided_loops<N - 1>();
549 if(not do_elements_loops<Dim::value>())
557 if(not do_strided_loops<Dim::value>())
564 first_ = loop_->extent_;
565 range_ = loop_->extent_;
566 index_ = loop_->extent_;
690 class const_iterator;
710 , first_{std::
min(first, extent)}
743 return (first_ == other.first_);
748 return not(*
this == other);
959 class const_iterator;
1012 return (index_ == other.index_);
1017 return not(*
this == other);
#define ALPAKA_UNREACHABLE(...)
Before CUDA 11.5 nvcc is unable to correctly identify return statements in 'if constexpr' branches....
#define ALPAKA_FN_ACC
All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_F...
constexpr ALPAKA_FN_HOST_ACC auto divCeil(Integral a, Integral b) -> Integral
Returns the ceiling of a / b, as integer.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto min(T const &min_ctx, Tx const &x, Ty const &y)
Returns the smaller of two arguments. NaNs are treated as missing data (between a NaN and a numeric v...
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto all(TWarp const &warp, std::int32_t predicate) -> std::int32_t
Evaluates predicate for all active threads of the warp and returns non-zero if and only if predicate ...
The alpaka accelerator library.
typename trait::IdxType< T >::type Idx
ALPAKA_FN_ACC auto uniformElementsAlongX(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformGroupElementsAlongZ(TAcc const &acc, TArgs... args)
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getWorkDiv(TWorkDiv const &workDiv) -> Vec< Dim< TWorkDiv >, Idx< TWorkDiv >>
Get the extent requested.
ALPAKA_FN_ACC auto uniformGroups(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformGroupElementsAlong(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformElements(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformGroupsAlong(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformElementsND(TAcc const &acc)
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto elementwise_min(Vec< TDim, TVal > const &p, Vecs const &... qs) -> Vec< TDim, TVal >
ALPAKA_FN_ACC auto uniformGroupsAlongZ(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformGroupsAlongX(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformGroupsAlongY(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformElementsAlongY(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformGroupElementsAlongX(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformGroupElements(TAcc const &acc, TArgs... args)
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getIdx(TIdx const &idx, TWorkDiv const &workDiv) -> Vec< Dim< TWorkDiv >, Idx< TIdx >>
Get the indices requested.
typename trait::DimType< T >::type Dim
The dimension type trait alias template to remove the ::type.
ALPAKA_FN_ACC auto uniformElementsAlongZ(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformGroupElementsAlongY(TAcc const &acc, TArgs... args)
ALPAKA_FN_ACC auto uniformElementsAlong(TAcc const &acc, TArgs... args)