LAMA
lama::COOUtilsInterface::Conversions< COOValueType, CSRValueType > Struct Template Reference

#include <LAMAInterface.hpp>

Public Types

typedef void(* getCSRValues )(IndexType csrJA[], CSRValueType csrValues[], IndexType csrIA[], const IndexType numRow, const IndexType numValues, const IndexType cooIA[], const IndexType cooJA[], const COOValueType cooValues[])
 Helper routine for conversion COO to CSR.
typedef void(* setCSRValues )(IndexType cooIA[], IndexType cooJA[], COOValueType cooValues[], const IndexType numRows, const IndexType numDiagonals, const IndexType csrIA[], const IndexType csrJA[], const CSRValueType csrValues[], const bool csrDiagonalProperty)
 Conversion of CSR data to COO data.

template<typename COOValueType, typename CSRValueType>
struct lama::COOUtilsInterface::Conversions< COOValueType, CSRValueType >


Member Typedef Documentation

template<typename COOValueType , typename CSRValueType >
typedef void( * lama::COOUtilsInterface::Conversions< COOValueType, CSRValueType >::getCSRValues)(IndexType csrJA[], CSRValueType csrValues[], IndexType csrIA[], const IndexType numRow, const IndexType numValues, const IndexType cooIA[], const IndexType cooJA[], const COOValueType cooValues[])

Helper routine for conversion COO to CSR.

Parameters:
[out]csrJAwill contain the column indexes
[out]csrValueswill contain the matrix elements
[in]csrIAis the array with the offsets (must already be available before)
  • csrIA has numRows + 1 entries
  • csrJA and csrValues must have at least numValues entries, numValues = csrIA[numRows]

Note: this routine preserves the diagonal property of the COO format

template<typename COOValueType , typename CSRValueType >
typedef void( * lama::COOUtilsInterface::Conversions< COOValueType, CSRValueType >::setCSRValues)(IndexType cooIA[], IndexType cooJA[], COOValueType cooValues[], const IndexType numRows, const IndexType numDiagonals, const IndexType csrIA[], const IndexType csrJA[], const CSRValueType csrValues[], const bool csrDiagonalProperty)

Conversion of CSR data to COO data.

Parameters:
[in]numRowsis number of rows
[in]numDiagonalsis number of diagonal elements to be stored at the beginning
[in]csrIAis CSR offset array
[in]csrJAis CSR column indexes, size is csrIA[numRows]
[in]csrValuesis CSR non-zero elements, size is csrIA[numRows]
[in]csrDiagonalPropertyis true if CSR data has diagonal property

Be careful if COO data should have diagonal property, but CSR data has not


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