Template Numerical Library version\ main:94209208
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
TNL::Algorithms::Multireduction< Devices::Sequential > Struct Reference

Public Member Functions

template<typename Result , typename DataFetcher , typename Reduction , typename Index >
void constexpr reduce (Result identity, DataFetcher dataFetcher, Reduction reduction, Index size, int n, Result *result)
 

Static Public Member Functions

template<typename Result , typename DataFetcher , typename Reduction , typename Index >
static constexpr void reduce (Result identity, DataFetcher dataFetcher, Reduction reduction, Index size, int n, Result *result)
 

Member Function Documentation

◆ reduce()

template<typename Result , typename DataFetcher , typename Reduction , typename Index >
static constexpr void TNL::Algorithms::Multireduction< Devices::Sequential >::reduce ( Result identity,
DataFetcher dataFetcher,
Reduction reduction,
Index size,
int n,
Result * result )
staticconstexpr

Parameters: identity: the identity element for the reduction operation, i.e. element which does not change the result of the reduction dataFetcher: callable object such that dataFetcher( i, j ) yields the i-th value to be reduced from the j-th dataset (i = 0,...,size-1; j = 0,...,n-1) reduction: callable object representing the reduction operation for example, it can be an instance of std::plus, std::logical_and, std::logical_or etc. size: the size of each dataset n: number of datasets to be reduced result: output array of size = n


The documentation for this struct was generated from the following files: