From 22cc7173ed04e54c55d0deaa053d96a4c3545363 Mon Sep 17 00:00:00 2001 From: Peter Doak Date: Wed, 6 Oct 2021 13:05:22 -0400 Subject: [PATCH] propagating mw_invertPsiM const API changes --- src/QMCWaveFunctions/Fermion/DiracDeterminantBatched.cpp | 6 +++--- src/QMCWaveFunctions/Fermion/DiracMatrixComputeCUDA.hpp | 6 +++--- .../tests/benchmark_DiracMatrixComputeCUDA.cpp | 4 ++-- .../tests/test_DiracMatrixComputeCUDA.cpp | 8 ++++---- .../tests/test_DiracMatrixComputeOMPTarget.cpp | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/QMCWaveFunctions/Fermion/DiracDeterminantBatched.cpp b/src/QMCWaveFunctions/Fermion/DiracDeterminantBatched.cpp index 4f77c364ad..d2cf4d0860 100644 --- a/src/QMCWaveFunctions/Fermion/DiracDeterminantBatched.cpp +++ b/src/QMCWaveFunctions/Fermion/DiracDeterminantBatched.cpp @@ -56,8 +56,8 @@ void DiracDeterminantBatched::invertPsiM(const DualMatrix& ps template void DiracDeterminantBatched::mw_invertPsiM(const RefVectorWithLeader& wfc_list, - RefVector>& logdetT_list, - RefVector>& a_inv_list) const + const RefVector>& logdetT_list, + const RefVector>& a_inv_list) const { auto& wfc_leader = wfc_list.getCastedLeader>(); ScopedTimer inverse_timer(wfc_leader.InverseTimer); @@ -870,7 +870,7 @@ void DiracDeterminantBatched::mw_recompute(const RefVectorWithLeader RefVectorWithLeader p_filtered_list(p_list.getLeader()); RefVectorWithLeader phi_list(*wfc_leader.Phi); std::vector> psiM_host_views; - RefVector> psiM_temp_list; + RefVector> psiM_temp_list; RefVector> psiM_host_list; RefVector> dpsiM_list; RefVector> d2psiM_list; diff --git a/src/QMCWaveFunctions/Fermion/DiracMatrixComputeCUDA.hpp b/src/QMCWaveFunctions/Fermion/DiracMatrixComputeCUDA.hpp index 6c499bb111..0e2478c138 100644 --- a/src/QMCWaveFunctions/Fermion/DiracMatrixComputeCUDA.hpp +++ b/src/QMCWaveFunctions/Fermion/DiracMatrixComputeCUDA.hpp @@ -93,7 +93,7 @@ class DiracMatrixComputeCUDA : public Resource * 3. \todo Remove Transfer inv_a_mat to host and let the upper level code handle it. */ inline void mw_computeInvertAndLog(CUDALinearAlgebraHandles& cuda_handles, - const RefVector>& a_mats, + const RefVector>& a_mats, const RefVector>& inv_a_mats, const int n, DualVector& log_values) @@ -283,7 +283,7 @@ class DiracMatrixComputeCUDA : public Resource template inline std::enable_if_t::value> mw_invertTranspose( CUDALinearAlgebraHandles& cuda_handles, - const RefVector>& a_mats, + const RefVector>& a_mats, const RefVector>& inv_a_mats, DualVector& log_values) { @@ -324,7 +324,7 @@ class DiracMatrixComputeCUDA : public Resource template inline std::enable_if_t::value> mw_invertTranspose( CUDALinearAlgebraHandles& cuda_handles, - const RefVector>& a_mats, + const RefVector>& a_mats, const RefVector>& inv_a_mats, DualVector& log_values) { diff --git a/src/QMCWaveFunctions/tests/benchmark_DiracMatrixComputeCUDA.cpp b/src/QMCWaveFunctions/tests/benchmark_DiracMatrixComputeCUDA.cpp index 7734fea222..db0cb1cd9f 100644 --- a/src/QMCWaveFunctions/tests/benchmark_DiracMatrixComputeCUDA.cpp +++ b/src/QMCWaveFunctions/tests/benchmark_DiracMatrixComputeCUDA.cpp @@ -90,7 +90,7 @@ TEST_CASE("DiracMatrixComputeCUDA_large_determinants_benchmark_legacy_1024_4", " OffloadPinnedVector> log_values(params.batch_size); std::vector> pinned_inv_mats(params.batch_size, {params.n, params.n}); - auto a_mats = makeRefVector(pinned_spd_mats); + auto a_mats = makeRefVector(pinned_spd_mats); RefVector> inv_a_mats = makeRefVector(pinned_inv_mats); @@ -142,7 +142,7 @@ TEST_CASE("benchmark_DiracMatrixComputeCUDA_vs_legacy_256_10", "[wavefunction][f OffloadPinnedVector> log_values(params.batch_size); std::vector> pinned_inv_mats(params.batch_size, {params.n, params.n}); - auto a_mats = makeRefVector(pinned_spd_mats); + auto a_mats = makeRefVector(pinned_spd_mats); RefVector> inv_a_mats = makeRefVector(pinned_inv_mats); diff --git a/src/QMCWaveFunctions/tests/test_DiracMatrixComputeCUDA.cpp b/src/QMCWaveFunctions/tests/test_DiracMatrixComputeCUDA.cpp index 70a0fd4e38..2012dcc329 100644 --- a/src/QMCWaveFunctions/tests/test_DiracMatrixComputeCUDA.cpp +++ b/src/QMCWaveFunctions/tests/test_DiracMatrixComputeCUDA.cpp @@ -90,7 +90,7 @@ TEST_CASE("DiracMatrixComputeCUDA_different_batch_sizes", "[wavefunction][fermio OffloadPinnedMatrix inv_mat_a2; inv_mat_a2.resize(4, 4); - RefVector> a_mats{mat_a, mat_a2}; + RefVector> a_mats{mat_a, mat_a2}; RefVector> inv_a_mats{inv_mat_a, inv_mat_a2}; log_values.resize(2); @@ -112,7 +112,7 @@ TEST_CASE("DiracMatrixComputeCUDA_different_batch_sizes", "[wavefunction][fermio a_mats[1] = mat_a3; - RefVector> a_mats3{mat_a, mat_a2, mat_a3}; + RefVector> a_mats3{mat_a, mat_a2, mat_a3}; RefVector> inv_a_mats3{inv_mat_a, inv_mat_a2, inv_mat_a3}; log_values.resize(3); @@ -167,7 +167,7 @@ TEST_CASE("DiracMatrixComputeCUDA_complex_determinants_against_legacy", "[wavefu OffloadPinnedMatrix> inv_mat_a2; inv_mat_a2.resize(n, n); - RefVector>> a_mats{mat_a, mat_a2}; + RefVector>> a_mats{mat_a, mat_a2}; RefVector>> inv_a_mats{inv_mat_a, inv_mat_a2}; dmcc.mw_invertTranspose(*cuda_handles, a_mats, inv_a_mats, log_values); @@ -222,7 +222,7 @@ TEST_CASE("DiracMatrixComputeCUDA_large_determinants_against_legacy", "[wavefunc OffloadPinnedMatrix inv_mat_a2; inv_mat_a2.resize(n, n); - RefVector> a_mats{mat_a, mat_a2}; + RefVector> a_mats{mat_a, mat_a2}; RefVector> inv_a_mats{inv_mat_a, inv_mat_a2}; dmcc.mw_invertTranspose(*cuda_handles, a_mats, inv_a_mats, log_values); diff --git a/src/QMCWaveFunctions/tests/test_DiracMatrixComputeOMPTarget.cpp b/src/QMCWaveFunctions/tests/test_DiracMatrixComputeOMPTarget.cpp index b9b51678ca..d5fcb607dd 100644 --- a/src/QMCWaveFunctions/tests/test_DiracMatrixComputeOMPTarget.cpp +++ b/src/QMCWaveFunctions/tests/test_DiracMatrixComputeOMPTarget.cpp @@ -70,7 +70,7 @@ TEST_CASE("DiracMatrixComputeOMPTarget_different_batch_sizes", "[wavefunction][f OffloadPinnedMatrix inv_mat_a2; inv_mat_a2.resize(4, 4); - RefVector> a_mats{mat_a, mat_a2}; + RefVector> a_mats{mat_a, mat_a2}; RefVector> inv_a_mats{inv_mat_a, inv_mat_a2}; log_values.resize(2); @@ -93,7 +93,7 @@ TEST_CASE("DiracMatrixComputeOMPTarget_different_batch_sizes", "[wavefunction][f a_mats[1] = mat_a3; - RefVector> a_mats3{mat_a, mat_a2, mat_a3}; + RefVector> a_mats3{mat_a, mat_a2, mat_a3}; RefVector> inv_a_mats3{inv_mat_a, inv_mat_a2, inv_mat_a3}; log_values.resize(3); @@ -147,7 +147,7 @@ TEST_CASE("DiracMatrixComputeOMPTarget_large_determinants_against_legacy", "[wav OffloadPinnedMatrix inv_mat_a2; inv_mat_a2.resize(n, n); - RefVector> a_mats{mat_a, mat_a2}; + RefVector> a_mats{mat_a, mat_a2}; RefVector> inv_a_mats{inv_mat_a, inv_mat_a2};