From 105a3b388ab628386fa7fd4796a0c70d7e65df9d Mon Sep 17 00:00:00 2001 From: Ye Luo Date: Fri, 11 Oct 2024 17:37:45 -0500 Subject: [PATCH] Keep positions in ST. --- .../BsplineFactory/SplineC2ROMPTarget.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/QMCWaveFunctions/BsplineFactory/SplineC2ROMPTarget.cpp b/src/QMCWaveFunctions/BsplineFactory/SplineC2ROMPTarget.cpp index 482be8b664..0ae14e55cd 100644 --- a/src/QMCWaveFunctions/BsplineFactory/SplineC2ROMPTarget.cpp +++ b/src/QMCWaveFunctions/BsplineFactory/SplineC2ROMPTarget.cpp @@ -288,7 +288,7 @@ void SplineC2ROMPTarget::mw_evaluateDetRatios(const RefVectorWithLeader::mw_evaluateDetRatios(const RefVectorWithLeader(det_ratios_buffer_H2D.data() + nw * sizeof(ValueType*)); + auto* pos_ptr = reinterpret_cast(det_ratios_buffer_H2D.data() + nw * sizeof(ValueType*)); auto* ref_id_ptr = - reinterpret_cast(det_ratios_buffer_H2D.data() + nw * sizeof(ValueType*) + mw_nVP * 6 * sizeof(TT)); + reinterpret_cast(det_ratios_buffer_H2D.data() + nw * sizeof(ValueType*) + mw_nVP * 6 * sizeof(ST)); size_t iVP = 0; for (size_t iw = 0; iw < nw; iw++) { @@ -353,14 +353,14 @@ void SplineC2ROMPTarget::mw_evaluateDetRatios(const RefVectorWithLeader(buffer_H2D_ptr + nw * sizeof(ValueType*) + mw_nVP * 6 * sizeof(TT)); + auto* ref_id_ptr = reinterpret_cast(buffer_H2D_ptr + nw * sizeof(ValueType*) + mw_nVP * 6 * sizeof(ST)); auto* restrict psiinv_ptr = reinterpret_cast(buffer_H2D_ptr)[ref_id_ptr[iat]]; - auto* restrict pos_scratch = reinterpret_cast(buffer_H2D_ptr + nw * sizeof(ValueType*)); + auto* restrict pos_scratch = reinterpret_cast(buffer_H2D_ptr + nw * sizeof(ValueType*)); int ix, iy, iz; ST a[4], b[4], c[4]; - spline2::computeLocationAndFractional(spline_ptr, ST(pos_scratch[iat * 6 + 3]), ST(pos_scratch[iat * 6 + 4]), - ST(pos_scratch[iat * 6 + 5]), ix, iy, iz, a, b, c); + spline2::computeLocationAndFractional(spline_ptr, pos_scratch[iat * 6 + 3], pos_scratch[iat * 6 + 4], + pos_scratch[iat * 6 + 5], ix, iy, iz, a, b, c); PRAGMA_OFFLOAD("omp parallel for") for (int index = 0; index < last - first; index++) @@ -370,7 +370,7 @@ void SplineC2ROMPTarget::mw_evaluateDetRatios(const RefVectorWithLeader