![]() |
cuLite v0.3.1
A lite CUDA C++ Interface
|
Eigenvalue decomposition solver using LAPACK/cuSOLVER GEEV routines. More...
Public Member Functions | |
| LapackGeev (CuSolverHandler &cusolver=globalCuSolverHandler()) | |
| Default constructor. | |
| LapackGeev (bool calcLeft, bool calcRight, CuSolverHandler &cusolver=globalCuSolverHandler()) | |
| Constructor. | |
| ~LapackGeev () | |
| Destructor. | |
| bool | getCalcLeft () const |
| Checks if left eigenvectors will be computed. | |
| bool | getCalcRight () const |
| Checks if right eigenvectors will be computed. | |
| void | setCalcLeft (bool calcLeft) |
| Sets whether to compute left eigenvectors. | |
| void | setCalcRight (bool calcRight) |
| Sets whether to compute right eigenvectors. | |
| void | reserve (const T_Matrix &mat) |
| Reserves workspace memory for eigenvalue decomposition. | |
| void | clear () |
| Clears all internal data and releases allocated memory. | |
| void | decompose (const T_Matrix &mat) |
| Performs eigenvalue decomposition on the input matrix. | |
| const T_CVector & | eigenvalues () const |
| Gets the computed eigenvalues. | |
| const T_CMatrix & | leftEigenvectors () const |
| Gets the computed left eigenvectors. | |
| const T_CMatrix & | rightEigenvectors () const |
| Gets the computed right eigenvectors. | |
Eigenvalue decomposition solver using LAPACK/cuSOLVER GEEV routines.
This class provides a high-level interface for computing eigenvalues and eigenvectors of general (non-symmetric) matrices using the cuSOLVER library's GEEV implementation.
The GEEV routine computes the eigenvalue decomposition of a general matrix A:
Results are always returned as complex matrices/vectors, even for real input matrices.
| T_Matrix | The matrix type (can be real or complex). |
| culite::LapackGeev< T_Matrix >::LapackGeev | ( | CuSolverHandler & | cusolver = globalCuSolverHandler() | ) |
Default constructor.
Initializes the eigenvalue solver with default settings. calcLeft is initialized to false and calcRight is initialized to true.
| [in] | cusolver | Reference to a cuSOLVER handler instance (defaults to global handler). |
| culite::LapackGeev< T_Matrix >::LapackGeev | ( | bool | calcLeft, |
| bool | calcRight, | ||
| CuSolverHandler & | cusolver = globalCuSolverHandler() ) |
Constructor.
Initializes the eigenvalue solver with the specified cuSOLVER handler and eigenvector computation options.
| [in] | calcLeft | If true, computes left eigenvectors. |
| [in] | calcRight | If true, computes right eigenvectors. |
| [in] | cusolver | Reference to a cuSOLVER handler instance (defaults to global handler). |
| culite::LapackGeev< T_Matrix >::~LapackGeev | ( | ) |
Destructor.
Releases all allocated resources and clears internal state.
|
inline |
Checks if left eigenvectors will be computed.
|
inline |
Checks if right eigenvectors will be computed.
|
inline |
Sets whether to compute left eigenvectors.
| [in] | calcLeft | If true, left eigenvectors will be computed in decompose. |
|
inline |
Sets whether to compute right eigenvectors.
| [in] | calcRight | If true, right eigenvectors will be computed in decompose. |
| void culite::LapackGeev< T_Matrix >::reserve | ( | const T_Matrix & | mat | ) |
Reserves workspace memory for eigenvalue decomposition.
Allocates internal buffers required for eigenvalue computation based on the dimensions of the input matrix. Must be called before decompose.
| [in] | mat | The matrix for which to reserve workspace (determines dimensions). |
| void culite::LapackGeev< T_Matrix >::clear | ( | ) |
Clears all internal data and releases allocated memory.
Resets the solver to its initial state, releasing all computed results and internal workspace buffers.
| void culite::LapackGeev< T_Matrix >::decompose | ( | const T_Matrix & | mat | ) |
Performs eigenvalue decomposition on the input matrix.
Computes the eigenvalues and optionally the left and/or right eigenvectors of the input matrix using cuSOLVER's GEEV routine.
The input matrix is not modified. Results can be retrieved using the accessor methods: eigenvalues, leftEigenvectors, rightEigenvectors.
| [in] | mat | The matrix to decompose. |
|
inline |
Gets the computed eigenvalues.
|
inline |
Gets the computed left eigenvectors.
|
inline |
Gets the computed right eigenvectors.