LAMA
lama::OpenMPJDSUtils Class Reference

This class provides OpenMP implementations as needed for JDSUtilsInterface. More...

#include <OpenMPJDSUtils.hpp>

Public Member Functions

template<typename ValueType >
void jacobi (ValueType solution[], const IndexType numRows, const IndexType jdsPerm[], const IndexType jdsIlg[], const IndexType UNUSED(jdsNumDiagonals), const IndexType jdsDlg[], const IndexType jdsJA[], const ValueType jdsValues[], const ValueType oldSolution[], const ValueType rhs[], const ValueType omega, class SyncToken *syncToken)

Static Public Member Functions

template<typename ValueType >
static void setDiagonalWithScalar (const IndexType numDiagonal, ValueType values[], Scalar scalar)
 This method replaces the diagonal.
template<typename ValueType , typename OtherValueType >
static void scaleValue (const IndexType numRows, const IndexType perm[], const IndexType ilg[], const IndexType dlg[], ValueType mValues[], const OtherValueType values[])
 This method scales the matrix using an value vector.
template<typename ValueType , typename OtherValueType >
static void getRow (OtherValueType row[], const IndexType i, const IndexType numColumns, const IndexType numRows, const IndexType perm[], const IndexType ilg[], const IndexType dlg[], const IndexType ja[], const ValueType values[])
 This method sets row as dens vector of the i'th row of the matrix.
template<typename ValueType , typename NoType >
static ValueType getValue (const IndexType i, const IndexType j, const IndexType numRows, const IndexType *dlg, const IndexType *ilg, const IndexType *perm, const IndexType *ja, const ValueType *values)
static bool checkDiagonalProperty (const IndexType numDiagonals, const IndexType numRows, const IndexType numColumns, const IndexType perm[], const IndexType ja[], const IndexType dlg[])
 This method checks if the matrix has diagonal property.
static bool check (const IndexType numRows, const IndexType numValues, const IndexType numColumns, const IndexType ja[], const IndexType ilg[], const IndexType dlg[])
 This method checks if the matrix indexes are correct.
static void sortRows (IndexType array[], IndexType perm[], const IndexType n)
 Bucket sort for row sorting.
static void setInversePerm (IndexType inversePerm[], const IndexType perm[], const IndexType n)
 Compute the inverse permutation as specified in JDSUtilsInterface::Sort::setInversePerm.
static IndexType ilg2dlg (IndexType dlg[], const IndexType numDiagonals, const IndexType ilg[], const IndexType numRows)
 Compute dlg array from ilg array as specified in JDSUtilsInterface::Conversions::ilg2dlg.
template<typename JDSValueType , typename CSRValueType >
static void getCSRValues (IndexType csrJA[], CSRValueType csrValues[], const IndexType csrIA[], const IndexType numRows, const IndexType jdsPerm[], const IndexType jdsILG[], const IndexType jdsDLG[], const IndexType jdsJA[], const JDSValueType jdsValues[])
 Conversion of JDS to CSR as specified in JDSUtilsInterface::Conversions::getCSRValues.
template<typename JDSValueType , typename CSRValueType >
static void setCSRValues (IndexType jdsJA[], JDSValueType jdsValues[], const IndexType numRows, const IndexType jdsPerm[], const IndexType jdsILG[], const IndexType jdsDLG[], const IndexType csrIA[], const IndexType csrJA[], const CSRValueType csrValues[])
 Conversion of CSR to JDS as specified in JDSUtilsInterface::Conversions::setCSRValues.
template<typename ValueType >
static void normalGEMV (ValueType result[], const ValueType alpha, const ValueType x[], const ValueType beta, const ValueType y[], const IndexType numRows, const IndexType perm[], const IndexType jdsILG[], const IndexType ndlg, const IndexType jdsDLG[], const IndexType jdsJA[], const ValueType jdsValues[], SyncToken *syncToken)
 Implementation for JDSUtilsInterface::Mult:normalGEMV with OpenMP on Host.
template<typename ValueType >
static void jacobi (ValueType solution[], const IndexType numRows, const IndexType jdsPerm[], const IndexType jdsIlg[], const IndexType jdsNumDiagonals, const IndexType jdsDlg[], const IndexType jdsJA[], const ValueType jdsValues[], const ValueType oldSolution[], const ValueType rhs[], const ValueType omega, SyncToken *syncToken)
template<typename ValueType >
static void jacobiHalo (ValueType solution[], const IndexType numRows, const ValueType localDiagonal[], const IndexType numDiagonals, const IndexType jdsHaloPerm[], const IndexType jdsHaloIlg[], const IndexType jdsHaloDlg[], const IndexType jdsHaloJA[], const ValueType jdsHaloValues[], const ValueType oldSolution[], const ValueType omega, SyncToken *syncToken)
static void setInterface (struct JDSUtilsInterface &JDSUtils)
 Method for registration of module routines at the interface.

Private Member Functions

 LAMA_LOG_DECL_STATIC_LOGGER (logger)

Detailed Description

This class provides OpenMP implementations as needed for JDSUtilsInterface.


Member Function Documentation

bool lama::OpenMPJDSUtils::check ( const IndexType  numRows,
const IndexType  numValues,
const IndexType  numColumns,
const IndexType  ja[],
const IndexType  ilg[],
const IndexType  dlg[] 
) [static]

This method checks if the matrix indexes are correct.

References lama::OpenMPUtils::sum().

Referenced by setInterface().

bool lama::OpenMPJDSUtils::checkDiagonalProperty ( const IndexType  numDiagonals,
const IndexType  numRows,
const IndexType  numColumns,
const IndexType  perm[],
const IndexType  ja[],
const IndexType  dlg[] 
) [static]

This method checks if the matrix has diagonal property.

