![]() |
QMCPACK
|
Public Types | |
using | PropertySetType = QMCTraits::PropertySetType |
Public Member Functions | |
size_t | getMaxSamples () const |
bool | empty () const |
const MCSample & | getSample (size_t i) const |
void | resetSampleCount () |
Set the sample count to zero but preserve the storage. More... | |
size_t | getNumSamples () const |
void | setMaxSamples (size_t n, size_t number_of_ranks=1) |
set the number of max samples per rank. More... | |
size_t | getGlobalNumSamples () const |
Global number of samples is number of samples per rank * number of ranks. More... | |
void | loadSample (ParticleSet &pset, size_t iw) const |
load a single sample from SampleStack More... | |
void | appendSample (MCSample &&sample) |
void | clearEnsemble () |
clear the ensemble More... | |
Private Attributes | |
size_t | max_samples_ {10} |
size_t | current_sample_count_ {0} |
size_t | global_num_samples_ {max_samples_} |
std::vector< MCSample > | sample_vector_ |
Definition at line 29 of file SampleStack.h.
Definition at line 32 of file SampleStack.h.
void appendSample | ( | MCSample && | sample | ) |
Definition at line 33 of file SampleStack.cpp.
References SampleStack::current_sample_count_, SampleStack::max_samples_, and SampleStack::sample_vector_.
Referenced by VMCBatched::run(), MCWalkerConfiguration::saveEnsemble(), and qmcplusplus::TEST_CASE().
void clearEnsemble | ( | ) |
clear the ensemble
Definition at line 51 of file SampleStack.cpp.
References SampleStack::current_sample_count_, and SampleStack::sample_vector_.
Referenced by MCWalkerConfiguration::clearEnsemble(), MCWalkerConfiguration::loadEnsemble(), MCWalkerConfiguration::MCWalkerConfiguration(), MCWalkerConfiguration::setNumSamples(), and qmcplusplus::TEST_CASE().
|
inline |
Definition at line 36 of file SampleStack.h.
References SampleStack::sample_vector_.
Referenced by MCWalkerConfiguration::loadEnsemble().
|
inline |
Global number of samples is number of samples per rank * number of ranks.
Definition at line 45 of file SampleStack.h.
References SampleStack::global_num_samples_.
Referenced by QMCCostFunctionBatched::correlatedSampling(), and qmcplusplus::TEST_CASE().
|
inline |
Definition at line 34 of file SampleStack.h.
References SampleStack::max_samples_.
Referenced by MCWalkerConfiguration::getMaxSamples(), MCWalkerConfiguration::loadEnsemble(), and qmcplusplus::TEST_CASE().
|
inline |
Definition at line 41 of file SampleStack.h.
References SampleStack::current_sample_count_.
Referenced by QMCCostFunctionBatched::checkConfigurations(), QMCCostFunctionBatched::correlatedSampling(), QMCCostFunctionBatched::getConfigurations(), MCWalkerConfiguration::loadEnsemble(), MCWalkerConfiguration::numSamples(), and qmcplusplus::TEST_CASE().
const MCSample & getSample | ( | size_t | i | ) | const |
Definition at line 31 of file SampleStack.cpp.
References SampleStack::sample_vector_.
Referenced by MCWalkerConfiguration::loadEnsemble(), and qmcplusplus::TEST_CASE().
void loadSample | ( | ParticleSet & | pset, |
size_t | iw | ||
) | const |
load a single sample from SampleStack
Definition at line 45 of file SampleStack.cpp.
References qmcplusplus::pset, and SampleStack::sample_vector_.
Referenced by MCWalkerConfiguration::loadSample().
void resetSampleCount | ( | ) |
Set the sample count to zero but preserve the storage.
Definition at line 57 of file SampleStack.cpp.
References SampleStack::current_sample_count_.
Referenced by QMCFixedSampleLinearOptimizeBatched::generateSamples(), and qmcplusplus::TEST_CASE().
void setMaxSamples | ( | size_t | n, |
size_t | num_ranks = 1 |
||
) |
set the number of max samples per rank.
allocate the SampleStack
n | number of samples per rank |
num_ranks | number of ranks. Used to set global number of samples. |
Definition at line 23 of file SampleStack.cpp.
References SampleStack::current_sample_count_, SampleStack::global_num_samples_, SampleStack::max_samples_, omptarget::min(), qmcplusplus::n, qmcplusplus::num_ranks, and SampleStack::sample_vector_.
Referenced by VMCBatched::enable_sample_collection(), MCWalkerConfiguration::MCWalkerConfiguration(), MCWalkerConfiguration::setNumSamples(), and qmcplusplus::TEST_CASE().
|
private |
Definition at line 59 of file SampleStack.h.
Referenced by SampleStack::appendSample(), SampleStack::clearEnsemble(), SampleStack::getNumSamples(), SampleStack::resetSampleCount(), and SampleStack::setMaxSamples().
|
private |
Definition at line 60 of file SampleStack.h.
Referenced by SampleStack::getGlobalNumSamples(), and SampleStack::setMaxSamples().
|
private |
Definition at line 58 of file SampleStack.h.
Referenced by SampleStack::appendSample(), SampleStack::getMaxSamples(), and SampleStack::setMaxSamples().
|
private |
Definition at line 62 of file SampleStack.h.
Referenced by SampleStack::appendSample(), SampleStack::clearEnsemble(), SampleStack::empty(), SampleStack::getSample(), SampleStack::loadSample(), and SampleStack::setMaxSamples().