![]() |
QMCPACK
|
implements matrix inversion via rocSolver More...
Collaboration diagram for rocSolverInverter< T_FP >:Public Member Functions | |
| rocSolverInverter () | |
| default constructor More... | |
| ~rocSolverInverter () | |
| template<typename TMAT , typename TREAL , typename = std::enable_if_t<std::is_same<TMAT, T_FP>::value>> | |
| std::enable_if_t< std::is_same< TMAT, T_FP >::value > | invert_transpose (const Matrix< TMAT > &logdetT, Matrix< TMAT > &Ainv, Matrix< TMAT, CUDAAllocator< TMAT >> &Ainv_gpu, std::complex< TREAL > &log_value) |
| compute the inverse of the transpose of matrix A and its determinant value in log when T_FP and TMAT are the same More... | |
| template<typename TMAT , typename TREAL , typename = std::enable_if_t<!std::is_same<TMAT, T_FP>::value>> | |
| std::enable_if_t<!std::is_same< TMAT, T_FP >::value > | invert_transpose (const Matrix< TMAT > &logdetT, Matrix< TMAT > &Ainv, Matrix< TMAT, CUDAAllocator< TMAT >> &Ainv_gpu, std::complex< TREAL > &log_value) |
| compute the inverse of the transpose of matrix A and its determinant value in log when T_FP and TMAT are not the same More... | |
Private Member Functions | |
| void | resize (int norb) |
| resize the internal storage More... | |
Private Attributes | |
| Matrix< T_FP, CUDAAllocator< T_FP > > | Mat1_gpu |
| scratch memory for cusolverDN More... | |
| Matrix< T_FP, CUDAAllocator< T_FP > > | Mat2_gpu |
| scratch memory for cusolverDN More... | |
| Vector< int, CUDAHostAllocator< int > > | ipiv |
| pivot array + info More... | |
| Vector< int, CUDAAllocator< int > > | ipiv_gpu |
| Vector< T_FP, CUDAHostAllocator< T_FP > > | LU_diag |
| diagonal terms of LU matrix More... | |
| Vector< T_FP, CUDAAllocator< T_FP > > | LU_diag_gpu |
| Vector< T_FP, CUDAAllocator< T_FP > > | work_gpu |
| workspace More... | |
| rocblas_handle | h_rocsolver_ |
| hipStream_t | hstream_ |
implements matrix inversion via rocSolver
| T_FP | high precision for matrix inversion, T_FP >= T |
Definition at line 35 of file rocSolverInverter.hpp.
|
inline |
default constructor
Definition at line 84 of file rocSolverInverter.hpp.
References qmcplusplus::cudaErrorCheck(), rocSolverInverter< T_FP >::h_rocsolver_, rocSolverInverter< T_FP >::hstream_, and rocsolverErrorCheck.
|
inline |
Definition at line 91 of file rocSolverInverter.hpp.
References qmcplusplus::cudaErrorCheck(), rocSolverInverter< T_FP >::h_rocsolver_, rocSolverInverter< T_FP >::hstream_, and rocsolverErrorCheck.
|
inline |
compute the inverse of the transpose of matrix A and its determinant value in log when T_FP and TMAT are the same
| TREAL | real type |
Definition at line 102 of file rocSolverInverter.hpp.
References qmcplusplus::computeLogDet(), qmcplusplus::cudaErrorCheck(), Matrix< T, Alloc >::data(), extract_matrix_diagonal_cuda(), qmcplusplus::rocsolver::getrf(), qmcplusplus::rocsolver::getrs(), rocSolverInverter< T_FP >::h_rocsolver_, rocSolverInverter< T_FP >::hstream_, rocSolverInverter< T_FP >::ipiv, rocSolverInverter< T_FP >::ipiv_gpu, rocSolverInverter< T_FP >::LU_diag, rocSolverInverter< T_FP >::LU_diag_gpu, make_identity_matrix_cuda(), rocSolverInverter< T_FP >::Mat1_gpu, rocSolverInverter< T_FP >::resize(), rocsolverErrorCheck, Matrix< T, Alloc >::rows(), and Matrix< T, Alloc >::size().
Referenced by DelayedUpdateCUDA< T, T_FP >::invert_transpose(), qmcplusplus::TEMPLATE_TEST_CASE(), and qmcplusplus::TEST_CASE().
|
inline |
compute the inverse of the transpose of matrix A and its determinant value in log when T_FP and TMAT are not the same
| TREAL | real type |
Definition at line 156 of file rocSolverInverter.hpp.
References qmcplusplus::computeLogDet(), copy_matrix_cuda(), qmcplusplus::cudaErrorCheck(), Matrix< T, Alloc >::data(), extract_matrix_diagonal_cuda(), qmcplusplus::rocsolver::getrf(), qmcplusplus::rocsolver::getrs(), rocSolverInverter< T_FP >::h_rocsolver_, rocSolverInverter< T_FP >::hstream_, rocSolverInverter< T_FP >::ipiv, rocSolverInverter< T_FP >::ipiv_gpu, qmcplusplus::isnan(), rocSolverInverter< T_FP >::LU_diag, rocSolverInverter< T_FP >::LU_diag_gpu, make_identity_matrix_cuda(), rocSolverInverter< T_FP >::Mat1_gpu, rocSolverInverter< T_FP >::Mat2_gpu, norm(), rocSolverInverter< T_FP >::resize(), rocsolverErrorCheck, Matrix< T, Alloc >::rows(), and Matrix< T, Alloc >::size().
|
inlineprivate |
resize the internal storage
| norb | number of electrons/orbitals |
| delay,maximum | delay 0<delay<=norb |
Definition at line 58 of file rocSolverInverter.hpp.
References dgetrf(), dgetri(), rocSolverInverter< T_FP >::h_rocsolver_, rocSolverInverter< T_FP >::ipiv, rocSolverInverter< T_FP >::ipiv_gpu, rocSolverInverter< T_FP >::LU_diag, rocSolverInverter< T_FP >::LU_diag_gpu, rocSolverInverter< T_FP >::Mat1_gpu, and rocsolverErrorCheck.
Referenced by rocSolverInverter< T_FP >::invert_transpose().
|
private |
Definition at line 51 of file rocSolverInverter.hpp.
Referenced by rocSolverInverter< T_FP >::invert_transpose(), rocSolverInverter< T_FP >::resize(), rocSolverInverter< T_FP >::rocSolverInverter(), and rocSolverInverter< T_FP >::~rocSolverInverter().
|
private |
Definition at line 52 of file rocSolverInverter.hpp.
Referenced by rocSolverInverter< T_FP >::invert_transpose(), rocSolverInverter< T_FP >::rocSolverInverter(), and rocSolverInverter< T_FP >::~rocSolverInverter().
|
private |
pivot array + info
Definition at line 42 of file rocSolverInverter.hpp.
Referenced by rocSolverInverter< T_FP >::invert_transpose(), and rocSolverInverter< T_FP >::resize().
|
private |
Definition at line 43 of file rocSolverInverter.hpp.
Referenced by rocSolverInverter< T_FP >::invert_transpose(), and rocSolverInverter< T_FP >::resize().
|
private |
diagonal terms of LU matrix
Definition at line 45 of file rocSolverInverter.hpp.
Referenced by rocSolverInverter< T_FP >::invert_transpose(), and rocSolverInverter< T_FP >::resize().
|
private |
Definition at line 46 of file rocSolverInverter.hpp.
Referenced by rocSolverInverter< T_FP >::invert_transpose(), and rocSolverInverter< T_FP >::resize().
|
private |
scratch memory for cusolverDN
Definition at line 38 of file rocSolverInverter.hpp.
Referenced by rocSolverInverter< T_FP >::invert_transpose(), and rocSolverInverter< T_FP >::resize().
|
private |
scratch memory for cusolverDN
Definition at line 40 of file rocSolverInverter.hpp.
Referenced by rocSolverInverter< T_FP >::invert_transpose().
|
private |
workspace
Definition at line 48 of file rocSolverInverter.hpp.