ParGeMSLR
|
The virtual class of all matrix classes. More...
#include <matrix.hpp>
Public Member Functions | |
MatrixClass () | |
The constructor of MatrixClass. More... | |
MatrixClass (const MatrixClass< T > &mat) | |
The copy constructor of MatrixClass. More... | |
MatrixClass (MatrixClass< T > &&mat) | |
The move constructor of MatrixClass. More... | |
virtual int | Clear () |
Free the current matrix. More... | |
virtual | ~MatrixClass () |
The destructor of MatrixClass. More... | |
virtual int | GetDataLocation () const |
Get the data location of the matrix. More... | |
virtual int | GetNumRowsLocal () const =0 |
Get the local number of rows of the matrix. More... | |
virtual int | GetNumColsLocal () const =0 |
Get the local number of columns of the matrix. More... | |
virtual long int | GetNumNonzeros () const |
Get the number of nonzeros in this matrix. More... | |
virtual int | Eye () |
Create an indentity matrix. More... | |
virtual int | Fill (const T &v) |
Fill the matrix pattern with constant value. More... | |
virtual int | Scale (const T &alpha) |
Scale the matrix. More... | |
virtual int | MatVec (char trans, const T &alpha, const VectorClass< T > &x, const T &beta, VectorClass< T > &y) |
In place Matrix-Vector product ==> y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y. More... | |
virtual int | MatVec (char trans, const T &alpha, const VectorClass< T > &x, const T &beta, const VectorClass< T > &y, VectorClass< T > &z) |
In place Matrix-Vector product ==> z := alpha*A*x + beta*y, or z := alpha*A'*x + beta*y. More... | |
virtual int | MoveData (const int &location) |
Move the data to another memory location. More... | |
PrecisionEnum | GetPrecision () const |
Return the precision of the matrix. More... | |
The virtual class of all matrix classes.
template pargemslr::MatrixClass< T >::MatrixClass | ( | ) |
The constructor of MatrixClass.
pargemslr::MatrixClass< T >::MatrixClass | ( | const MatrixClass< T > & | mat | ) |
The copy constructor of MatrixClass.
[in] | mat | The other matrix. |
pargemslr::MatrixClass< T >::MatrixClass | ( | MatrixClass< T > && | mat | ) |
The move constructor of MatrixClass.
[in] | mat | The other matrix. |
|
virtual |
The destructor of MatrixClass.
|
virtual |
Free the current matrix.
Reimplemented in pargemslr::DenseMatrixClass< T >, pargemslr::DenseMatrixClass< DataType >, and pargemslr::CooMatrixClass< T >.
|
virtual |
Create an indentity matrix.
Reimplemented in pargemslr::DenseMatrixClass< T >, pargemslr::DenseMatrixClass< DataType >, and pargemslr::CooMatrixClass< T >.
|
virtual |
Fill the matrix pattern with constant value.
[in] | v | The value to be filled. |
Reimplemented in pargemslr::DenseMatrixClass< T >, pargemslr::CooMatrixClass< T >, and pargemslr::DenseMatrixClass< DataType >.
|
virtual |
Get the data location of the matrix.
Reimplemented in pargemslr::DenseMatrixClass< T >, pargemslr::DenseMatrixClass< DataType >, and pargemslr::CooMatrixClass< T >.
|
pure virtual |
Get the local number of columns of the matrix.
Implemented in pargemslr::DenseMatrixClass< T >, pargemslr::DenseMatrixClass< DataType >, and pargemslr::CooMatrixClass< T >.
|
virtual |
Get the number of nonzeros in this matrix.
Reimplemented in pargemslr::DenseMatrixClass< T >, pargemslr::DenseMatrixClass< DataType >, and pargemslr::CooMatrixClass< T >.
|
pure virtual |
Get the local number of rows of the matrix.
Implemented in pargemslr::DenseMatrixClass< T >, pargemslr::DenseMatrixClass< DataType >, and pargemslr::CooMatrixClass< T >.
template PrecisionEnum pargemslr::MatrixClass< T >::GetPrecision | ( | ) | const |
Return the precision of the matrix.
[in] | location | The location move to. |
|
virtual |
In place Matrix-Vector product ==> z := alpha*A*x + beta*y, or z := alpha*A'*x + beta*y.
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The first vector. |
[in] | beta | The beta value. |
[in] | y | The second vector. |
[out] | z | The output vector. |
Reimplemented in pargemslr::DenseMatrixClass< T >, and pargemslr::DenseMatrixClass< DataType >.
|
virtual |
In place Matrix-Vector product ==> y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y.
[in] | trans | Whether or not transpose matrix A. |
[in] | alpha | The alpha value. |
[in] | x | The first vector. |
[in] | beta | The beta value. |
[in,out] | y | The second vector. |
Reimplemented in pargemslr::DenseMatrixClass< T >, and pargemslr::DenseMatrixClass< DataType >.
|
virtual |
Move the data to another memory location.
[in] | location | The location move to. |
Reimplemented in pargemslr::DenseMatrixClass< T >, pargemslr::DenseMatrixClass< DataType >, and pargemslr::CooMatrixClass< T >.
|
virtual |
Scale the matrix.
[in] | alpha | The scale. |
Reimplemented in pargemslr::DenseMatrixClass< T >, pargemslr::CooMatrixClass< T >, and pargemslr::DenseMatrixClass< DataType >.