13 #ifndef QMCPLUSPLUS_DTDIMPL_AA_H 14 #define QMCPLUSPLUS_DTDIMPL_AA_H 24 template<
typename T,
unsigned D,
int SC>
53 const size_t num_padded = getAlignedSize<T>(
N);
54 const size_t Alignment = getAlignment<T>();
55 return (num_padded * (2 *
N - num_padded + 1) + (Alignment - 1) * num_padded) / 2;
80 constexpr T BigR = std::numeric_limits<T>::max();
102 old_r_[iat] = std::numeric_limits<T>::max();
110 RealType min_dist = std::numeric_limits<RealType>::max();
115 if (
temp_r_[jat] < min_dist && jat != iat)
125 for (
int jat = 0; jat < iat; ++jat)
137 assert(index != iat && index >= 0);
154 const int nupdate = iat;
158 for (
int idim = 0; idim < D; ++idim)
172 const int nupdate = jat;
178 for (
int idim = 0; idim < D; ++idim)
187 for (
int idim = 0; idim < D; ++idim)
int old_prepared_elec_id_
set to particle id after move() with prepare_old = true.
void resize(size_type n, Type_t val=Type_t())
Resize the container.
const size_t num_targets_
size_t getAlignedSize(size_t n)
return size in T's of allocated aligned memory
std::vector< T, aligned_allocator< T > > aligned_vector
helper functions for EinsplineSetBuilder
SoaDistanceTableAA(ParticleSet &target)
virtual const PosVectorSoa & getAllParticlePos() const =0
all particle position accessor
void updatePartial(IndexType jat, bool from_temp) override
fill partially the distance table by the pair relations from the temporary or old particle position...
Timer accumulates time and call counts.
std::vector< DisplRow > displacements_
displacements_[num_targets_][3][num_sources_], [i][3][j] = r_A2[j] - r_A1[i] Note: Derived classes de...
DisplRow old_dr_
old displacements
DistRow old_r_
old distances
~SoaDistanceTableAA() override
Specialized paritlce class for atomistic simulations.
size_type size() const
return the current size
SoaDistanceTableAA()=delete
NewTimer & evaluate_timer_
timer for evaluate()
NewTimer & createGlobalTimer(const std::string &myname, timer_levels mylevel)
size_t compute_size(int N) const
const std::string & getName() const
return the name of table
A derived classe from DistacneTableData, specialized for dense case.
AA type of DistanceTable containing storage.
T * data()
return the base
const DynamicCoordinates & getCoordinates() const
QMCTraits::IndexType IndexType
sycl::event copy_n(sycl::queue &aq, const T1 *restrict VA, size_t array_size, T2 *restrict VC, const std::vector< sycl::event > &events)
int get_first_neighbor(IndexType iat, RealType &r, PosType &dr, bool newpos) const override
NewTimer & update_timer_
timer for update()
void move(const ParticleSet &P, const PosType &rnew, const IndexType iat, bool prepare_old) override
evaluate the temporary pair relations
void resize(size_type n)
resize myData
std::vector< DistRow > distances_
distances_[num_targets_][num_sources_], [i][3][j] = |r_A2[j] - r_A1[i]| Note: Derived classes decide ...
const size_t num_targets_padded_
number of targets with padding
aligned_vector< RealType > memory_pool_
actual memory for dist and displacements_
NewTimer & move_timer_
timer for move()
void update(IndexType iat) override
After accepting the iat-th particle, update the iat-th row of distances_ and displacements_.
void evaluate(ParticleSet &P) override
evaluate the full Distance Table