strumpack::HSS Namespace Reference

Classes

class  HSSFactors
 Contains data related to ULV factorization of an HSS matrix. More...
 
class  HSSFactorsMPI
 Contains data related to ULV factorization of a distributed HSS matrix. More...
 
class  HSSMatrix
 Class to represent a sequential/threaded Hierarchically Semi-Separable matrix. More...
 
class  HSSMatrixBase
 Abstract base class for Hierarchically Semi-Separable (HSS) matrices. More...
 
class  HSSMatrixMPI
 Distributed memory implementation of the HSS (Hierarchically Semi-Separable) matrix format. More...
 
class  HSSOptions
 Class containing several options for the HSS code and data-structures. More...
 
class  TreeLocalRanges
 

Enumerations

enum class  CompressionAlgorithm { ORIGINAL , STABLE , HARD_RESTART }
 
enum class  CompressionSketch { GAUSSIAN , SJLT }
 
enum class  SJLTAlgo { CHUNK , PERM }
 
enum class  State : char { UNTOUCHED ='U' , PARTIALLY_COMPRESSED ='P' , COMPRESSED ='C' }
 

Functions

template<typename real_t >
real_t default_HSS_rel_tol ()
 
template<typename real_t >
real_t default_HSS_abs_tol ()
 
template<>
float default_HSS_rel_tol ()
 
template<>
float default_HSS_abs_tol ()
 
std::string get_name (CompressionAlgorithm a)
 
std::string get_name (CompressionSketch a)
 
std::string get_name (SJLTAlgo a)
 
template<typename scalar_t >
void draw (const HSSMatrix< scalar_t > &H, const std::string &name)
 
template<typename scalar_t >
void apply_HSS (Trans op, const HSSMatrix< scalar_t > &A, const DenseMatrix< scalar_t > &B, scalar_t beta, DenseMatrix< scalar_t > &C)
 

Detailed Description

HSS namespace.

Enumeration Type Documentation

◆ CompressionAlgorithm

Enumeration of possible versions of the randomized sampling HSS compression algorithms.

Enumerator
ORIGINAL 

Start with an initial guess of the rank, double the number of random samples until desired accuracy.

STABLE 

Start with an initial guess of the rank, add a fix amount of random vectors, until desired accuracy is reached.

HARD_RESTART 

Start with an initial guess of the rank, add a fix amount of random vectors, if not enough, start again from scratch using twice as many random sample vectors.

◆ CompressionSketch

Enumeration of possible versions of the randomized sampling HSS sketching matrices.

Enumerator
GAUSSIAN 

Sketch using iid gaussian entries mean 0 variance 1.

SJLT 

Sketch using the sparse Johnson-Lindenstrauss transform, with nnz entries per row randomly selected each with a value of 1/sqrt(nnz) with pr = 0.5 or -1/sqrt(nnz) with pr = 0.5.

◆ SJLTAlgo

enum class strumpack::HSS::SJLTAlgo
strong
Enumerator
CHUNK 

puts nnz nonzeros in each row by spliting the row into col/nnz chunks and putting one nonzero in each

PERM 

puts nnz nonzeros on each row by permuting all col indices and taking the first nnz

◆ State

enum class strumpack::HSS::State : char
strong

Enumeration of possible states of an HSS matrix/node. This is used in the adaptive HSS compression algorithms, where a node can be untouched (it is not yet visited by the compression algorithm), partially_compressed (a compression was attempted but failed, so the adaptive algorithm will have to try again), or can be successfully compressed.

Enumerator
UNTOUCHED 

Node was not yet visited by the compression algorithm

PARTIALLY_COMPRESSED 

Compression was attempted for this node, but failed. The adaptive compression should try again.

COMPRESSED 

This HSS node was succesfully compressed.

Function Documentation

◆ apply_HSS()

template<typename scalar_t >
void strumpack::HSS::apply_HSS ( Trans  op,
const HSSMatrix< scalar_t > &  A,
const DenseMatrix< scalar_t > &  B,
scalar_t  beta,
DenseMatrix< scalar_t > &  C 
)

Compute C = op(A) * B + beta * C, with HSS matrix A.

Parameters
opTranspose/complex conjugate or none to be applied to the HSS matrix A.
AHSS matrix
BDense matrix
betaScalar
CResult, should already be allocated to the appropriate size.

◆ default_HSS_abs_tol() [1/2]

template<typename real_t >
real_t strumpack::HSS::default_HSS_abs_tol ( )
inline

Get the default absolute HSS compression tolerance (this is for double precision, might be overloaded for single precision). This can be changed using the HSSOptions object.

◆ default_HSS_abs_tol() [2/2]

template<>
float strumpack::HSS::default_HSS_abs_tol ( )
inline

Get the default absolute HSS compression tolerance for single precision computations. This can be changed using the HSSOptions object.

◆ default_HSS_rel_tol() [1/2]

template<typename real_t >
real_t strumpack::HSS::default_HSS_rel_tol ( )
inline

Get the default relative HSS compression tolerance (this is for double precision, might be overloaded depending on floating point precision). This can be changed using the HSSOptions object. Tuning this parameter (in the HSSOptions object) is crucial for performance of the HSS algorithms.

◆ default_HSS_rel_tol() [2/2]

template<>
float strumpack::HSS::default_HSS_rel_tol ( )
inline

Get the default relative HSS compression tolerance for single precision computations. This can be changed using the HSSOptions object. Tuning this parameter (in the HSSOptions<float> object) is crucial for performance of the HSS algorithms.

◆ draw()

template<typename scalar_t >
void strumpack::HSS::draw ( const HSSMatrix< scalar_t > &  H,
const std::string &  name 
)

Write a gnuplot script to draw this an matrix.

Parameters
HHSS matrix to draw.
nameName of the HSS matrix. The script will be created in the file plotname.gnuplot.

◆ get_name() [1/3]

std::string strumpack::HSS::get_name ( CompressionAlgorithm  a)

Return a string with the name of the compression algorithm.

Parameters
atype of the randomized compression algorihtm
Returns
name, string with a short description

◆ get_name() [2/3]

std::string strumpack::HSS::get_name ( CompressionSketch  a)

Return a string with the name of the compression algorithm.

Parameters
atype of the randomized compression algorihtm
Returns
name, string with a short description

◆ get_name() [3/3]

std::string strumpack::HSS::get_name ( SJLTAlgo  a)

Return a string with the name of the sjlt algorithm.

Parameters
atype of SJLT sampling algorithm
Returns
name, string with a short description