![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Creates a functor operate on contiguous data concurrently. More...
#include <SimdAlgo.hpp>
Public Member Functions | |
| constexpr | SimdAlgo (T_WorkGroup const workGroup, T_Traverse traverse=T_Traverse{}, T_IdxLayout idxLayout=T_IdxLayout{}) |
| constexpr T_IdxLayout | getIdxLayoutPolicy () const |
| constexpr T_Traverse | getTraversePolicy () const |
| constexpr T_WorkGroup | getWorkGroup () const |
| template<uint32_t T_maxConcurrencyInByte, alpaka::concepts::Alignment T_MemAlignment = AutoAligned> | |
| ALPAKA_FN_INLINE ALPAKA_FN_ACC constexpr auto | transformReduce (auto const &acc, alpaka::concepts::Vector auto extents, auto const &neutralElement, auto &&reduceFunc, auto &&transformFunc, alpaka::concepts::IDataSource auto &&data0, alpaka::concepts::IDataSource auto &&... dataN) const |
| transform the input data and reduce it to a single value | |
| ALPAKA_FN_INLINE ALPAKA_FN_ACC constexpr auto | transformReduce (auto const &acc, alpaka::concepts::Vector auto extents, auto const &neutralElement, auto &&reduceFunc, auto &&transformFunc, alpaka::concepts::IDataSource auto &&data0, alpaka::concepts::IDataSource auto &&... dataN) const |
| transform the input data and reduce it to a single value | |
| template<uint32_t T_maxConcurrencyInByte, alpaka::concepts::Alignment T_MemAlignment = AutoAligned> | |
| ALPAKA_FN_INLINE ALPAKA_FN_ACC constexpr auto | transformReduce (auto const &acc, auto const &neutralElement, auto &&reduceFunc, auto &&transformFunc, alpaka::concepts::IDataSource auto &&data0, alpaka::concepts::IDataSource auto &&... dataN) const |
| transform the input data and reduce it to a single value | |
| ALPAKA_FN_INLINE ALPAKA_FN_ACC constexpr auto | transformReduce (auto const &acc, auto const &neutralElement, auto &&reduceFunc, auto &&transformFunc, alpaka::concepts::IDataSource auto &&data0, alpaka::concepts::IDataSource auto &&... dataN) const |
| transform the input data and reduce it to a single value | |
| ALPAKA_FN_INLINE ALPAKA_FN_ACC constexpr void | concurrent (auto const &acc, auto &&func, alpaka::concepts::IDataSource auto &&data0, alpaka::concepts::IDataSource auto &&... dataN) const |
| execute the functor concurrently over the given data. | |
| 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 |
| template<uint32_t T_maxConcurrencyInByte, alpaka::concepts::Alignment T_MemAlignment = AutoAligned> | |
| ALPAKA_FN_INLINE ALPAKA_FN_ACC constexpr void | concurrent (auto const &acc, auto &&func, alpaka::concepts::IDataSource auto &&data0, alpaka::concepts::IDataSource auto &&... dataN) const |
| execute the functor concurrently over the given data. | |
| template<uint32_t T_maxConcurrencyInByte, alpaka::concepts::Alignment T_MemAlignment = AutoAligned> | |
| 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 |
Creates a functor operate on contiguous data concurrently.
The class is automatically configured to use the best fitting SIMD width for the given data type and is able to expose instruction level parallelism.
| T_WorkGroup | participating thread description. More than one thread can have the same index within the group. All worker with the same id will get the same index as result. |
| T_Traverse | Policy to configure the method used to find the next valid index for a worker. |
| T_IdxLayout | Policy to define how index data will be mapped to worker threads. |
Definition at line 33 of file SimdAlgo.hpp.
|
inlineconstexpr |
Definition at line 37 of file SimdAlgo.hpp.
|
inlineconstexpr |
| extents | number of elements to process in each dimension |
Definition at line 144 of file SimdAlgo.hpp.
|
inlineconstexpr |
| extents | number of elements to process in each dimension |
Definition at line 85 of file SimdAlgo.hpp.
|
inlineconstexpr |
execute the functor concurrently over the given data.
| T_maxConcurrencyInByte | Maximum number of bytes to be used for concurrency. Concurrency bytes describe a virtual simd pack size which is not exceeded. Internally a best fitting SIMD width is calculated and instruction parallelism is exposed based on T_maxConcurrencyInByte. |
| T_MemAlignment | alignment of the memory, if no alignments is given the alignment will be derived from the MdSpan data descriptions |
| func | the functor to be executed |
| data0 | the first data to be processed |
| dataN | the remaining data to be processed |
Definition at line 126 of file SimdAlgo.hpp.
|
inlineconstexpr |
execute the functor concurrently over the given data.
| func | the functor to be executed |
| data0 | the first data to be processed |
| dataN | the remaining data to be processed |
Definition at line 73 of file SimdAlgo.hpp.
|
inlineconstexpr |
Definition at line 56 of file SimdAlgo.hpp.
|
inlineconstexpr |
Definition at line 51 of file SimdAlgo.hpp.
|
inlineconstexpr |
Definition at line 46 of file SimdAlgo.hpp.
|
inlineconstexpr |
transform the input data and reduce it to a single value
| neutralElement | the neutral element for the reduction operation |
| reduceFunc | The binary reduction operation to be executed, e.g. std::plus. The functor should support Simd packages. |
| transformFunc | N-nary functor to be executed, values of all containers will be passed to the functor as arguments. The functor should support Simd packages. If not you can enforce the element wise execution by wrapping into ScalarFunc. If you would like to support stencil executions wrapp fn into StencilFunc. StencilFunc is getting all arguments as SimdPtr. If StencilFunc is used you should take care to not read outside of valid memory ranges by using sub-views to your input and output data. Optionally a transformFn can have an accelerator as first argument. If the result of this functor is a structured value providing an overload to simdize the type can improve the performance see alpaka::makeSimdized. |
| data0 | the first data to be processed |
| dataN | the remaining data to be processed |
| extents | number of elements to process in each dimension |
| T_maxConcurrencyInByte | Maximum number of bytes to be used for concurrency. Concurrency bytes describe a virtual simd pack size which is not exceeded. Internally a best fitting SIMD width is calculated and instruction parallelism is exposed based on T_maxConcurrencyInByte. |
| T_MemAlignment | alignment of the memory, if no alignments is given the alignment will be derived from the MdSpan data descriptions |
Definition at line 272 of file SimdAlgo.hpp.
|
inlineconstexpr |
transform the input data and reduce it to a single value
| neutralElement | the neutral element for the reduction operation |
| reduceFunc | The binary reduction operation to be executed, e.g. std::plus. The functor should support Simd packages. |
| transformFunc | N-nary functor to be executed, values of all containers will be passed to the functor as arguments. The functor should support Simd packages. If not you can enforce the element wise execution by wrapping into ScalarFunc. If you would like to support stencil executions wrapp fn into StencilFunc. StencilFunc is getting all arguments as SimdPtr. If StencilFunc is used you should take care to not read outside of valid memory ranges by using sub-views to your input and output data. Optionally a transformFn can have an accelerator as first argument. If the result of this functor is a structured value providing an overload to simdize the type can improve the performance see alpaka::makeSimdized. |
| data0 | the first data to be processed |
| dataN | the remaining data to be processed |
| extents | number of elements to process in each dimension |
Definition at line 205 of file SimdAlgo.hpp.
|
inlineconstexpr |
transform the input data and reduce it to a single value
| neutralElement | the neutral element for the reduction operation |
| reduceFunc | The binary reduction operation to be executed, e.g. std::plus. The functor should support Simd packages. |
| transformFunc | N-nary functor to be executed, values of all containers will be passed to the functor as arguments. The functor should support Simd packages. If not you can enforce the element wise execution by wrapping into ScalarFunc. If you would like to support stencil executions wrapp fn into StencilFunc. StencilFunc is getting all arguments as SimdPtr. If StencilFunc is used you should take care to not read outside of valid memory ranges by using sub-views to your input and output data. Optionally a transformFn can have an accelerator as first argument. If the result of this functor is a structured value providing an overload to simdize the type can improve the performance see alpaka::makeSimdized. |
| data0 | the first data to be processed |
| dataN | the remaining data to be processed |
| T_maxConcurrencyInByte | Maximum number of bytes to be used for concurrency. Concurrency bytes describe a virtual simd pack size which is not exceeded. Internally a best fitting SIMD width is calculated and instruction parallelism is exposed based on T_maxConcurrencyInByte. |
| T_MemAlignment | alignment of the memory, if no alignments is given the alignment will be derived from the MdSpan data descriptions |
Definition at line 241 of file SimdAlgo.hpp.
|
inlineconstexpr |
transform the input data and reduce it to a single value
| neutralElement | the neutral element for the reduction operation |
| reduceFunc | The binary reduction operation to be executed, e.g. std::plus. The functor should support Simd packages. |
| transformFunc | N-nary functor to be executed, values of all containers will be passed to the functor as arguments. The functor should support Simd packages. If not you can enforce the element wise execution by wrapping into ScalarFunc. If you would like to support stencil executions wrapp fn into StencilFunc. StencilFunc is getting all arguments as SimdPtr. If StencilFunc is used you should take care to not read outside of valid memory ranges by using sub-views to your input and output data. Optionally a transformFn can have an accelerator as first argument. If the result of this functor is a structured value providing an overload to simdize the type can improve the performance see alpaka::makeSimdized. |
| data0 | the first data to be processed |
| dataN | the remaining data to be processed |
Definition at line 183 of file SimdAlgo.hpp.