![]() |
ryujin 2.1.1 revision 71cdc42292164f8095c0bd62c4ea75ebcfac58fa
|
#include <source/loop.h>
Public Types | |
| using | scalar_type = typename ElementReducer::value_type |
| using | value_type = scalar_type[] |
Public Member Functions | |
| ArrayReducer (scalar_type *data, const unsigned int n) | |
| ArrayReducer (std::vector< scalar_type > &values) | |
| KOKKOS_INLINE_FUNCTION void | init (scalar_type *values) const |
| KOKKOS_INLINE_FUNCTION void | join (scalar_type *destination, const scalar_type *source) const |
| template<typename Contribution > requires std::invocable<const Contribution &, unsigned int> | |
| KOKKOS_INLINE_FUNCTION void | join (scalar_type *destination, const Contribution &contribution) const |
| scalar_type * | reference () const |
Public Attributes | |
| const unsigned int | value_count |
A reducer for reducing an array of values elementwise with a Kokkos reducer (such as Kokkos::Sum, Kokkos::Min, or Kokkos::Max) that can be used with reduction_loop(). The reducer takes a result object as argument in which it folds in contributions of the loop body:
The loop body itself has to return a callable object j -> Number returning the j-th partial result that will be folded back into the result.
| using ryujin::ArrayReducer< ElementReducer >::scalar_type = typename ElementReducer::value_type |
| using ryujin::ArrayReducer< ElementReducer >::value_type = scalar_type[] |
|
inline |
|
inlineexplicit |
|
inline |
Definition at line 278 of file loop.h.
References ryujin::ArrayReducer< ElementReducer >::value_count.
|
inline |
Definition at line 285 of file loop.h.
References ryujin::ArrayReducer< ElementReducer >::value_count.
|
inline |
Definition at line 293 of file loop.h.
References ryujin::ArrayReducer< ElementReducer >::value_count.
|
inline |
| const unsigned int ryujin::ArrayReducer< ElementReducer >::value_count |
Definition at line 263 of file loop.h.
Referenced by ryujin::ArrayReducer< ElementReducer >::init(), ryujin::ArrayReducer< ElementReducer >::join(), and ryujin::ArrayReducer< ElementReducer >::join().