![]() |
QMCPACK
|
implements delayed update on CPU using BLAS More...
Public Member Functions | |
DelayedUpdate () | |
default constructor More... | |
void | resize (int norb, int delay) |
resize the internal storage More... | |
template<typename TREAL > | |
void | invert_transpose (const Matrix< T > &logdetT, Matrix< T > &Ainv, std::complex< TREAL > &log_value) |
compute the inverse of the transpose of matrix A More... | |
void | initializeInv (const Matrix< T > &Ainv) |
initialize internal objects when Ainv is refreshed More... | |
int | getDelayCount () const |
template<typename VVT > | |
void | getInvRow (const Matrix< T > &Ainv, int rowchanged, VVT &invRow) |
compute the row of up-to-date Ainv More... | |
template<typename VVT , typename RATIOT > | |
void | acceptRow (Matrix< T > &Ainv, int rowchanged, const VVT &psiV, const RATIOT ratio_new) |
accept a move with the update delayed More... | |
void | updateInvMat (Matrix< T > &Ainv) |
update the full Ainv and reset delay_count More... | |
Private Attributes | |
Matrix< T > | U |
orbital values of delayed electrons More... | |
Matrix< T > | V |
rows of Ainv corresponding to delayed electrons More... | |
Matrix< T > | Binv |
Matrix inverse of B, at maximum KxK. More... | |
Matrix< T > | tempMat |
scratch space, used during inverse update More... | |
Vector< T > | temp |
temporal scratch space used by SM-1 More... | |
Vector< T > | p |
new column of B More... | |
std::vector< int > | delay_list |
list of delayed electrons More... | |
int | delay_count |
current number of delays, increase one for each acceptance, reset to 0 after updating Ainv More... | |
DiracMatrix< T_FP > | detEng |
matrix inversion engine More... | |
implements delayed update on CPU using BLAS
T | base precision for most computation |
T_FP | high precision for matrix inversion, T_FP >= T |
Definition at line 29 of file DelayedUpdate.h.
|
inline |
default constructor
Definition at line 52 of file DelayedUpdate.h.
|
inline |
accept a move with the update delayed
Ainv | inverse matrix |
rowchanged | the row id corresponding to the proposed electron |
psiV | new orbital values |
Before delay_count reaches the maximum delay, only Binv is updated with a recursive algorithm
Definition at line 125 of file DelayedUpdate.h.
References DelayedUpdate< T, T_FP >::Binv, Matrix< T, Alloc >::cols(), BLAS::cone, qmcplusplus::syclBLAS::copy_n(), BLAS::czero, Matrix< T, Alloc >::data(), Vector< T, Alloc >::data(), DelayedUpdate< T, T_FP >::delay_count, DelayedUpdate< T, T_FP >::delay_list, BLAS::gemv(), BLAS::ger(), DelayedUpdate< T, T_FP >::p, Matrix< T, Alloc >::rows(), DelayedUpdate< T, T_FP >::U, DelayedUpdate< T, T_FP >::updateInvMat(), and DelayedUpdate< T, T_FP >::V.
Referenced by qmcplusplus::TEST_CASE().
|
inline |
Definition at line 90 of file DelayedUpdate.h.
References DelayedUpdate< T, T_FP >::delay_count.
|
inline |
compute the row of up-to-date Ainv
Ainv | inverse matrix |
rowchanged | the row id corresponding to the proposed electron |
Definition at line 97 of file DelayedUpdate.h.
References DelayedUpdate< T, T_FP >::Binv, Matrix< T, Alloc >::cols(), BLAS::cone, qmcplusplus::syclBLAS::copy_n(), BLAS::czero, Matrix< T, Alloc >::data(), Vector< T, Alloc >::data(), DelayedUpdate< T, T_FP >::delay_count, BLAS::gemv(), DelayedUpdate< T, T_FP >::p, Matrix< T, Alloc >::rows(), Matrix< T, Alloc >::size(), DelayedUpdate< T, T_FP >::U, and DelayedUpdate< T, T_FP >::V.
Referenced by qmcplusplus::TEST_CASE().
|
inline |
initialize internal objects when Ainv is refreshed
Ainv | inverse matrix |
Definition at line 84 of file DelayedUpdate.h.
References DelayedUpdate< T, T_FP >::delay_count.
|
inline |
compute the inverse of the transpose of matrix A
logdetT | orbital value matrix |
Ainv | inverse matrix |
Definition at line 74 of file DelayedUpdate.h.
References DelayedUpdate< T, T_FP >::delay_count, and DelayedUpdate< T, T_FP >::detEng.
|
inline |
resize the internal storage
norb | number of electrons/orbitals |
delay,maximum | delay 0<delay<=norb |
Definition at line 58 of file DelayedUpdate.h.
References DelayedUpdate< T, T_FP >::Binv, DelayedUpdate< T, T_FP >::delay_list, DelayedUpdate< T, T_FP >::p, Matrix< T, Alloc >::resize(), Vector< T, Alloc >::resize(), DelayedUpdate< T, T_FP >::temp, DelayedUpdate< T, T_FP >::tempMat, DelayedUpdate< T, T_FP >::U, and DelayedUpdate< T, T_FP >::V.
Referenced by qmcplusplus::TEST_CASE().
|
inline |
update the full Ainv and reset delay_count
Ainv | inverse matrix |
Definition at line 157 of file DelayedUpdate.h.
References DelayedUpdate< T, T_FP >::Binv, Matrix< T, Alloc >::cols(), BLAS::cone, BLAS::czero, Matrix< T, Alloc >::data(), Vector< T, Alloc >::data(), DelayedUpdate< T, T_FP >::delay_count, DelayedUpdate< T, T_FP >::delay_list, BLAS::gemm(), BLAS::gemv(), BLAS::ger(), getNextLevelNumThreads(), omptarget::min(), BlasThreadingEnv::NestedThreadingSupported(), Matrix< T, Alloc >::rows(), DelayedUpdate< T, T_FP >::temp, DelayedUpdate< T, T_FP >::tempMat, DelayedUpdate< T, T_FP >::U, and DelayedUpdate< T, T_FP >::V.
Referenced by DelayedUpdate< T, T_FP >::acceptRow().
|
private |
Matrix inverse of B, at maximum KxK.
Definition at line 36 of file DelayedUpdate.h.
Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdate< T, T_FP >::getInvRow(), DelayedUpdate< T, T_FP >::resize(), and DelayedUpdate< T, T_FP >::updateInvMat().
|
private |
current number of delays, increase one for each acceptance, reset to 0 after updating Ainv
Definition at line 46 of file DelayedUpdate.h.
Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdate< T, T_FP >::getDelayCount(), DelayedUpdate< T, T_FP >::getInvRow(), DelayedUpdate< T, T_FP >::initializeInv(), DelayedUpdate< T, T_FP >::invert_transpose(), and DelayedUpdate< T, T_FP >::updateInvMat().
|
private |
list of delayed electrons
Definition at line 44 of file DelayedUpdate.h.
Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdate< T, T_FP >::resize(), and DelayedUpdate< T, T_FP >::updateInvMat().
|
private |
matrix inversion engine
Definition at line 48 of file DelayedUpdate.h.
Referenced by DelayedUpdate< T, T_FP >::invert_transpose().
|
private |
new column of B
Definition at line 42 of file DelayedUpdate.h.
Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdate< T, T_FP >::getInvRow(), and DelayedUpdate< T, T_FP >::resize().
|
private |
temporal scratch space used by SM-1
Definition at line 40 of file DelayedUpdate.h.
Referenced by DelayedUpdate< T, T_FP >::resize(), and DelayedUpdate< T, T_FP >::updateInvMat().
|
private |
scratch space, used during inverse update
Definition at line 38 of file DelayedUpdate.h.
Referenced by DelayedUpdate< T, T_FP >::resize(), and DelayedUpdate< T, T_FP >::updateInvMat().
|
private |
orbital values of delayed electrons
Definition at line 32 of file DelayedUpdate.h.
Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdate< T, T_FP >::getInvRow(), DelayedUpdate< T, T_FP >::resize(), and DelayedUpdate< T, T_FP >::updateInvMat().
|
private |
rows of Ainv corresponding to delayed electrons
Definition at line 34 of file DelayedUpdate.h.
Referenced by DelayedUpdate< T, T_FP >::acceptRow(), DelayedUpdate< T, T_FP >::getInvRow(), DelayedUpdate< T, T_FP >::resize(), and DelayedUpdate< T, T_FP >::updateInvMat().