strumpack::BLR::BLRMatrixMPI< scalar_t > Class Template Reference

Distributed memory block low rank matrix. More...

#include <BLRMatrixMPI.hpp>

Inheritance diagram for strumpack::BLR::BLRMatrixMPI< scalar_t >:
Collaboration diagram for strumpack::BLR::BLRMatrixMPI< scalar_t >:

Public Member Functions

 BLRMatrixMPI (const ProcessorGrid2D &grid, const vec_t &Rt, const vec_t &Ct)
 
std::size_t rows () const override
 
std::size_t cols () const override
 
std::size_t memory () const override
 
std::size_t nonzeros () const override
 
std::size_t rank () const override
 
std::size_t total_memory () const
 
std::size_t total_nonzeros () const
 
std::size_t max_rank () const
 
const MPICommComm () const
 
const ProcessorGrid2Dgrid () const
 
bool active () const
 
void fill (scalar_t v)
 
void fill_col (scalar_t v, std::size_t k, std::size_t CP)
 
std::vector< int > factor (const Opts_t &opts)
 
std::vector< int > factor (const adm_t &adm, const Opts_t &opts)
 
std::vector< int > factor_col (const adm_t &adm, const Opts_t &opts, const std::function< void(int, bool, std::size_t)> &blockcol)
 
void laswp (const std::vector< int > &piv, bool fwd)
 
void compress (const Opts_t &opts)
 
DistM_t to_ScaLAPACK (const BLACSGrid *g) const
 
void to_ScaLAPACK (DistM_t &A) const
 
void print (const std::string &name)
 
std::size_t rowblocks () const
 
std::size_t colblocks () const
 
std::size_t rowblockslocal () const
 
std::size_t colblockslocal () const
 
std::size_t tilerows (std::size_t i) const
 
std::size_t tilecols (std::size_t j) const
 
std::size_t tileroff (std::size_t i) const
 
std::size_t tilecoff (std::size_t j) const
 
int rg2p (std::size_t i) const
 
int cg2p (std::size_t j) const
 
std::size_t rl2g (std::size_t i) const
 
std::size_t cl2g (std::size_t j) const
 
std::size_t rg2t (std::size_t i) const
 
std::size_t cg2t (std::size_t j) const
 
std::size_t lrows () const
 
std::size_t lcols () const
 
scalar_t operator() (std::size_t i, std::size_t j) const
 
scalar_t & operator() (std::size_t i, std::size_t j)
 
scalar_t get_element_and_decompress_HODBF (int tr, int tc, int lr, int lc)
 
void decompress_local_columns (int c_min, int c_max)
 
void remove_tiles_before_local_column (int c_min, int c_max)
 
const scalar_t & global (std::size_t i, std::size_t j) const
 
scalar_t & global (std::size_t i, std::size_t j)
 
- Public Member Functions inherited from strumpack::structured::StructuredMatrix< scalar_t >
virtual ~StructuredMatrix ()=default
 
virtual std::size_t local_rows () const
 
virtual std::size_t begin_row () const
 
virtual std::size_t end_row () const
 
virtual const std::vector< int > & dist () const
 
virtual const std::vector< int > & rdist () const
 
virtual const std::vector< int > & cdist () const
 
virtual void mult (Trans op, const DenseMatrix< scalar_t > &x, DenseMatrix< scalar_t > &y) const
 
void mult (Trans op, int m, const scalar_t *x, int ldx, scalar_t *y, int ldy) const
 
virtual void mult (Trans op, const DistributedMatrix< scalar_t > &x, DistributedMatrix< scalar_t > &y) const
 
virtual void factor ()
 
virtual void solve (DenseMatrix< scalar_t > &b) const
 
virtual void solve (int nrhs, scalar_t *b, int ldb) const
 
virtual void solve (DistributedMatrix< scalar_t > &b) const
 
virtual void shift (scalar_t s)
 

Static Public Member Functions

static std::vector< int > partial_factor (BLRMPI_t &A11, BLRMPI_t &A12, BLRMPI_t &A21, BLRMPI_t &A22, const adm_t &adm, const Opts_t &opts)
 
