18 template<
typename TIndex,
typename TExtentVec,
typename TFnObj>
20 std::index_sequence<>,
29 template<std::size_t Tdim0, std::size_t... Tdims,
typename TIndex,
typename TExtentVec,
typename TFnObj>
31 std::index_sequence<Tdim0, Tdims...>,
33 TExtentVec
const& extent,
36 static_assert(
Dim<TIndex>::value > 0u,
"The dimension given to ndLoop has to be larger than zero!");
39 "The dimensions of the iteration vector and the extent vector have to be identical!");
40 static_assert(
Dim<TIndex>::value > Tdim0,
"The current dimension has to be in the range [0,dim-1]!");
42 for(idx[Tdim0] = 0u; idx[Tdim0] < extent[Tdim0]; ++idx[Tdim0])
44 ndLoopImpl(std::index_sequence<Tdims...>{}, idx, extent, f);
57 template<
typename TExtentVec,
typename TFnObj, std::size_t... Tdims>
59 [[maybe_unused]] std::index_sequence<Tdims...> indexSequence,
60 TExtentVec
const& extent,
61 TFnObj
const& f) ->
void
65 "The values in the index_sequence have to be in the range [0,dim-1]!");
68 "The values in the index_sequence have to be unique!");
80 template<
typename TExtentVec,
typename TFnObj>
#define ALPAKA_FN_HOST_ACC
#define ALPAKA_NO_HOST_ACC_WARNING
Disable nvcc warning: 'calling a host function from host device function.' Usage: ALPAKA_NO_HOST_ACC_...
typename trait::IdxType< T >::type Idx
typename trait::DimType< T >::type Dim
The dimension type trait alias template to remove the ::type.