LAMA
lama::OpenMPUtils Class Reference

General utilities of the LAMA Interface implemented in OpenMP. More...

#include <OpenMPUtils.hpp>

Static Public Member Functions

template<typename ValueType , typename OtherValueType >
static void scale (ValueType mValues[], const IndexType n, const OtherValueType value)
 Scales matrix using a scalar.
static bool validIndexes (const IndexType array[], const IndexType n, const IndexType size)
template<typename ValueType >
static ValueType sum (const ValueType array[], const IndexType n)
 OpenMP implementation for UtilsInterface::Reductions::sum.
template<typename ValueType >
static void setVal (ValueType array[], const IndexType n, const ValueType val)
 OpenMP implementation for UtilsInterface::Setter::setVal.
template<typename ValueType >
static void scaleVal (ValueType array[], const IndexType n, const ValueType val)
template<typename ValueType >
static void setOrder (ValueType array[], const IndexType n)
 OpenMP implementation for UtilsInterface::Setter::setOrder.
template<typename ValueType >
static ValueType getValue (const ValueType *array, const IndexType i)
template<typename ValueType >
static ValueType maxval (const ValueType array[], const IndexType n)
template<typename ValueType >
static ValueType absMaxVal (const ValueType array[], const IndexType n)
 OpenMP implementation for UtilsInterface::Reductions::absMaxVal.
template<typename ValueType >
static ValueType absMaxDiffVal (const ValueType array1[], const ValueType array2[], const IndexType n)
 OpenMP implementation for UtilsInterface::Reductions::absMaxDiffVal.
template<typename ValueType1 , typename ValueType2 >
static void set (ValueType1 out[], const ValueType2 in[], const IndexType n)
template<typename ValueType1 , typename ValueType2 >
static void setGather (ValueType1 out[], const ValueType2 in[], const IndexType indexes[], const IndexType n)
 Set out[i] = in[ indexes[i] ], 0 <= i < n.
template<typename ValueType1 , typename ValueType2 >
static void setScatter (ValueType1 out[], const IndexType indexes[], const ValueType2 in[], const IndexType n)
 Set out[ indexes[i] ] = in [i].
template<typename ValueType >
static void invert (ValueType array[], const IndexType n)
 OpenMP implementation for UtilsInterface::Math::invert.
template<typename ValueType >
static void scale (ValueType array[], const IndexType n, const ValueType val)
 OpenMP implementation for UtilsInterface::Math::scale.
static void setInterface (struct UtilsInterface &Utils)
 Routine that registers all routines of this class at the LAMA interface.

Private Member Functions

 LAMA_LOG_DECL_STATIC_LOGGER (logger)

Detailed Description

General utilities of the LAMA Interface implemented in OpenMP.


Member Function Documentation

template<typename ValueType >
ValueType lama::OpenMPUtils::absMaxDiffVal ( const ValueType  array1[],
const ValueType  array2[],
const IndexType  n 
) [static]

OpenMP implementation for UtilsInterface::Reductions::absMaxDiffVal.

References lama::abs().

Referenced by setInterface().

template<typename ValueType >
ValueType lama::OpenMPUtils::absMaxVal ( const ValueType  array[],
const IndexType  n 
) [static]

OpenMP implementation for UtilsInterface::Reductions::absMaxVal.

References lama::abs().

Referenced by setInterface().

template<typename ValueType >
ValueType lama::OpenMPUtils::getValue ( const ValueType *  array,
const IndexType  i 
) [static]

Referenced by setInterface().

template<typename ValueType >
void lama::OpenMPUtils::invert ( ValueType  array[],
const IndexType  n 
) [static]

OpenMP implementation for UtilsInterface::Math::invert.

Referenced by setInterface().

template<typename ValueType >
ValueType lama::OpenMPUtils::maxval ( const ValueType  array[],
const IndexType  n 
) [static]
template<typename ValueType , typename OtherValueType >
void lama::OpenMPUtils::scale ( ValueType  mValues[],
const IndexType  n,
const OtherValueType  value 
) [static]

Scales matrix using a scalar.

Referenced by setInterface().

template<typename ValueType >
static void lama::OpenMPUtils::scale ( ValueType  array[],
const IndexType  n,
const ValueType  val 
) [static]

OpenMP implementation for UtilsInterface::Math::scale.

template<typename ValueType >
void lama::OpenMPUtils::scaleVal ( ValueType  array[],
const IndexType  n,
const ValueType  val 
) [static]
template<typename ValueType1 , typename ValueType2 >
void lama::OpenMPUtils::set ( ValueType1  out[],
const ValueType2  in[],
const IndexType  n 
) [static]
template<typename ValueType1 , typename ValueType2 >
void lama::OpenMPUtils::setGather ( ValueType1  out[],
const ValueType2  in[],
const IndexType  indexes[],
const IndexType  n 
) [static]

Set out[i] = in[ indexes[i] ], 0 <= i < n.

Referenced by lama::CSRStorage< T >::getDiagonalImpl(), and setInterface().

void lama::OpenMPUtils::setInterface ( struct UtilsInterface Utils) [static]

Routine that registers all routines of this class at the LAMA interface.

param[inout] UtilsInterface struct to register all routines implemented in OpenMP

References absMaxDiffVal(), absMaxVal(), getValue(), invert(), LAMA_INTERFACE_REGISTER, LAMA_INTERFACE_REGISTER_T, LAMA_INTERFACE_REGISTER_TT, maxval(), scale(), setGather(), setOrder(), setScatter(), setVal(), sum(), and validIndexes().

Referenced by lama::OpenMPInterface::OpenMPInterface().

template<typename ValueType >
void lama::OpenMPUtils::setOrder ( ValueType  array[],
const IndexType  n 
) [static]
template<typename ValueType1 , typename ValueType2 >
void lama::OpenMPUtils::setScatter ( ValueType1  out[],
const IndexType  indexes[],
const ValueType2  in[],
const IndexType  n 
) [static]

Set out[ indexes[i] ] = in [i].

Referenced by lama::CSRStorage< T >::setDiagonalImpl(), and setInterface().

template<typename ValueType >
ValueType lama::OpenMPUtils::sum ( const ValueType  array[],
const IndexType  n 
) [static]

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