static std::vector< int > partial_factor_col (BLRMPI_t &F11, BLRMPI_t &F12, BLRMPI_t &F21, BLRMPI_t &F22, const adm_t &adm, const Opts_t &opts, const std::function< void(int, bool, std::size_t)> &blockcol)
 
static BLRMPI_t from_ScaLAPACK (const DistM_t &A, const ProcessorGrid2D &g, const Opts_t &opts)
 
static BLRMPI_t from_ScaLAPACK (const DistM_t &A, const ProcessorGrid2D &g, const vec_t &Rt, const vec_t &Ct)
 

Friends

template<typename T , typename I >
class strumpack::ExtendAdd
 
template<typename T , typename I >
class BLRExtendAdd
 
template<typename T >
void trsv (UpLo ul, Trans ta, Diag d, const BLRMatrixMPI< T > &a, BLRMatrixMPI< T > &b)
 
template<typename T >
void gemv (Trans ta, T alpha, const BLRMatrixMPI< T > &a, const BLRMatrixMPI< T > &x, T beta, BLRMatrixMPI< T > &y)
 
template<typename T >
void trsm (Side s, UpLo ul, Trans ta, Diag d, T alpha, const BLRMatrixMPI< T > &a, BLRMatrixMPI< T > &b)
 
template<typename T >
void gemm (Trans ta, Trans tb, T alpha, const BLRMatrixMPI< T > &a, const BLRMatrixMPI< T > &b, T beta, BLRMatrixMPI< T > &c)
 

Detailed Description

template<typename scalar_t>
class strumpack::BLR::BLRMatrixMPI< scalar_t >

Distributed memory block low rank matrix.

This is for non-symmetric matrices, but can be used with symmetric matrices as well. This class inherits from StructuredMatrix.

Template Parameters
scalar_tCan be float, double, std:complex<float> or std::complex<double>.
See also
structured::StructuredMatrix, BLRMatrix

Member Function Documentation

◆ cols()

template<typename scalar_t >
std::size_t strumpack::BLR::BLRMatrixMPI< scalar_t >::cols ( ) const
inlineoverridevirtual

Get number of columns in this matrix

Implements strumpack::structured::StructuredMatrix< scalar_t >.

◆ global()

template<typename scalar_t >
const scalar_t& strumpack::BLR::BLRMatrixMPI< scalar_t >::global ( std::size_t  i,
std::size_t  j 
) const

Same as operator()(std::size_t i, std::size_t j), but with global indexing. This assumes the global element is stored locally, otherwise behaviour is undefined.

◆ memory()

template<typename scalar_t >
std::size_t strumpack::BLR::BLRMatrixMPI< scalar_t >::memory ( ) const
overridevirtual

Return the total amount of memory used by this matrix, in bytes.

Returns
Memory usage in bytes.
See also
nonzeros

Implements strumpack::structured::StructuredMatrix< scalar_t >.

◆ nonzeros()

template<typename scalar_t >
std::size_t strumpack::BLR::BLRMatrixMPI< scalar_t >::nonzeros ( ) const
overridevirtual

Return the total number of nonzeros stored by this matrix.

Returns
Nonzeros in the matrix representation.
See also
memory

Implements strumpack::structured::StructuredMatrix< scalar_t >.

◆ operator()()

template<typename scalar_t >
scalar_t strumpack::BLR::BLRMatrixMPI< scalar_t >::operator() ( std::size_t  i,
std::size_t  j 
) const

Direct access to element with local indexing, only for dense tiles, for instance before the factorization/compression.

◆ rank()

template<typename scalar_t >
std::size_t strumpack::BLR::BLRMatrixMPI< scalar_t >::rank ( ) const
overridevirtual

Return the maximum rank of this matrix over all low-rank compressed blocks.

Returns
Maximum rank.

Implements strumpack::structured::StructuredMatrix< scalar_t >.

◆ rows()

template<typename scalar_t >
std::size_t strumpack::BLR::BLRMatrixMPI< scalar_t >::rows ( ) const
inlineoverridevirtual

Get number of rows in this matrix

Implements strumpack::structured::StructuredMatrix< scalar_t >.


The documentation for this class was generated from the following file: