![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
concurrent foreach implementation More...
#include <SimdConcurrent.hpp>
Public Member Functions | |
| constexpr | SimdConcurrent ()=default |
Protected Member Functions | |
| template<uint32_t T_maxConcurrencyInByte, alpaka::concepts::Alignment T_MemAlignment> | |
| ALPAKA_FN_INLINE ALPAKA_FN_ACC constexpr void | concurrent (auto const &acc, alpaka::concepts::Vector auto extents, auto &&func, alpaka::concepts::IDataSource auto &&data0, alpaka::concepts::IDataSource auto &&... dataN) const |
Private Member Functions | |
| constexpr auto const & | asParent () const |
| template<uint32_t T_simdWidth, uint32_t T_numSimdPerFnCall, alpaka::concepts::Alignment T_MemAlignment> | |
| ALPAKA_FN_INLINE ALPAKA_FN_ACC constexpr auto | concurrentSimdPackExecution (auto const &acc, alpaka::concepts::Vector auto numElements, auto &&func, alpaka::concepts::IDataSource auto &&data0, alpaka::concepts::IDataSource auto &&... dataN) const |
Static Private Member Functions | |
| template<alpaka::concepts::Alignment T_MemAlignment, uint32_t T_width, uint32_t... T_repeat> | |
| static ALPAKA_FN_INLINE constexpr void | execute (auto const &acc, auto &iter, std::integer_sequence< uint32_t, T_repeat... >, auto &&func, alpaka::concepts::IDataSource auto &&... data) |
| calls the functor and forward the data T_repeat times | |
| template<alpaka::concepts::Alignment T_MemAlignment, uint32_t T_width> | |
| static ALPAKA_FN_INLINE constexpr void | executeDo (auto const &acc, auto const &dataIdx, auto &&func, alpaka::concepts::IDataSource auto &&... data) |
concurrent foreach implementation
Definition at line 24 of file SimdConcurrent.hpp.
|
constexprdefault |
|
inlineconstexprprivate |
Definition at line 76 of file SimdConcurrent.hpp.
|
inlineconstexprprotected |
Definition at line 30 of file SimdConcurrent.hpp.
|
inlineconstexprprivate |
To avoid an overflow in the index range we divide first by the number of elements per function call and then by the number of workers.
Definition at line 122 of file SimdConcurrent.hpp.
|
inlinestaticconstexprprivate |
calls the functor and forward the data T_repeat times
The calls to the functor are independent and compile time unrolled to support instruction parallelism.
| iter | the caller must ensure tha the interator can be increased T_repeat times without jumping over iter.end() |
Definition at line 99 of file SimdConcurrent.hpp.
|
inlinestaticconstexprprivate |
Definition at line 82 of file SimdConcurrent.hpp.