suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
SparseMatMAGMA< T > Class Template Referencefinal

A SparseMatMAGMA class that holds matrices. More...

#include <SparseMatMAGMA.hpp>

Inheritance diagram for SparseMatMAGMA< T >:
Collaboration diagram for SparseMatMAGMA< T >:

Public Member Functions

 SparseMatMAGMA (const uword in_row, const uword in_col, const uword in_elem=0)
 
 SparseMatMAGMA (const SparseMatMAGMA &)
 
 SparseMatMAGMA (SparseMatMAGMA &&)=delete
 
SparseMatMAGMAoperator= (const SparseMatMAGMA &)=delete
 
SparseMatMAGMAoperator= (SparseMatMAGMA &&)=delete
 
 ~SparseMatMAGMA () override
 
unique_ptr< MetaMat< T > > unique_copy () override
 
- Public Member Functions inherited from SparseMat< T >
 SparseMat (const uword in_row, const uword in_col, const uword in_elem=0)
 
bool is_empty () const override
 
void zeros () override
 
void nullify (const uword idx) override
 
max () const override
 
operator() (const uword in_row, const uword in_col) const override
 Access element (read-only), returns zero if out-of-bound.
 
T & at (const uword in_row, const uword in_col) override
 Access element with bound check.
 
const T * memptr () const override
 
T * memptr () override
 
void scale_accu (const T scalar, const shared_ptr< MetaMat< T > > &in_mat) override
 
void scale_accu (const T scalar, const triplet_form< T, uword > &in_mat) override
 
Mat< T > operator* (const Mat< T > &in_mat) const override
 
void operator*= (const T scalar) override
 
void allreduce () override
 
void csc_condense () override
 
void csr_condense () override
 
- Public Member Functions inherited from MetaMat< T >
 MetaMat (const uword in_rows, const uword in_cols, const uword in_elem)
 
 MetaMat (const MetaMat &)=default
 
 MetaMat (MetaMat &&)=delete
 
MetaMatoperator= (const MetaMat &)=delete
 
MetaMatoperator= (MetaMat &&)=delete
 
virtual ~MetaMat ()=default
 
void set_solver_setting (const SolverSetting< T > &SS)
 
SolverSetting< T > & get_solver_setting ()
 
void set_factored (const bool F)
 
void unify (const uword K)
 
void unify (const uvec &list)
 
void nullify (const uvec &list)
 
virtual T & unsafe_at (const uword I, const uword J)
 Access element without bound check.
 
void operator+= (const shared_ptr< MetaMat > &M)
 
void operator-= (const shared_ptr< MetaMat > &M)
 
void operator+= (const op_scale< T > &M)
 
void operator-= (const op_scale< T > &M)
 
void operator+= (const triplet_form< T, uword > &M)
 
void operator-= (const triplet_form< T, uword > &M)
 
template<typename C >
requires is_arma_mat<T, C>
int solve (Mat< T > &X, C &&B)
 
template<typename C >
requires is_arma_mat<T, C>
Mat< T > solve (C &&B)
 
virtual int sign_det () const
 
void save (const char *name)
 

Protected Member Functions

int direct_solve (Mat< T > &out_mat, const Mat< T > &in_mat) override
 
int direct_solve (Mat< T > &, Mat< T > &&) override
 
- Protected Member Functions inherited from MetaMat< T >
int direct_solve (Mat< T > &X, const SpMat< T > &B)
 
int direct_solve (Mat< T > &X, SpMat< T > &&B)
 
template<std::invocable< fmat & > F>
int mixed_trs (mat &X, mat &&B, F &&trs)
 

Additional Inherited Members

- Public Attributes inherited from MetaMat< T >
triplet_form< T, uword > triplet_mat
 
const uword n_rows
 
const uword n_cols
 
const uword n_elem
 
- Protected Attributes inherited from MetaMat< T >
bool factored = false
 
SolverSetting< T > setting {}
 

Detailed Description

template<sp_d T>
class SparseMatMAGMA< T >

A SparseMatMAGMA class that holds matrices.

TODO: improve performance by storing factorization and reusing it

Author
tlc
Date
24/02/2023
Version
0.1.0

Constructor & Destructor Documentation

◆ SparseMatMAGMA() [1/2]

template<sp_d T>
SparseMatMAGMA< T >::SparseMatMAGMA ( const uword  in_row,
const uword  in_col,
const uword  in_elem = 0 
)
inline

◆ SparseMatMAGMA() [2/2]

template<sp_d T>
SparseMatMAGMA< T >::SparseMatMAGMA ( SparseMatMAGMA< T > &&  )
delete

◆ ~SparseMatMAGMA()

template<sp_d T>
SparseMatMAGMA< T >::~SparseMatMAGMA ( )
inlineoverride

Member Function Documentation

◆ direct_solve()

template<sp_d T>
int SparseMatMAGMA< T >::direct_solve ( Mat< T > &  out_mat,
const Mat< T > &  in_mat 
)
inlineoverrideprotectedvirtual

Implements MetaMat< T >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

template<sp_d T>
SparseMatMAGMA & SparseMatMAGMA< T >::operator= ( const SparseMatMAGMA< T > &  )
delete

◆ operator=() [2/2]

template<sp_d T>
SparseMatMAGMA & SparseMatMAGMA< T >::operator= ( SparseMatMAGMA< T > &&  )
delete

◆ unique_copy()

template<sp_d T>
unique_ptr< MetaMat< T > > SparseMatMAGMA< T >::unique_copy ( )
inlineoverridevirtual

Implements MetaMat< T >.


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