INLA_DIST
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
BTASolver Class Reference

creates solver class using BTA-GPU for factorising, solving and selectively inverting linear system. More...

#include <BTASolver.h>

Inheritance diagram for BTASolver:
Solver

Public Member Functions

 BTASolver (size_t ns_, size_t nt_, size_t nb_, size_t no_, int thread_ID_)
 
void symbolic_factorization (SpMat &Q, int &init)
 not used for BTASolver, only in PARDISO
 
void factorize (SpMat &Q, double &log_det, double &t_priorLatChol)
 numerical factorisation using block-wise factorisation on GPU.
 
void factorize_w_constr (SpMat &Q, const MatrixXd &D, double &log_det, MatrixXd &V)
 
void factorize_solve (SpMat &Q, Vect &rhs, Vect &sol, double &log_det, double &t_condLatChol, double &t_condLatSolve)
 factorises and solves matrix in one call
 
void factorize_solve_w_constr (SpMat &Q, Vect &rhs, const MatrixXd &Dxy, double &log_det, Vect &sol, MatrixXd &V)
 
void selected_inversion (SpMat &Q, Vect &inv_diag)
 selected inversion of the diagonal elements of Q.
 
void selected_inversion_w_constr (SpMat &Q, const MatrixXd &D, Vect &inv_diag, MatrixXd &V)
 
 ~BTASolver ()
 class destructor. Frees memory allocated by BTA.
 

Private Attributes

int MPI_size
 
int MPI_rank
 
char processor_name [MPI_MAX_PROCESSOR_NAME]
 
int name_len
 
int threads_level1
 
int thread_ID
 
unsigned int nnz
 
size_t i
 
int GPU_rank
 
size_t ns_t
 
size_t nt_t
 
size_t nb_t
 
size_t no_t
 
size_t n
 
SpMat Q
 
int * ia
 
int * ja
 
double * a
 
double * b
 
double * x
 
BTA< double > * solver
 
double dummy_time_1
 
double dummy_time_2
 

Additional Inherited Members

- Protected Attributes inherited from Solver
int init
 
double log_det
 
SpMat Q
 
Vect rhs
 
Vect sol
 

Detailed Description

creates solver class using BTA-GPU for factorising, solving and selectively inverting linear system.

divided into set up, symbolic factorisation, numerical factorisation, numerical factorisation & solve and selected inversion (of the diagonal elements)

Note
in each BTASolver function call factorise, selected_inversion etc. class BTA gets created. Is this the best way to handle things. Potentially merge them somehow? Maybe actually does not take any time.

Member Function Documentation

◆ factorize()

void BTASolver::factorize ( SpMat &  Q,
double &  log_det,
double &  t_priorLatChol 
)
virtual

numerical factorisation using block-wise factorisation on GPU.

Parameters
[in]Qprecision matrix to be factorised.
[in,out]log_detcomputes log determinant of Q.

Implements Solver.

◆ factorize_solve()

void BTASolver::factorize_solve ( SpMat &  Q,
Vect &  rhs,
Vect &  sol,
double &  log_det,
double &  t_condLatChol,
double &  t_condLatSolve 
)
virtual

factorises and solves matrix in one call

Parameters
[in]Qprecision matrix.
[in]rhsright-hand side of the system.
[in,out]solsolution of the system.
[in,out]log_detlog determinant of Q.

Implements Solver.

◆ factorize_solve_w_constr()

void BTASolver::factorize_solve_w_constr ( SpMat &  Q,
Vect &  rhs,
const MatrixXd &  Dxy,
double &  log_det,
Vect &  sol,
MatrixXd &  V 
)
virtual

Implements Solver.

◆ factorize_w_constr()

void BTASolver::factorize_w_constr ( SpMat &  Q,
const MatrixXd &  D,
double &  log_det,
MatrixXd &  V 
)
virtual

Implements Solver.

◆ selected_inversion()

void BTASolver::selected_inversion ( SpMat &  Q,
Vect &  inv_diag 
)
virtual

selected inversion of the diagonal elements of Q.

Parameters
[in]Qprecision matrix.
[in,out]inv_diaginverse diagonal to hold the solution vector.
Note
is there some way to potentially reuse Cholesky factor that is already on CPU?

Implements Solver.

◆ selected_inversion_w_constr()

void BTASolver::selected_inversion_w_constr ( SpMat &  Q,
const MatrixXd &  D,
Vect &  inv_diag,
MatrixXd &  V 
)
virtual

Implements Solver.

◆ symbolic_factorization()

void BTASolver::symbolic_factorization ( SpMat &  Q,
int &  init 
)
virtual

not used for BTASolver, only in PARDISO

Implements Solver.

Member Data Documentation

◆ a

double* BTASolver::a
private

CSR format. values.

◆ b

double* BTASolver::b
private

right-hand side.

◆ ia

int* BTASolver::ia
private

CSR format. row indices.

◆ ja

int* BTASolver::ja
private

CSR format. col pointers.

◆ nnz

unsigned int BTASolver::nnz
private

number of nonzeros

◆ Q

SpMat BTASolver::Q
private

sparse precision matrix Q. Eigen format.

◆ solver

BTA<double>* BTASolver::solver
private

BTA solver object

◆ x

double* BTASolver::x
private

placeholder for solution.


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