Project
Loading...
Searching...
No Matches
o2::gpu::BandMatrixSolver< BandWidthT > Class Template Reference

#include <BandMatrixSolver.h>

Public Member Functions

 BandMatrixSolver (int32_t N, int32_t Bdim)
 Consructor.
 
void initWithNaN ()
 debug tool: init arrays with NaN's
 
double & A (int32_t i, int32_t j)
 access to A elements
 
double & B (int32_t i, int32_t j)
 access to B elements
 
void solve ()
 solve the equation
 
void solveType1 ()
 solve an equation of a special type
 
int32_t test (bool prn)
 

Static Public Member Functions

static int32_t test (bool prn=0)
 Test the class functionality. Returns 1 when ok, 0 when not ok.
 

Detailed Description

template<int32_t BandWidthT>
class o2::gpu::BandMatrixSolver< BandWidthT >

Linear Equation Solver for a symmetric positive-definite band matrix A[n x n].

The matrix has a pattern of BandWidthT adjacent non-zero entries right to the diagonal in each row Here is an example with n==10, BandWidthT==4. (*) means non-zero element, (+) means symmetric element): (**** ) (+**** ) (++**** ) (+++**** ) A = ( +++**** ) ( +++**** ) ( +++****) ( +++***) ( +++**) ( +++*)

The non-zero matrix elements are stored in [n x BandWidthT] array mA

The equation to sove is A[n][n] x X[n][Bdim] = B[n][Bdim]. During calculations, the initial values of mA and mB get lost, so one can call solve() only once. The solution X is stored in mB.

Definition at line 55 of file BandMatrixSolver.h.

Constructor & Destructor Documentation

◆ BandMatrixSolver()

template<int32_t BandWidthT>
o2::gpu::BandMatrixSolver< BandWidthT >::BandMatrixSolver ( int32_t  N,
int32_t  Bdim 
)
inline

Consructor.

Definition at line 59 of file BandMatrixSolver.h.

Member Function Documentation

◆ A()

template<int32_t BandWidthT>
double & o2::gpu::BandMatrixSolver< BandWidthT >::A ( int32_t  i,
int32_t  j 
)
inline

access to A elements

Definition at line 75 of file BandMatrixSolver.h.

◆ B()

template<int32_t BandWidthT>
double & o2::gpu::BandMatrixSolver< BandWidthT >::B ( int32_t  i,
int32_t  j 
)
inline

access to B elements

Definition at line 85 of file BandMatrixSolver.h.

◆ initWithNaN()

template<int32_t BandWidthT>
void o2::gpu::BandMatrixSolver< BandWidthT >::initWithNaN ( )
inline

debug tool: init arrays with NaN's

Definition at line 67 of file BandMatrixSolver.h.

◆ solve()

template<int32_t BandWidthT>
void o2::gpu::BandMatrixSolver< BandWidthT >::solve ( )
inline

solve the equation

Solution slover

Definition at line 184 of file BandMatrixSolver.h.

◆ solveType1()

template<int32_t BandWidthT>
void o2::gpu::BandMatrixSolver< BandWidthT >::solveType1 ( )
inline

solve an equation of a special type

A special solver for a band matrix were every second row has 0 at the end of the band. An example with n==10, BandWidthT==4:

(****      )
(+***0     )
(++****    )
(+++***0   )

A = ( 0++**** ) ( +++***0 ) ( 0++****) ( +++***) ( 0++**) ( +++*)

Definition at line 216 of file BandMatrixSolver.h.

◆ test() [1/2]

int32_t o2::gpu::BandMatrixSolver< 0 >::test ( bool  prn)

◆ test() [2/2]

template<int32_t BandWidthT>
static int32_t o2::gpu::BandMatrixSolver< BandWidthT >::test ( bool  prn = 0)
inlinestatic

Test the class functionality. Returns 1 when ok, 0 when not ok.

Definition at line 98 of file BandMatrixSolver.h.


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