Go to the documentation of this file. 1 #ifndef PARGEMSLR_MATRIX_H
2 #define PARGEMSLR_MATRIX_H
9 #include "../utils/utils.hpp"
10 #include "../utils/parallel.hpp"
11 #include "../utils/memory.hpp"
12 #include "../vectors/vector.hpp"
100 virtual int Fill(
const T &v);
108 virtual int Scale(
const T &alpha);
141 virtual int MoveData(
const int &location);
virtual int Fill(const T &v)
Fill the matrix pattern with constant value.
Definition: matrix.cpp:92
virtual int MoveData(const int &location)
Move the data to another memory location.
Definition: matrix.cpp:137
virtual int Scale(const T &alpha)
Scale the matrix.
Definition: matrix.cpp:104
virtual int GetNumColsLocal() const =0
Get the local number of columns of the matrix.
virtual long int GetNumNonzeros() const
Get the number of nonzeros in this matrix.
Definition: matrix.cpp:70
The virtual class of real/complex vector class.
Definition: vector.hpp:126
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.
Definition: matrix.cpp:115
virtual ~MatrixClass()
The destructor of MatrixClass.
Definition: matrix.cpp:50
The template class complex.
Definition: complex.hpp:24
virtual int Clear()
Free the current matrix.
Definition: matrix.cpp:38
The virtual class of all matrix classes.
Definition: matrix.hpp:23
class pargemslr::ParallelLogClass parallel_log
The data structure for parallel computing, including data structures for MPI and CUDA.
virtual int GetDataLocation() const
Get the data location of the matrix.
Definition: matrix.cpp:59
MatrixClass()
The constructor of MatrixClass.
Definition: matrix.cpp:11
virtual int GetNumRowsLocal() const =0
Get the local number of rows of the matrix.
Tell if a value is a complex value.
Definition: complex.hpp:684
PrecisionEnum GetPrecision() const
Return the precision of the matrix.
Definition: matrix.cpp:148
virtual int Eye()
Create an indentity matrix.
Definition: matrix.cpp:81
PrecisionEnum
The precision enum.
Definition: utils.hpp:453