QMCPACK
PSdispatcher.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2021 QMCPACK developers.
6 //
7 // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #ifndef QMCPLUSPLUS_PSDISPATCH_H
14 #define QMCPLUSPLUS_PSDISPATCH_H
15 
16 #include "ParticleSet.h"
17 
18 namespace qmcplusplus
19 {
20 /** Wrappers for dispatching to ParticleSet single walker APIs or mw_ APIs.
21  * This should be only used by QMC drivers.
22  * member function names must match mw_ APIs in TrialWaveFunction
23  */
25 {
26 public:
30 
31  PSdispatcher(bool use_batch);
32 
35  const std::vector<bool>& recompute,
36  bool pbyp) const;
37 
38  void flex_update(const RefVectorWithLeader<ParticleSet>& p_list, bool skipSK = false) const;
39 
40  template<CoordsType CT>
41  void flex_makeMove(const RefVectorWithLeader<ParticleSet>& p_list, int iat, const MCCoords<CT>& displs) const;
42 
43  template<CoordsType CT>
45  int iat,
46  const std::vector<bool>& isAccepted,
47  bool forward_mode = true) const;
48 
50 
51  void flex_donePbyP(const RefVectorWithLeader<ParticleSet>& p_list) const;
52 
53 private:
54  bool use_batch_;
55 };
56 } // namespace qmcplusplus
57 
58 #endif
void flex_accept_rejectMove(const RefVectorWithLeader< ParticleSet > &p_list, int iat, const std::vector< bool > &isAccepted, bool forward_mode=true) const
Walker< QMCTraits, PtclOnLatticeTraits > Walker_t
walker type
Definition: ParticleSet.h:59
Fixed-size array.
Definition: OhmmsTinyMeta.h:30
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
ParticleLayout::SingleParticlePos SingleParticlePos
Definition: Configuration.h:87
void flex_saveWalker(const RefVectorWithLeader< ParticleSet > &p_list, const RefVector< Walker_t > &walkers) const
PSdispatcher(bool use_batch)
const char walkers[]
Definition: HDFVersion.h:36
Wrappers for dispatching to ParticleSet single walker APIs or mw_ APIs.
Definition: PSdispatcher.h:24
void flex_loadWalker(const RefVectorWithLeader< ParticleSet > &p_list, const RefVector< Walker_t > &walkers, const std::vector< bool > &recompute, bool pbyp) const
std::vector< std::reference_wrapper< T > > RefVector
void flex_update(const RefVectorWithLeader< ParticleSet > &p_list, bool skipSK=false) const
void flex_donePbyP(const RefVectorWithLeader< ParticleSet > &p_list) const
ParticleSet::Scalar_t Scalar_t
Definition: PSdispatcher.h:29
A container class to represent a walker.
Definition: Walker.h:49
void flex_makeMove(const RefVectorWithLeader< ParticleSet > &p_list, int iat, const MCCoords< CT > &displs) const