References lama::min().

Referenced by setInterface().

template<typename JDSValueType , typename CSRValueType >
void lama::OpenMPJDSUtils::getCSRValues ( IndexType  csrJA[],
CSRValueType  csrValues[],
const IndexType  csrIA[],
const IndexType  numRows,
const IndexType  jdsPerm[],
const IndexType  jdsILG[],
const IndexType  jdsDLG[],
const IndexType  jdsJA[],
const JDSValueType  jdsValues[] 
) [static]

Conversion of JDS to CSR as specified in JDSUtilsInterface::Conversions::getCSRValues.

Referenced by setInterface().

template<typename ValueType , typename OtherValueType >
void lama::OpenMPJDSUtils::getRow ( OtherValueType  row[],
const IndexType  i,
const IndexType  numColumns,
const IndexType  numRows,
const IndexType  perm[],
const IndexType  ilg[],
const IndexType  dlg[],
const IndexType  ja[],
const ValueType  values[] 
) [static]

This method sets row as dens vector of the i'th row of the matrix.

Referenced by setInterface().

template<typename ValueType , typename NoType >
ValueType lama::OpenMPJDSUtils::getValue ( const IndexType  i,
const IndexType  j,
const IndexType  numRows,
const IndexType dlg,
const IndexType ilg,
const IndexType perm,
const IndexType ja,
const ValueType *  values 
) [static]

Referenced by setInterface().

IndexType lama::OpenMPJDSUtils::ilg2dlg ( IndexType  dlg[],
const IndexType  numDiagonals,
const IndexType  ilg[],
const IndexType  numRows 
) [static]

Compute dlg array from ilg array as specified in JDSUtilsInterface::Conversions::ilg2dlg.

References LAMA_ASSERT_EQUAL_DEBUG.

Referenced by setInterface().

template<typename ValueType >
static void lama::OpenMPJDSUtils::jacobi ( ValueType  solution[],
const IndexType  numRows,
const IndexType  jdsPerm[],
const IndexType  jdsIlg[],
const IndexType  jdsNumDiagonals,
const IndexType  jdsDlg[],
const IndexType  jdsJA[],
const ValueType  jdsValues[],
const ValueType  oldSolution[],
const ValueType  rhs[],
const ValueType  omega,
SyncToken syncToken 
) [static]

Referenced by setInterface().

template<typename ValueType >
void lama::OpenMPJDSUtils::jacobi ( ValueType  solution[],
const IndexType  numRows,
const IndexType  jdsPerm[],
const IndexType  jdsIlg[],
const IndexType   UNUSEDjdsNumDiagonals,
const IndexType  jdsDlg[],
const IndexType  jdsJA[],
const ValueType  jdsValues[],
const ValueType  oldSolution[],
const ValueType  rhs[],
const ValueType  omega,
class SyncToken syncToken 
)
template<typename ValueType >
void lama::OpenMPJDSUtils::jacobiHalo ( ValueType  solution[],
const IndexType  numRows,
const ValueType  localDiagonal[],
const IndexType  numDiagonals,
const IndexType  jdsHaloPerm[],
const IndexType  jdsHaloIlg[],
const IndexType  jdsHaloDlg[],
const IndexType  jdsHaloJA[],
const ValueType  jdsHaloValues[],
const ValueType  oldSolution[],
const ValueType  omega,
SyncToken syncToken 
) [static]

Referenced by setInterface().

template<typename ValueType >
void lama::OpenMPJDSUtils::normalGEMV ( ValueType  result[],
const ValueType  alpha,
const ValueType  x[],
const ValueType  beta,
const ValueType  y[],
const IndexType  numRows,
const IndexType  perm[],
const IndexType  jdsILG[],
const IndexType  ndlg,
const IndexType  jdsDLG[],
const IndexType  jdsJA[],
const ValueType  jdsValues[],
SyncToken syncToken 
) [static]

Implementation for JDSUtilsInterface::Mult:normalGEMV with OpenMP on Host.

Referenced by setInterface().

template<typename ValueType , typename OtherValueType >
void lama::OpenMPJDSUtils::scaleValue ( const IndexType  numRows,
const IndexType  perm[],
const IndexType  ilg[],
const IndexType  dlg[],
ValueType  mValues[],
const OtherValueType  values[] 
) [static]

This method scales the matrix using an value vector.

Referenced by setInterface().

template<typename JDSValueType , typename CSRValueType >
void lama::OpenMPJDSUtils::setCSRValues ( IndexType  jdsJA[],
JDSValueType  jdsValues[],
const IndexType  numRows,
const IndexType  jdsPerm[],
const IndexType  jdsILG[],
const IndexType  jdsDLG[],
const IndexType  csrIA[],
const IndexType  csrJA[],
const CSRValueType  csrValues[] 
) [static]

Conversion of CSR to JDS as specified in JDSUtilsInterface::Conversions::setCSRValues.

Referenced by setInterface().

template<typename ValueType >
void lama::OpenMPJDSUtils::setDiagonalWithScalar ( const IndexType  numDiagonal,
ValueType  values[],
Scalar  scalar 
) [static]

This method replaces the diagonal.

References lama::Scalar::getValue().

Referenced by setInterface().

void lama::OpenMPJDSUtils::setInversePerm ( IndexType  inversePerm[],
const IndexType  perm[],
const IndexType  n 
) [static]

Compute the inverse permutation as specified in JDSUtilsInterface::Sort::setInversePerm.

References LAMA_ASSERT_DEBUG.

Referenced by setInterface().

void lama::OpenMPJDSUtils::sortRows ( IndexType  array[],
IndexType  perm[],
const IndexType  n 
) [static]

Bucket sort for row sorting.

References lama::OpenMPUtils::maxval().

Referenced by setInterface().


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