LAMA
|
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[]) |
Structure with type definitions for offset routines.
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.
[out] | cSizes | array of length numRows, will contain number of entries |
[in] | numRows | number of rows for matrix A and B |
[in] | numColumns | number of columns for matrix A and B |
[in] | diagonalProperty | if true, diagonal elements will count in any case |
[in] | aIA,aJA | are the index arrays of matrix A |
[in] | bIA,bJA | are 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.
[out] | cJA | array will contain the column indexes, size is cIA[numRows] |
[in] | CIA | array with row offsets as computed by matrixMultiplySizes + sizes2offsets |
[in] | numRows | number of rows for matrix C and A |
[in] | numColumns | number of columns for matrix C and B |
[in] | diagonalProperty | if true, diagonal elements will filled in at begin of each row |
[in] | aIA,aJA | are the index arrays of matrix A |
[in] | bIA,bJA | are 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.
[out] | cSizes | array of length numRows, will contain number of entries |
[in] | numRows | number of rows for matrix C and A |
[in] | numColumns | number of columns for matrix C and B |
[in] | diagonalProperty | if true, diagonal elements will count in any case |
[in] | aIA,aJA | are the index arrays of matrix A |
[in] | bIA,bJA | are 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.
[out] | sizes | will contain the sizes (e.g. for each row ), has numRows entries |
[in] | offsets | contains the offsets, has numRows + 1 entries |
[in] | n | is 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
typedef IndexType( * lama::CSRUtilsInterface::Offsets::sizes2offsets)(IndexType array[], const IndexType n) |
This method makes an offset array from the sizes.
[in,out] | array | contains counter values and later the offsets |
[in] | n | is the number of values, array must contain one additional value |
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.