LAMA
lama::UtilsInterface::Reductions< ValueType > Struct Template Reference

Structure with type defintions for all reduction methods. More...

#include <LAMAInterface.hpp>

Public Types

typedef ValueType(* sum )(const ValueType array[], const IndexType n)
 Sum n contiguously stored values.
typedef ValueType(* maxval )(const ValueType array[], const IndexType n)
typedef ValueType(* absMaxVal )(const ValueType array[], const IndexType n)
 Absolute maximum of n contiguously stored values.
typedef ValueType(* absMaxDiffVal )(const ValueType array1[], const ValueType array2[], const IndexType n)
 Building absolute maximum of element-wise difference of vector elements.

Detailed Description

template<typename ValueType>
struct lama::UtilsInterface::Reductions< ValueType >

Structure with type defintions for all reduction methods.

Template Parameters:
ValueTypespecifies the value type used in the reduction.

Member Typedef Documentation

template<typename ValueType >
typedef ValueType( * lama::UtilsInterface::Reductions< ValueType >::absMaxDiffVal)(const ValueType array1[], const ValueType array2[], const IndexType n)

Building absolute maximum of element-wise difference of vector elements.

Parameters:
array1i[in]first array
array2i[in]second array
nsize of array1 and array2
Returns:
max( abs( array1[i] - array2[i] ) ), $ 0 \le i < n $

Function is helpful to compute maximum norm for vectors and matrices

template<typename ValueType >
typedef ValueType( * lama::UtilsInterface::Reductions< ValueType >::absMaxVal)(const ValueType array[], const IndexType n)

Absolute maximum of n contiguously stored values.

template<typename ValueType >
typedef ValueType( * lama::UtilsInterface::Reductions< ValueType >::maxval)(const ValueType array[], const IndexType n)
template<typename ValueType >
typedef ValueType( * lama::UtilsInterface::Reductions< ValueType >::sum)(const ValueType array[], const IndexType n)

Sum n contiguously stored values.

Parameters:
xis an array of values
nis the size of x
Returns:
sum of all values in x

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