|
Ensign
Low-rank framework for multi-core CPUs and GPUs
|
Dense matrix operations. More...
Classes | |
| struct | blas_ops |
| Provides matrix and vector operations with optional GPU execution. More... | |
| struct | diagonalization |
| Helper class to perform diagonalization of a symmetric matrix (also known as the Schur decomposition) Factorizes the matrix CC as follows CC = TT*diag(diag_r)*TT^T. More... | |
| struct | lu_solver |
| Linear solver based on a LU decomposition. More... | |
Functions | |
| template<class T > | |
| void | set_zero (multi_array< T, 2 > &a) |
| Set matrix to zero. | |
| template<class T > | |
| void | set_identity (multi_array< T, 2 > &a) |
| Set matrix to identity. | |
| template<class T , size_t d> | |
| void | set_const (multi_array< T, d > &a, T alpha) |
| Set vector or matrix to a constant value. | |
| template<class T > | |
| void | ptw_mult_row (const multi_array< T, 2 > &a, const multi_array< T, 1 > &w, multi_array< T, 2 > &out) |
| Multiply every row of a matrix with a vector (i.e. | |
| template<class T > | |
| void | transpose_inplace (multi_array< T, 2 > &a) |
| Transpose a square matrix inplace (intended for small matrices) | |
| template<class T > | |
| void | svd (const multi_array< T, 2 > &input, multi_array< T, 2 > &U, multi_array< T, 2 > &V, multi_array< T, 1 > &sigma_diag, const blas_ops &blas) |
| Computes the singular value decomposition of the matrix input. | |
| template<class T > | |
| void | qr (multi_array< T, 2 > &Q, multi_array< T, 2 > &R) |
Dense matrix operations.
| void Ensign::Matrix::ptw_mult_row | ( | const multi_array< T, 2 > & | a, |
| const multi_array< T, 1 > & | w, | ||
| multi_array< T, 2 > & | out | ||
| ) |
Multiply every row of a matrix with a vector (i.e.
diag(w)a)
| void Ensign::Matrix::qr | ( | multi_array< T, 2 > & | Q, |
| multi_array< T, 2 > & | R | ||
| ) |
| void Ensign::Matrix::set_const | ( | multi_array< T, d > & | a, |
| T | alpha | ||
| ) |
Set vector or matrix to a constant value.
| void Ensign::Matrix::set_identity | ( | multi_array< T, 2 > & | a | ) |
Set matrix to identity.
| void Ensign::Matrix::set_zero | ( | multi_array< T, 2 > & | a | ) |
Set matrix to zero.
| void Ensign::Matrix::svd | ( | const multi_array< T, 2 > & | input, |
| multi_array< T, 2 > & | U, | ||
| multi_array< T, 2 > & | V, | ||
| multi_array< T, 1 > & | sigma_diag, | ||
| const blas_ops & | blas | ||
| ) |
Computes the singular value decomposition of the matrix input.
| void Ensign::Matrix::transpose_inplace | ( | multi_array< T, 2 > & | a | ) |
Transpose a square matrix inplace (intended for small matrices)