LAMA
lama::CSRUtilsInterface::Offsets Struct Reference

Structure with type definitions for offset routines. More...

#include <LAMAInterface.hpp>

Public Types

typedef IndexType(* sizes2offsets )(IndexType array[], const IndexType n)
 This method makes an offset array from the sizes.
typedef void(* offsets2sizes )(IndexType sizes[], const IndexType offsets[], const IndexType n)
 This method computes size array from an offset array.
typedef bool(* validOffsets )(const IndexType array[], const IndexType n, const IndexType total)
 check for a legal offset array.
typedef void(* matrixAddSizes )(IndexType cSizes[], const IndexType numRows, const IndexType numColumns, bool diagonalProperty, const IndexType aIA[], const IndexType aJA[], const IndexType bIA[], const IndexType bJA[])
 This method computes the row sizes for result matrix C of matrix add A + B.
typedef void(* matrixMultiplySizes )(IndexType cSizes[], const IndexType numRows, const IndexType numColumns, bool diagonalProperty, const IndexType aIA[], const IndexType aJA[], const IndexType bIA[], const IndexType bJA[])
 This method computes the row sizes for result matrix C of matrix multiplication A x B.
typedef void(* matrixMultiplyJA )(IndexType cJA[], const IndexType cIA[], const IndexType numRows, const IndexType numColumns, bool diagonalProperty, const IndexType aIA[], const IndexType aJA[], const IndexType bIA[], const IndexType bJA[])
 This method computes the column indexes for result matrix C of matrix multiplication A x B.
typedef bool(* hasDiagonalProperty )(const IndexType numDiagonals, const IndexType csrIA[], const IndexType csrJA[])

Detailed Description

Structure with type definitions for offset routines.


Member Typedef Documentation

typedef bool( * lama::CSRUtilsInterface::Offsets::hasDiagonalProperty)(const IndexType numDiagonals, const IndexType csrIA[], const IndexType csrJA[])
typedef void( * lama::CSRUtilsInterface::Offsets::matrixAddSizes)(IndexType cSizes[], const IndexType numRows, const IndexType numColumns, bool diagonalProperty, const IndexType aIA[], const IndexType aJA[], const IndexType bIA[], const IndexType bJA[])

This method computes the row sizes for result matrix C of matrix add A + B.

Parameters:
[out]cSizesarray of length numRows, will contain number of entries
[in]numRowsnumber of rows for matrix A and B
[in]numColumnsnumber of columns for matrix A and B
[in]diagonalPropertyif true, diagonal elements will count in any case
[in]aIA,aJAare the index arrays of matrix A
[in]bIA,bJAare the index arrays of matrix B

Note: filling the result matrix must use the same flag for diagonalProperty otherwise the row sizes/offsets will not match

typedef void( * lama::CSRUtilsInterface::Offsets::matrixMultiplyJA)(IndexType cJA[], const IndexType cIA[], const IndexType numRows, const IndexType numColumns, bool diagonalProperty, const IndexType aIA[], const IndexType aJA[], const IndexType bIA[], const IndexType bJA[])

This method computes the column indexes for result matrix C of matrix multiplication A x B.

Parameters:
[out]cJAarray will contain the column indexes, size is cIA[numRows]
[in]CIAarray with row offsets as computed by matrixMultiplySizes + sizes2offsets
[in]numRowsnumber of rows for matrix C and A
[in]numColumnsnumber of columns for matrix C and B
[in]diagonalPropertyif true, diagonal elements will filled in at begin of each row
[in]aIA,aJAare the index arrays of matrix A
[in]bIA,bJAare the index arrays of matrix B
typedef void( * lama::CSRUtilsInterface::Offsets::matrixMultiplySizes)(IndexType cSizes[], const IndexType numRows, const IndexType numColumns, bool diagonalProperty, const IndexType aIA[], const IndexType aJA[], const IndexType bIA[], const IndexType bJA[])

This method computes the row sizes for result matrix C of matrix multiplication A x B.

Parameters:
[out]cSizesarray of length numRows, will contain number of entries
[in]numRowsnumber of rows for matrix C and A
[in]numColumnsnumber of columns for matrix C and B
[in]diagonalPropertyif true, diagonal elements will count in any case
[in]aIA,aJAare the index arrays of matrix A
[in]bIA,bJAare the index arrays of matrix B
typedef void( * lama::CSRUtilsInterface::Offsets::offsets2sizes)(IndexType sizes[], const IndexType offsets[], const IndexType n)

This method computes size array from an offset array.

Parameters:
[out]sizeswill contain the sizes (e.g. for each row ), has numRows entries
[in]offsetscontains the offsets, has numRows + 1 entries
[in]nis size of array sizes, n + 1 is size of array offsets
           offsets :   0   5  11   16  19  19  21  23
           sizes   :   5   6   5    3   0   2   2  

This method makes an offset array from the sizes.

Parameters:
[in,out]arraycontains counter values and later the offsets
[in]nis the number of values, array must contain one additional value
Returns:
the total number of values
    array  :    3    7   8   4   2  x 
    array  :    0   10  15  12  16  18  -> returns 18 

Important: sizes must have numRows + 1 allocated entries.

typedef bool( * lama::CSRUtilsInterface::Offsets::validOffsets)(const IndexType array[], const IndexType n, const IndexType total)

check for a legal offset array.


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