cuLite v0.3.1
A lite CUDA C++ Interface
Loading...
Searching...
No Matches
culite::LapackBase< T_Matrix > Class Template Reference

The abstract linear solver base for dense device matrices. More...

Inheritance diagram for culite::LapackBase< T_Matrix >:

Public Member Functions

void reserve (const T_Matrix &mat)
 Reserves workspace memory for matrix decomposition.
void clear ()
 Clears the solver internal data.
void decompose (const T_Matrix &mat)
 Performs matrix decomposition.
void solve (T_Matrix &rhs) const
 Performs in-place matrix solution.
void solve (T_Vector &rhs) const
 Performs in-place vector solution.

Detailed Description

template<typename T_Matrix>
class culite::LapackBase< T_Matrix >

The abstract linear solver base for dense device matrices.

Provides a base class for GPU-based linear solvers that use cuSOLVER decomposition methods. This is the device version that operates on matrices stored in GPU memory.

Template Parameters
T_MatrixThe device matrix type (e.g., dns::XxMatrix<T_Scalar>).

Member Function Documentation

◆ reserve()

template<typename T_Matrix>
void culite::LapackBase< T_Matrix >::reserve ( const T_Matrix & mat)

Reserves workspace memory for matrix decomposition.

Allocates the necessary device memory buffers required to perform the decomposition of a matrix with the same dimensions as mat.

Parameters
[in]matThe matrix whose dimensions determine the workspace size.

◆ clear()

template<typename T_Matrix>
void culite::LapackBase< T_Matrix >::clear ( )

Clears the solver internal data.

Clears the solver internal data and resets all settings.

◆ decompose()

template<typename T_Matrix>
void culite::LapackBase< T_Matrix >::decompose ( const T_Matrix & mat)

Performs matrix decomposition.

Computes the matrix factorization without modifying the input matrix.

Parameters
[in]matThe matrix to be decomposed.
Examples
ex05a_solving_linear_systems_lu.cpp.

◆ solve() [1/2]

template<typename T_Matrix>
void culite::LapackBase< T_Matrix >::solve ( T_Matrix & rhs) const

Performs in-place matrix solution.

Solves the linear system using the precomputed factorization.

Parameters
[in,out]rhsOn input, the right hand side matrix, on exit is overwritten with the solution.
Examples
ex05a_solving_linear_systems_lu.cpp.

◆ solve() [2/2]

template<typename T_Matrix>
void culite::LapackBase< T_Matrix >::solve ( T_Vector & rhs) const

Performs in-place vector solution.

Solves the linear system using the precomputed factorization.

Parameters
[in,out]rhsOn input, the right hand side vector, on exit is overwritten with the solution.