![]() |
QMCPACK
|
Data buffer for walker log quantities. More...
Public Member Functions | |
WalkerLogBuffer () | |
size_t | nrows () |
current number of rows in the data buffer More... | |
size_t | ncols () |
current number of columns in the data buffer (row size) More... | |
void | resetBuffer () |
resize the buffer to zero More... | |
void | resetCollect () |
reset member variables at end of each WalkerLogCollector::collect() call More... | |
bool | sameAs (const WalkerLogBuffer< T > &ref) |
compare row size of this buffer to another one More... | |
void | collect (const std::string &name, const T &value) |
collect data for a single walker quantity of scalar type into the current buffer row More... | |
template<unsigned D> | |
void | collect (const std::string &name, Array< T, D > arr) |
collect data for a single walker quantity of array type into the current buffer row More... | |
template<unsigned D> | |
void | collect (const std::string &name, Array< std::complex< T >, D > arr) |
collect data for a single walker quantity of complex array type into the current buffer row More... | |
void | addRow (WalkerLogBuffer< T > other, size_t i) |
add a data row from another buffer to this one More... | |
void | writeSummary (std::string pad=" ") |
write a summary of quantities in the buffer More... | |
void | registerHDFData (hdf_archive &f) |
write the data_layout for all walker quantities in the HDF file More... | |
void | writeHDF (hdf_archive &f) |
write the buffer data into the HDF file More... | |
void | writeHDF (hdf_archive &f, hsize_t &file_pointer) |
write the buffer data into the HDF file More... | |
Public Attributes | |
std::string | label |
label for this data in HDF file More... | |
bool | first_collect |
marks first WalkerLogCollector::collect() call More... | |
hsize_t | hdf_file_pointer |
HDF file pointer. More... | |
Private Member Functions | |
void | resetRowSize (size_t row_size) |
make space as quantities are added to the buffer for the first time More... | |
void | makeNewRow () |
allocate a full new row at the end of the buffer More... | |
Private Attributes | |
size_t | quantity_index |
index of current quantity during WalkerLogCollector::collect() More... | |
std::vector< WalkerQuantityInfo > | quantity_info |
buffer row location data for each walker quantity used to populate "data_layout" field in HDF file More... | |
size_t | walker_data_size |
total size of walker data stored in a buffer row More... | |
Array< T, 2 > | buffer |
the walker data buffer itself More... | |
Data buffer for walker log quantities.
Each row in the buffer contains all quantities for one walker from a single step. Rows are added throughout an MC block. See WalkerLogCollector::collect()
Buffer data is written to HDF at the end of each MC block. See WalkerLogManager::writeBuffers()
Definition at line 111 of file WalkerLogBuffer.h.
|
inline |
Definition at line 134 of file WalkerLogBuffer.h.
|
inline |
add a data row from another buffer to this one
Definition at line 272 of file WalkerLogBuffer.h.
Referenced by WalkerLogManager::writeBuffers().
|
inline |
collect data for a single walker quantity of scalar type into the current buffer row
Definition at line 166 of file WalkerLogBuffer.h.
|
inline |
collect data for a single walker quantity of array type into the current buffer row
Definition at line 191 of file WalkerLogBuffer.h.
|
inline |
collect data for a single walker quantity of complex array type into the current buffer row
Definition at line 229 of file WalkerLogBuffer.h.
|
inlineprivate |
allocate a full new row at the end of the buffer
Definition at line 379 of file WalkerLogBuffer.h.
Referenced by WalkerLogBuffer< WLog::Real >::addRow(), and WalkerLogBuffer< WLog::Real >::collect().
|
inline |
current number of columns in the data buffer (row size)
Definition at line 147 of file WalkerLogBuffer.h.
|
inline |
current number of rows in the data buffer
Definition at line 144 of file WalkerLogBuffer.h.
Referenced by WalkerLogCollector::checkBuffers(), WalkerLogBuffer< WLog::Real >::makeNewRow(), and WalkerLogBuffer< WLog::Real >::resetRowSize().
|
inline |
write the data_layout for all walker quantities in the HDF file
Definition at line 312 of file WalkerLogBuffer.h.
Referenced by WalkerLogManager::writeBuffersHDF().
|
inline |
resize the buffer to zero
Definition at line 150 of file WalkerLogBuffer.h.
Referenced by WalkerLogCollector::resetBuffers(), WalkerLogBuffer< WLog::Real >::WalkerLogBuffer(), and WalkerLogManager::writeBuffers().
|
inline |
reset member variables at end of each WalkerLogCollector::collect() call
Definition at line 153 of file WalkerLogBuffer.h.
|
inlineprivate |
make space as quantities are added to the buffer for the first time
Definition at line 359 of file WalkerLogBuffer.h.
Referenced by WalkerLogBuffer< WLog::Real >::addRow(), and WalkerLogBuffer< WLog::Real >::collect().
|
inline |
compare row size of this buffer to another one
Definition at line 163 of file WalkerLogBuffer.h.
Referenced by WalkerLogManager::checkCollectors().
|
inline |
write the buffer data into the HDF file
Definition at line 338 of file WalkerLogBuffer.h.
Referenced by WalkerLogManager::writeBuffersHDF(), and WalkerLogBuffer< WLog::Real >::writeHDF().
|
inline |
write the buffer data into the HDF file
Definition at line 342 of file WalkerLogBuffer.h.
|
inline |
write a summary of quantities in the buffer
Definition at line 294 of file WalkerLogBuffer.h.
|
private |
the walker data buffer itself
Definition at line 131 of file WalkerLogBuffer.h.
Referenced by WalkerLogBuffer< WLog::Real >::addRow(), WalkerLogBuffer< WLog::Real >::collect(), WalkerLogBuffer< WLog::Real >::makeNewRow(), WalkerLogBuffer< WLog::Real >::ncols(), WalkerLogBuffer< WLog::Real >::nrows(), WalkerLogBuffer< WLog::Real >::resetBuffer(), WalkerLogBuffer< WLog::Real >::resetRowSize(), WalkerLogBuffer< WLog::Real >::sameAs(), WalkerLogBuffer< WLog::Real >::writeHDF(), and WalkerLogBuffer< WLog::Real >::writeSummary().
bool first_collect |
marks first WalkerLogCollector::collect() call
Definition at line 117 of file WalkerLogBuffer.h.
Referenced by WalkerLogBuffer< WLog::Real >::addRow(), WalkerLogBuffer< WLog::Real >::collect(), WalkerLogBuffer< WLog::Real >::resetCollect(), and WalkerLogBuffer< WLog::Real >::WalkerLogBuffer().
hsize_t hdf_file_pointer |
HDF file pointer.
Definition at line 119 of file WalkerLogBuffer.h.
Referenced by WalkerLogBuffer< WLog::Real >::registerHDFData(), WalkerLogManager::writeBuffersHDF(), and WalkerLogBuffer< WLog::Real >::writeHDF().
std::string label |
label for this data in HDF file
Definition at line 115 of file WalkerLogBuffer.h.
Referenced by WalkerLogCollector::init(), WalkerLogBuffer< WLog::Real >::registerHDFData(), WalkerLogBuffer< WLog::Real >::WalkerLogBuffer(), WalkerLogManager::WalkerLogManager(), WalkerLogBuffer< WLog::Real >::writeHDF(), and WalkerLogBuffer< WLog::Real >::writeSummary().
|
private |
index of current quantity during WalkerLogCollector::collect()
Definition at line 123 of file WalkerLogBuffer.h.
Referenced by WalkerLogBuffer< WLog::Real >::collect(), WalkerLogBuffer< WLog::Real >::resetCollect(), and WalkerLogBuffer< WLog::Real >::WalkerLogBuffer().
|
private |
buffer row location data for each walker quantity used to populate "data_layout" field in HDF file
Definition at line 127 of file WalkerLogBuffer.h.
Referenced by WalkerLogBuffer< WLog::Real >::addRow(), WalkerLogBuffer< WLog::Real >::collect(), WalkerLogBuffer< WLog::Real >::registerHDFData(), WalkerLogBuffer< WLog::Real >::resetCollect(), and WalkerLogBuffer< WLog::Real >::writeSummary().
|
private |
total size of walker data stored in a buffer row
Definition at line 129 of file WalkerLogBuffer.h.
Referenced by WalkerLogBuffer< WLog::Real >::collect(), and WalkerLogBuffer< WLog::Real >::WalkerLogBuffer().