Abstract base class for Hierarchically Semi-Separable (HSS) matrices. More...
#include <HSSMatrixBase.hpp>
Public Member Functions | |
HSSMatrixBase (std::size_t m, std::size_t n, bool active) | |
virtual | ~HSSMatrixBase ()=default |
HSSMatrixBase (const HSSMatrixBase< scalar_t > &other) | |
HSSMatrixBase< scalar_t > & | operator= (const HSSMatrixBase< scalar_t > &other) |
HSSMatrixBase (HSSMatrixBase &&h)=default | |
HSSMatrixBase & | operator= (HSSMatrixBase &&h)=default |
virtual std::unique_ptr< HSSMatrixBase< scalar_t > > | clone () const =0 |
std::pair< std::size_t, std::size_t > | dims () const |
std::size_t | rows () const |
std::size_t | cols () const |
bool | leaf () const |
const HSSMatrixBase< scalar_t > & | child (int c) const |
HSSMatrixBase< scalar_t > & | child (int c) |
bool | is_compressed () const |
bool | is_untouched () const |
bool | active () const |
virtual std::size_t | rank () const =0 |
virtual std::size_t | memory () const =0 |
virtual std::size_t | nonzeros () const =0 |
virtual std::size_t | levels () const =0 |
virtual void | print_info (std::ostream &out=std::cout, std::size_t roff=0, std::size_t coff=0) const =0 |
void | set_openmp_task_depth (int depth) |
virtual void | shift (scalar_t sigma)=0 |
virtual void | draw (std::ostream &of, std::size_t rlo, std::size_t clo) const |
virtual void | forward_solve (const HSSFactorsMPI< scalar_t > &ULV, WorkSolveMPI< scalar_t > &w, const DistM_t &b, bool partial) const |
virtual void | backward_solve (const HSSFactorsMPI< scalar_t > &ULV, WorkSolveMPI< scalar_t > &w, DistM_t &x) const |
virtual const BLACSGrid * | grid () const |
virtual const BLACSGrid * | grid (const BLACSGrid *local_grid) const |
virtual const BLACSGrid * | grid_local () const |
virtual int | Ptotal () const |
virtual int | Pactive () const |
virtual void | to_block_row (const DistM_t &A, DenseM_t &sub_A, DistM_t &leaf_A) const |
virtual void | allocate_block_row (int d, DenseM_t &sub_A, DistM_t &leaf_A) const |
virtual void | from_block_row (DistM_t &A, const DenseM_t &sub_A, const DistM_t &leaf_A, const BLACSGrid *lg) const |
Friends | |
class | HSSMatrix< scalar_t > |
class | HSSMatrixMPI< scalar_t > |
Abstract base class for Hierarchically Semi-Separable (HSS) matrices.
This is for non-symmetric HSS matrices, but can be used with symmetric matrices as well.
scalar_t | Can be float, double, std:complex<float> or std::complex<double>. |
strumpack::HSS::HSSMatrixBase< scalar_t >::HSSMatrixBase | ( | std::size_t | m, |
std::size_t | n, | ||
bool | active | ||
) |
Construct an m x n HSS matrix, not initialized.
m | number of rows |
n | number of columns |
active | Denote if this matrix (node) is active on this process. |
|
virtualdefault |
Default virtual destructor.
strumpack::HSS::HSSMatrixBase< scalar_t >::HSSMatrixBase | ( | const HSSMatrixBase< scalar_t > & | other | ) |
Copy constructor.
other | HSS matrix to copy. |
|
default |
Move constructor.
h | HSS matrix to move from, h will be emptied. |
|
inline |
|
inline |
Return a reference to the child (0, or 1) of this HSS matrix. This is only valid when !this->leaf(). It is assumed that a non-leaf node always has exactly 2 children.
c | Number of the child, should be 0 or 1, for the left or the right child. |
|
inline |
Return a const reference to the child (0, or 1) of this HSS matrix. This is only valid when !this->leaf(). It is assumed that a non-leaf node always has exactly 2 children.
c | Number of the child, should be 0 or 1, for the left or the right child. |
|
pure virtual |
Clone this HSS matrix. TODO delete this??
Implemented in strumpack::HSS::HSSMatrix< scalar_t >.
|
inline |
Return the number of columns in this HSS matrix.
|
inline |
|
inlinevirtual |
Internal routine to draw this HSS matrix. Do not use this directly. Use HSS::draw.
Reimplemented in strumpack::HSS::HSSMatrix< scalar_t >.
|
inline |
Check whether the HSS matrix was compressed.
|
inline |
Check whether the HSS compression was started for this matrix.
|
inline |
Check whether this node of the HSS tree is a leaf.
|
pure virtual |
Return the number of levels in the HSS matrix.
Implemented in strumpack::HSS::HSSMatrix< scalar_t >.
|
pure virtual |
Return the total amount of memory used by this HSS matrix, in bytes. This counts the memory for the low rank basis matrices as well as some of the memory used for the data structures.
Implemented in strumpack::HSS::HSSMatrix< scalar_t >.
|
pure virtual |
Return the total number of nonzeros stored in the HSS generator matrices (D,U,V at leafs U,B,V at non-leafs).
Implemented in strumpack::HSS::HSSMatrix< scalar_t >.
HSSMatrixBase<scalar_t>& strumpack::HSS::HSSMatrixBase< scalar_t >::operator= | ( | const HSSMatrixBase< scalar_t > & | other | ) |
|
default |
|
pure virtual |
Print info about this HSS matrix, such as tree info, ranks, etc.
out | Stream to print to, defaults to std::cout |
roff | Row offset of top left corner, defaults to 0. This is used to recursively print the tree, you can leave this at the default. |
coff | Column offset of top left corner, defaults to 0. This is used to recursively print the tree, you can leave this at the default. |
Implemented in strumpack::HSS::HSSMatrix< scalar_t >.
|
pure virtual |
Return the maximum rank of this HSS matrix over all off-diagonal blocks, and all levels.
Implemented in strumpack::HSS::HSSMatrix< scalar_t >.
|
inline |
Return the number of rows in this HSS matrix.
|
inline |
Set the depth of openmp nested tasks. This can be used to limit the number of tasks to spawn in the HSS routines, which is can reduce task creation overhead. This is used in the sparse solver when multiple HSS matrices are created from within multiple openmp tasks. The HSS routines all use openmp tasking to traverse the HSS tree and for parallelism within the HSS nodes as well.
|
pure virtual |
APply a shift to the diagonal of this matrix. Ie, this += sigma * I, with I the identity matrix. Call this after compression.
sigma | Shift to be applied to the diagonal. |
Implemented in strumpack::HSS::HSSMatrix< scalar_t >.