#include <Kokkos_OskiMatrix.hpp>
Public Member Functions | |
Constructors/Destructor | |
OskiMatrix (void) | |
Default OskiMatrix constuctor. | |
OskiMatrix (const OskiMatrix &source) | |
Copy constructor. | |
virtual | ~OskiMatrix () |
HbMatrix Destructor. | |
OskiMatrix Initialization Methods | |
int | initializeStructure (OrdinalType numRows, OrdinalType numCols, bool isRowOriented, OrdinalType *pntr, OrdinalType *indx, oski_inmatprop_t type=MAT_GENERAL, bool diagExplicit=true, int indexBase=0, bool indexUnsorted=true, bool indexRepeated=true) |
Initialize structure of the matrix. | |
int | initializeValues (ScalarType *values) |
Initialize matrix values. | |
Matrix Format Initialization Methods | |
int | initializeValues (ScalarType **values) |
Initialize structure of matrix. | |
Matrix entry access methods | |
int | getIndices (OrdinalType i, OrdinalType &numRowEntries, OrdinalType *&indices) const |
Returns number of entries in ith row/column, and pointer to an array of these indices. | |
int | getValues (OrdinalType i, ScalarType *&values) const |
Returns a pointer to an array of values for the ith row/column. | |
Validity tests | |
virtual int | checkStructure () const |
Check if the matrix structure is valid for user-assertion of Upper/Lower Triangular and implicit unit diagonal. | |
Matrix Attribute access methods | |
bool | getIsRowOriented () const |
Returns true if the compressed index matrix was formed using an OSKI CSR or CSC matrix. | |
virtual bool | getIsUpperTriangular () const |
Returns true if the compressed index matrix has no entries below the diagonal. | |
virtual bool | getIsLowerTriangular () const |
Returns true if the compressed index matrix has no entries above the diagonal. | |
virtual bool | getHasImplicitUnitDiagonal () const |
Returns true if the compressed index matrix has no diagonal entries, but should be treated as unit diagonal. | |
OrdinalType | getNumRows () const |
Number of rows. | |
OrdinalType | getNumCols () const |
Number of columns. | |
OrdinalType | getNumEntries () const |
Number of matrix entries. | |
oski_matrix_t | getA_tunable () const |
Underlying OSKI Matrix. | |
Protected Attributes | |
oski_matrix_t | A_tunable_ |
bool | dataInitialized_ |
OrdinalType | numRows_ |
OrdinalType | numCols_ |
OrdinalType | numEntries_ |
ScalarType * | allValues_ |
OrdinalType ** | indices_ |
OrdinalType * | allIndices_ |
OrdinalType * | pntr_ |
bool | isRowOriented_ |
bool | hasDiagonalEntries_ |
oski_inmatprop_t | matrixType_ |
oski_inmatprop_t | diagExplicit_ |
oski_inmatprop_t | indexBase_ |
oski_inmatprop_t | indexUnsorted_ |
oski_inmatprop_t | indexRepeated_ |
bool | isOskiMatrix_ |
The Kokkos::OskiMatrix implements the Kokkos::CisMatrix interface. SAY MORE HERE
int OskiMatrix::checkStructure | ( | ) | const [inline, virtual] |
Check if the matrix structure is valid for user-assertion of Upper/Lower Triangular and implicit unit diagonal.
int OskiMatrix::getIndices | ( | OrdinalType | i, | |
OrdinalType & | numRowEntries, | |||
OrdinalType *& | indices | |||
) | const [inline, virtual] |
Returns number of entries in ith row/column, and pointer to an array of these indices.
Extract the number of entries and a pointer to the indices in the ith row/column of the matrix. Note that the indices are not copied by this method. Memory allocation is handled by the matrix object itself.
i | (In) The row (if isRowOriented() is true) or column that should be returned. | |
numRowEntries | (Out) The number of entries in the ith row/column. | |
indices | (Out) A pointer to the list of indices in the ith row/column. |
Implements Kokkos::CisMatrix< OrdinalType, ScalarType >.
bool Kokkos::OskiMatrix< OrdinalType, ScalarType >::getIsRowOriented | ( | ) | const [inline, virtual] |
Returns true if the compressed index matrix was formed using an OSKI CSR or CSC matrix.
Returns true if the compressed index matrix should be interpreted as a row matrix.
Implements Kokkos::CisMatrix< OrdinalType, ScalarType >.
int OskiMatrix::getValues | ( | OrdinalType | i, | |
ScalarType *& | values | |||
) | const [inline, virtual] |
Returns a pointer to an array of values for the ith row/column.
Extract the values in the ith row/column of the matrix. Note that the values are not copied by this method. Memory allocation is handled by the matrix object itself.
i | (In) The row (if isRowOriented() is true) or column that should be returned. | |
numEntries | (Out) The number of entries in the ith row/column. | |
indices | (Out) A pointer to the list of indices in the ith row/column. |
Implements Kokkos::CisMatrix< OrdinalType, ScalarType >.
int OskiMatrix::initializeStructure | ( | OrdinalType | numRows, | |
OrdinalType | numCols, | |||
bool | isRowOriented, | |||
OrdinalType * | pntr, | |||
OrdinalType * | indx, | |||
oski_inmatprop_t | type = MAT_GENERAL , |
|||
bool | diagExplicit = true , |
|||
int | indexBase = 0 , |
|||
bool | indexUnsorted = true , |
|||
bool | indexRepeated = true | |||
) | [inline] |
Initialize structure of the matrix.
numRows | (In) Row dimension. | |
numCols | (In) Column dimension. | |
isRowOriented | - (In) If true, the compressed index storage will be interpreted as row indices. If false, then indices will be interpreted as column indices. | |
pntr | (In) Array of offsets into indx. indx[pntr[i]] contains the first index of the ith row (if isRowOriented is true) or ith column (if isRowOriented is false). | |
indx | (In) Packed array of indices. indx[pntr[i]] contains the first index of the ith row (if isRowOriented is true) or ith column (if isRowOriented is false). | |
type | (In) Matrix type. OSKI supports: MAT_GENERAL (default), MAT_TRI_UPPER, MAT_TRI_LOWER, MAT_SYMM_UPPER, MAT_SYMM_LOWER, MAT_SYMM_FULL, MAT_HERM_UPPER, MAT_HERM_LOWER, MAT_HERM_FULL. | |
diagExplicit | (In) Non-zero diagonal entries are specified explicitly (default true). False implies all diagonal entries are implicitly zero. | |
indexBase | (In) Array indicies can start at zero (default) or one. | |
indexUnsorted | (In) Indices within each row (column) appear in any order (default: true). False indicates indices are sorted in increasing order. | |
indexRepeated | (In) Indicies may appear multiple times (default: true). False indicates all indices are unique. |
int Kokkos::OskiMatrix< OrdinalType, ScalarType >::initializeValues | ( | ScalarType ** | values | ) |
Initialize structure of matrix.
numRows | (In) Row dimension. | |
numCols | (In) Column dimension. | |
isRowOriented | (In) If true, the compressed index storage will be interpreted as row indices. If false, then indices will be interpreted as column indices. | |
profile | (In) Array of index counts for indx. pntr[i] equals the number of entries in the ith row (if isRowOriented is true) or ith column (if isRowOriented is false). | |
indx | (In) An array of pointers to arrays of indices. indx[i][0] contains the first index of the ith row (if isRowOriented is true) or ith column (if isRowOriented is false). |
values | (In) An array of pointers to arrays of matrix values. values[[i][0] contains the first entry of the ith row (if isRowOriented is true) or ith column (if isRowOriented is false). |
int OskiMatrix::initializeValues | ( | ScalarType * | values | ) | [inline] |
Initialize matrix values.
values | (In) Packed array of matrix values. values[pntr[i]] contains the first entry of the ith row (if isRowOriented is true) or ith column (if isRowOriented is false). |