22 template<
typename TOrigin,
typename TUnit,
typename TIdx,
typename TWorkDiv>
30 template<
typename TOrigin,
typename TUnit,
typename TIdxWorkDiv>
39 template<
typename TIdxGb>
40 struct GetIdx<TIdxGb, origin::Grid, unit::Blocks>
46 template<
typename TWorkDiv>
55 template<
typename TIdxBt>
56 struct GetIdx<TIdxBt, origin::Block, unit::Threads>
62 template<
typename TWorkDiv>
71 template<
typename TIdx>
72 struct GetIdx<TIdx, origin::Grid, unit::Threads>
76 template<
typename TWorkDiv>
79 return alpaka::getIdx<origin::Grid, unit::Blocks>(idx, workDiv)
80 * getWorkDiv<origin::Block, unit::Threads>(workDiv)
81 + alpaka::getIdx<origin::Block, unit::Threads>(idx, workDiv);
88 template<
typename TIdxWorkDiv,
typename TGr
idThreadIdx,
typename TThreadElemExtent>
90 [[maybe_unused]] TIdxWorkDiv
const& idxWorkDiv,
91 TGridThreadIdx
const& gridThreadIdx,
94 return gridThreadIdx * threadElemExtent;
99 template<
typename TIdxWorkDiv,
typename TGr
idThreadIdx>
103 auto const threadElemExtent(alpaka::getWorkDiv<alpaka::Thread, alpaka::Elems>(idxWorkDiv));
109 template<
typename TIdxWorkDiv>
113 auto const gridThreadIdx(alpaka::getIdx<alpaka::Grid, alpaka::Threads>(idxWorkDiv));
#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 detail::ImplementationBaseType< TInterface, TDerived >::type ImplementationBase
Returns the type that implements the given interface in the inheritance hierarchy.
The alpaka accelerator library.
typename trait::IdxType< T >::type Idx
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getIdx(TIdxWorkDiv const &idxWorkDiv) -> Vec< Dim< TIdxWorkDiv >, Idx< TIdxWorkDiv >>
Get the indices requested.
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.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getIdxThreadFirstElem([[maybe_unused]] TIdxWorkDiv const &idxWorkDiv, TGridThreadIdx const &gridThreadIdx, TThreadElemExtent const &threadElemExtent) -> Vec< Dim< TIdxWorkDiv >, Idx< TIdxWorkDiv >>
Get the index of the first element this thread computes.
interface::ImplementationBase< ConceptIdxBt, TIdxBt > ImplementationBase
ALPAKA_NO_HOST_ACC_WARNING static ALPAKA_FN_HOST_ACC auto getIdx(TIdxBt const &idx, TWorkDiv const &workDiv) -> Vec< Dim< ImplementationBase >, Idx< ImplementationBase >>
ALPAKA_NO_HOST_ACC_WARNING static ALPAKA_FN_HOST_ACC auto getIdx(TIdxGb const &idx, TWorkDiv const &workDiv) -> Vec< Dim< ImplementationBase >, Idx< ImplementationBase >>
interface::ImplementationBase< ConceptIdxGb, TIdxGb > ImplementationBase
ALPAKA_NO_HOST_ACC_WARNING static ALPAKA_FN_HOST_ACC auto getIdx(TIdx const &idx, TWorkDiv const &workDiv)