QDP++
IO

Forward empty decl. More...

Classes

class  QDP::BinaryStoreDB< K, D >
 DB Base class. More...
class  QDP::TextReader
 Text input class. More...
class  QDP::TextBufferReader
 Text buffer input class. More...
class  QDP::TextFileReader
 Text file input class. More...
class  QDP::TextWriter
 Text output base class. More...
class  QDP::TextBufferWriter
 Text buffer output class. More...
class  QDP::TextFileWriter
 Text output class. More...
class  QDP::BinaryReader
 Binary input base class. More...
class  QDP::BinaryBufferReader
 Binary buffer input class. More...
class  QDP::BinaryFileReader
 Binary file input class. More...
class  QDP::BinaryWriter
 Binary writer base class. More...
class  QDP::BinaryBufferWriter
 Binary buffer output class. More...
class  QDP::BinaryFileWriter
 Binary file output class. More...
class  QDP::BinaryReaderWriter
 Binary input/output base class. More...
class  QDP::BinaryBufferReaderWriter
 Binary buffer input/ouput class. More...
class  QDP::BinaryFileReaderWriter
 Binary file input/output class. More...
class  QDP::XMLReader
 XML reader class. More...
class  QDP::XMLFileWriter
 Writes XML metadata to a file. More...

Functions

static void QDP::readArchivHeader (BinaryReader &cfg_in, ArchivGauge_t &header)
 Read a QCD (NERSC) Archive format gauge field header.
void QDP::readArchiv (BinaryReader &cfg_in, multi1d< LatticeColorMatrix > &u, n_uint32_t &checksum, int mat_size, int float_size)
 Read a NERSC Gauge Connection Archive file.
static void QDP::writeArchivHeader (BinaryWriter &cfg_out, const ArchivGauge_t &header)
 Write a QCD (NERSC) Archive format gauge field.
void QDP::writeArchiv (BinaryWriter &cfg_out, const multi1d< LatticeColorMatrix > &u, int mat_size)
 Writes a NERSC Gauge Connection Archive gauge configuration file.
 QDP::BinaryStoreDB< K, D >::BinaryStoreDB ()
 QDP::BinaryStoreDB< K, D >::~BinaryStoreDB ()
virtual void QDP::BinaryStoreDB< K, D >::setCacheSize (const unsigned int size)
virtual void QDP::BinaryStoreDB< K, D >::setCacheSizeMB (const unsigned int size)
virtual void QDP::BinaryStoreDB< K, D >::setPageSize (const unsigned int size)
virtual void QDP::BinaryStoreDB< K, D >::setNumberBuckets (const unsigned int num)
virtual void QDP::BinaryStoreDB< K, D >::enablePageMove (void)
virtual void QDP::BinaryStoreDB< K, D >::disablePageMove (void)
virtual void QDP::BinaryStoreDB< K, D >::setMaxUserInfoLen (unsigned int len)
virtual unsigned int QDP::BinaryStoreDB< K, D >::getMaxUserInfoLen (void) const
virtual void QDP::BinaryStoreDB< K, D >::setMaxNumberConfigs (unsigned int num)
virtual unsigned int QDP::BinaryStoreDB< K, D >::getMaxNumberConfigs (void) const
virtual bool QDP::BinaryStoreDB< K, D >::fileExists (const std::string &file) const
virtual void QDP::BinaryStoreDB< K, D >::open (const std::string &file, int open_flags, int mode)
virtual void QDP::BinaryStoreDB< K, D >::close (void)
bool QDP::BinaryStoreDB< K, D >::exist (const K &key)
void QDP::BinaryStoreDB< K, D >::insert (const K &key, const D &data)
void QDP::BinaryStoreDB< K, D >::insertBinary (const std::string &key, const std::string &data)
int QDP::BinaryStoreDB< K, D >::get (const K &key, D &data)
int QDP::BinaryStoreDB< K, D >::getBinary (const std::string &key, std::string &data)
virtual void QDP::BinaryStoreDB< K, D >::keys (std::vector< K > &keys_)
virtual void QDP::BinaryStoreDB< K, D >::keysAndData (std::vector< K > &keys_, std::vector< D > &values_)
virtual void QDP::BinaryStoreDB< K, D >::binaryKeysAndData (std::vector< std::string > keys_, std::vector< std::string > values_)
virtual void QDP::BinaryStoreDB< K, D >::flush (void)
virtual std::string QDP::BinaryStoreDB< K, D >::storageName (void) const
virtual void QDP::BinaryStoreDB< K, D >::insertUserdata (const std::string &user_data)
virtual void QDP::BinaryStoreDB< K, D >::getUserdata (std::string &user_data)
int QDP::BinaryStoreDB< K, D >::get (K &key, D &data)
int QDP::BinaryStoreDB< K, D >::getBinary (std::string &key, std::string &data)
TextReaderQDP::operator>> (TextReader &txt, std::string &input)
TextReaderQDP::operator>> (TextReader &txt, char &input)
TextReaderQDP::operator>> (TextReader &txt, int &input)
TextReaderQDP::operator>> (TextReader &txt, unsigned int &input)
TextReaderQDP::operator>> (TextReader &txt, short int &input)
TextReaderQDP::operator>> (TextReader &txt, unsigned short int &input)
TextReaderQDP::operator>> (TextReader &txt, long int &input)
TextReaderQDP::operator>> (TextReader &txt, unsigned long int &input)
TextReaderQDP::operator>> (TextReader &txt, long long int &input)
TextReaderQDP::operator>> (TextReader &txt, float &input)
TextReaderQDP::operator>> (TextReader &txt, double &input)
TextReaderQDP::operator>> (TextReader &txt, bool &input)
TextWriterQDP::operator<< (TextWriter &txt, const std::string &output)
TextWriterQDP::operator<< (TextWriter &txt, const char *output)
TextWriterQDP::operator<< (TextWriter &txt, char output)
TextWriterQDP::operator<< (TextWriter &txt, int output)
TextWriterQDP::operator<< (TextWriter &txt, unsigned int output)
TextWriterQDP::operator<< (TextWriter &txt, short int output)
TextWriterQDP::operator<< (TextWriter &txt, unsigned short int output)
TextWriterQDP::operator<< (TextWriter &txt, long int output)
TextWriterQDP::operator<< (TextWriter &txt, unsigned long int output)
TextWriterQDP::operator<< (TextWriter &txt, long long int output)
TextWriterQDP::operator<< (TextWriter &txt, float output)
TextWriterQDP::operator<< (TextWriter &txt, double output)
TextWriterQDP::operator<< (TextWriter &txt, bool output)
void QDP::readDesc (BinaryReader &bin, std::string &input)
void QDP::read (BinaryReader &bin, std::string &input, size_t maxBytes)
void QDP::read (BinaryReader &bin, char &input)
void QDP::read (BinaryReader &bin, int &input)
void QDP::read (BinaryReader &bin, unsigned int &input)
void QDP::read (BinaryReader &bin, short int &input)
void QDP::read (BinaryReader &bin, unsigned short int &input)
void QDP::read (BinaryReader &bin, long int &input)
void QDP::read (BinaryReader &bin, unsigned long int &input)
void QDP::read (BinaryReader &bin, long long int &input)
void QDP::read (BinaryReader &bin, float &input)
void QDP::read (BinaryReader &bin, double &input)
void QDP::read (BinaryReader &bin, bool &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, char &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, int &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, unsigned int &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, short int &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, unsigned short int &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, long int &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, unsigned long int &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, long long int &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, float &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, double &input)
BinaryReaderQDP::operator>> (BinaryReader &bin, bool &input)
void QDP::read (BinaryReader &bin, std::complex< float > &param)
 Complex reader.
void QDP::read (BinaryReader &bin, std::complex< double > &param)
 Complex reader.
template<class T>
void QDP::read (BinaryReader &bin, multi1d< T > &d)
 Read a binary multi1d object.
template<class T>
void QDP::read (BinaryReader &bin, multi1d< T > &d, int num)
 Read a binary multi1d object.
template<class T>
void QDP::read (BinaryReader &bin, multi2d< T > &d, int num1, int num2)
 Read a binary multi2d object.
template<class T>
void QDP::read (BinaryReader &bin, multi2d< T > &d)
 Read a binary multi2d element.
template<class T>
void QDP::read (BinaryReader &bin, multi3d< T > &d)
 Read a binary multi3d element.
template<class T>
void QDP::read (BinaryReader &bin, multi4d< T > &d)
 Read a binary multi4d element.
template<class T>
void QDP::read (BinaryReader &bin, multi5d< T > &d)
 Read a binary multi5d element.
template<class T>
void QDP::read (BinaryReader &bin, multiNd< T > &d)
 Read a binary multiNd element.
template<class T>
void QDP::read (BinaryReader &bin, std::vector< T > &d)
 Read a binary std::vector object.
template<class T>
void QDP::read (BinaryReader &bin, std::list< T > &d)
 Read a binary std::list object.
template<class T>
void QDP::read (BinaryReader &bin, Array1dO< T > &d)
 Read a binary Array1dO object.
template<typename K, typename V>
void QDP::read (BinaryReader &bin, std::map< K, V > &d)
 Read a binary std::map object.
template<typename T1, typename T2>
void QDP::read (BinaryReader &bin, std::pair< T1, T2 > &d)
 Read a binary std::pair object.
void QDP::writeDesc (BinaryWriter &bin, const std::string &output)
void QDP::write (BinaryWriter &bin, const std::string &output)
void QDP::write (BinaryWriter &bin, const char *output)
void QDP::write (BinaryWriter &bin, char output)
void QDP::write (BinaryWriter &bin, int output)
void QDP::write (BinaryWriter &bin, unsigned int output)
void QDP::write (BinaryWriter &bin, short int output)
void QDP::write (BinaryWriter &bin, unsigned short int output)
void QDP::write (BinaryWriter &bin, long int output)
void QDP::write (BinaryWriter &bin, unsigned long int output)
void QDP::write (BinaryWriter &bin, long long int output)
void QDP::write (BinaryWriter &bin, float output)
void QDP::write (BinaryWriter &bin, double output)
void QDP::write (BinaryWriter &bin, bool output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, const std::string &output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, const char *output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, char output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, int output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, unsigned int output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, short int output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, unsigned short int output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, long int output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, unsigned long int output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, long long int output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, float output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, double output)
BinaryWriterQDP::operator<< (BinaryWriter &bin, bool output)
void QDP::write (BinaryWriter &bin, const std::complex< float > &param)
 Complex writer.
void QDP::write (BinaryWriter &bin, const std::complex< double > &param)
 Complex writer.
template<class T>
void QDP::write (BinaryWriter &bin, const multi1d< T > &d)
 Write all of a binary multi1d object.
template<class T>
void QDP::write (BinaryWriter &bin, const multi1d< T > &d, int num)
 Write some or all of a binary multi1d object.
template<class T>
void QDP::write (BinaryWriter &bin, const multi2d< T > &d)
 Write a binary multi2d element.
template<class T>
void QDP::write (BinaryWriter &bin, const multi3d< T > &d)
 Write a binary multi3d element.
template<class T>
void QDP::write (BinaryWriter &bin, const multi4d< T > &d)
 Write a binary multi4d element.
template<class T>
void QDP::write (BinaryWriter &bin, const multi5d< T > &d)
 Write a binary multi5d element.
template<class T>
void QDP::write (BinaryWriter &bin, const multiNd< T > &d)
 Write a binary multiNd element.
template<class T>
void QDP::write (BinaryWriter &bin, const std::vector< T > &d)
 Write all of a binary std::vector object.
template<class T>
void QDP::write (BinaryWriter &bin, const std::list< T > &d)
 Write all of a binary std::list object.
template<class T>
void QDP::write (BinaryWriter &bin, const Array1dO< T > &d)
 Write all of a binary Array object.
template<typename K, typename V>
void QDP::write (BinaryWriter &bin, const std::map< K, V > &d)
 Write all of a binary std::map object.
template<typename T1, typename T2>
void QDP::write (BinaryWriter &bin, const std::pair< T1, T2 > &d)
 Write all of a binary std::pair object.
 QDP::ArchivGauge_t::ArchivGauge_t ()
 Initializes a NERSC Archive header with default values.
void QDP::readArchiv (ArchivGauge_t &header, multi1d< LatticeColorMatrix > &u, const std::string &file)
 Reads a NERSC Gauge Connection Archive format gauge field.
void QDP::readArchiv (XMLReader &xml, multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
 Reads a NERSC Gauge Connection Archive gauge configuration file.
void QDP::readArchiv (multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
 Reads a NERSC Gauge Connection Archive gauge configuration file.
void QDP::writeArchiv (ArchivGauge_t &header, const multi1d< LatticeColorMatrix > &u, const std::string &file)
 Writes a NERSC Gauge Connection Archive gauge configuration file.
void QDP::writeArchiv (XMLBufferWriter &xml, const multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
 Writes a NERSC Gauge Connection Archive gauge configuration file.
void QDP::writeArchiv (const multi1d< LatticeColorMatrix > &u, const std::string &cfg_file)
 Writes a NERSC Gauge Connection Archive gauge configuration file.

Variables

const int QDP::db_cachesize = 50*1024*1024
 Fake cache and page sizes.
const int QDP::db_pagesize = 64*1024

Detailed Description

Forward empty decl.

FileDB support

File input and output operations on QDP types

Function Documentation

◆ ArchivGauge_t()

QDP::ArchivGauge_t::ArchivGauge_t ( )

Initializes a NERSC Archive header with default values.

The defaults are:

  • Two-row matrix storage
  • Floating-point precision is 32 bits
  • Periodic boundary conditions
  • Sequence number 1
  • Ensemble label is "NERSC archive"
  • Creator is "QDP++"
  • Creator hardware is "QDP++"
  • The creation date is obtained from the system clock as the time when this function is called.
  • The archival date is the creation date.
  • The average plaquette and link are 0.
  • The ensemble ID is "X" followed by the creation date.

Definition at line 81 of file qdp_iogauge.cc.

References archive_date, boundary, checksum, creation_date, creator, creator_hardware, ensemble_id, ensemble_label, float_size, gethostname(), QDP::Layout::lattSize(), link, mat_size, QDP::Nc, QDP::Nd, nrow, QDP::QDP_error_exit(), sequence_number, and w_plaq.

◆ binaryKeysAndData()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::binaryKeysAndData ( std::vector< std::string > keys_,
std::vector< std::string > values_ )
inlinevirtual

Return all pairs of keys and data in binary string form

Parameters
keysuser supplied empty vector to hold all keys
datauser supplied empty vector to hold data
Returns
keys and data in the vectors having the same size

Definition at line 366 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ BinaryStoreDB()

template<typename K, typename D>
QDP::BinaryStoreDB< K, D >::BinaryStoreDB ( )
inline

Empty constructor for a DB

Definition at line 44 of file qdp_db_imp.h.

References QDP::db_cachesize, and QDP::Layout::primaryNode().

◆ close()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::close ( void )
inlinevirtual

◆ disablePageMove()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::disablePageMove ( void )
inlinevirtual

Definition at line 134 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ enablePageMove()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::enablePageMove ( void )
inlinevirtual

Set whether to move pages when close to save disk space

This only effective on writable database

Definition at line 128 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ exist()

template<typename K, typename D>
bool QDP::BinaryStoreDB< K, D >::exist ( const K & key)
inline

Does this key exist in the store

Parameters
keya key object
Returns
true if the answer is yes

Definition at line 237 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), and QDP::Layout::primaryNode().

◆ fileExists()

template<typename K, typename D>
virtual bool QDP::BinaryStoreDB< K, D >::fileExists ( const std::string & file) const
inlinevirtual

Check if a DB file exists before opening.

Definition at line 182 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), and QDP::Layout::primaryNode().

◆ flush()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::flush ( void )
inlinevirtual

Flush database in memory to disk

Definition at line 378 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ get() [1/2]

template<typename K, typename D>
int QDP::BinaryStoreDB< K, D >::get ( const K & key,
D & data )
inline

Get data for a given key

Parameters
keyuser supplied key
dataafter the call data will be populated
Returns
0 on success, otherwise the key not found

Definition at line 300 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), and QDP::Layout::primaryNode().

◆ get() [2/2]

template<typename K, typename D>
int QDP::BinaryStoreDB< K, D >::get ( K & key,
D & data )
inline

Get data for a given key

Parameters
keyuser supplied key
dataafter the call data will be populated
Returns
0 on success, otherwise the key not found

Definition at line 286 of file qdp_db_stub.h.

◆ getBinary() [1/2]

template<typename K, typename D>
int QDP::BinaryStoreDB< K, D >::getBinary ( const std::string & key,
std::string & data )
inline

Get data for a given key in binary form

Parameters
keyuser supplied key in string format
dataafter the call data will be populated
Returns
0 on success, otherwise the key not found

Definition at line 320 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), and QDP::Layout::primaryNode().

◆ getBinary() [2/2]

template<typename K, typename D>
int QDP::BinaryStoreDB< K, D >::getBinary ( std::string & key,
std::string & data )
inline

Get data for a given key in binary form

Parameters
keyuser supplied key in string format
dataafter the call data will be populated
Returns
0 on success, otherwise the key not found

Definition at line 295 of file qdp_db_stub.h.

◆ getMaxNumberConfigs()

template<typename K, typename D>
virtual unsigned int QDP::BinaryStoreDB< K, D >::getMaxNumberConfigs ( void ) const
inlinevirtual

Definition at line 168 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), and QDP::Layout::primaryNode().

◆ getMaxUserInfoLen()

template<typename K, typename D>
virtual unsigned int QDP::BinaryStoreDB< K, D >::getMaxUserInfoLen ( void ) const
inlinevirtual

Definition at line 149 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), and QDP::Layout::primaryNode().

◆ getUserdata()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::getUserdata ( std::string & user_data)
inlinevirtual

Get user user data from the metadata database

Parameters
user_datauser supplied buffer to store user data
Returns
returns 0 if success. Otherwise failure.

Definition at line 426 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), QDP::QDPInternal::broadcast_str(), QDP::QDPIO::cerr, QDP::Layout::primaryNode(), and QDP::QDP_abort().

◆ insert()

template<typename K, typename D>
void QDP::BinaryStoreDB< K, D >::insert ( const K & key,
const D & data )
inline

Insert a pair of data and key into the database data is not ensemble, but a vector of complex.

Parameters
keya key
dataa user provided data
Returns
0 on successful write, -1 on failure with proper errno set

Definition at line 257 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), QDP::QDPIO::cerr, QDP::Layout::primaryNode(), and QDP::QDP_abort().

◆ insertBinary()

template<typename K, typename D>
void QDP::BinaryStoreDB< K, D >::insertBinary ( const std::string & key,
const std::string & data )
inline

Insert a pair of data and key into the database in string format

Parameters
keya key
dataa user provided data
Returns
0 on successful write, -1 on failure with proper errno set

Definition at line 279 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), QDP::QDPIO::cerr, QDP::Layout::primaryNode(), and QDP::QDP_abort().

◆ insertUserdata()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::insertUserdata ( const std::string & user_data)
inlinevirtual

Insert user data into the metadata database

Parameters
user_datauser supplied data
Returns
returns 0 if success, else failure

Definition at line 406 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), QDP::QDPIO::cerr, QDP::Layout::primaryNode(), and QDP::QDP_abort().

◆ keys()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::keys ( std::vector< K > & keys_)
inlinevirtual

Return all available keys to user

Parameters
keysuser suppled an empty vector which is populated by keys after this call.

Definition at line 337 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ keysAndData()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::keysAndData ( std::vector< K > & keys_,
std::vector< D > & values_ )
inlinevirtual

Return all pairs of keys and data

Parameters
keysuser supplied empty vector to hold all keys
datauser supplied empty vector to hold data
Returns
keys and data in the vectors having the same size

Definition at line 351 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ open()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::open ( const std::string & file,
int open_flags,
int mode )
inlinevirtual

Open

Parameters
filefilename holding all data and keys
open_flagscan be regular UNIX file open flags such as: O_RDONLY, O_RDWR, O_TRUNC
moderegular unix file mode
Returns
0 on success, -1 on failure with proper errno set

Definition at line 203 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast(), QDP::QDPIO::cerr, QDP::Layout::primaryNode(), and QDP::QDP_abort().

◆ operator<<() [1/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
bool output )

Definition at line 1339 of file qdp_io.cc.

References write().

◆ operator<<() [2/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
char output )

◆ operator<<() [3/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
const char * output )

Definition at line 1279 of file qdp_io.cc.

References write().

◆ operator<<() [4/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
const std::string & output )

Definition at line 1273 of file qdp_io.cc.

References write().

◆ operator<<() [5/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
double output )

Definition at line 1333 of file qdp_io.cc.

References write().

◆ operator<<() [6/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
float output )

Definition at line 1327 of file qdp_io.cc.

References write().

◆ operator<<() [7/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
int output )

Definition at line 1285 of file qdp_io.cc.

References write().

◆ operator<<() [8/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
long int output )

Definition at line 1309 of file qdp_io.cc.

References write().

◆ operator<<() [9/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
long long int output )

Definition at line 1321 of file qdp_io.cc.

References write().

◆ operator<<() [10/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
short int output )

Definition at line 1297 of file qdp_io.cc.

References write().

◆ operator<<() [11/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
unsigned int output )

Definition at line 1291 of file qdp_io.cc.

References write().

◆ operator<<() [12/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
unsigned long int output )

Definition at line 1315 of file qdp_io.cc.

References write().

◆ operator<<() [13/26]

BinaryWriter & QDP::operator<< ( BinaryWriter & bin,
unsigned short int output )

Definition at line 1303 of file qdp_io.cc.

References write().

◆ operator<<() [14/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
bool output )

Definition at line 349 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [15/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
char output )

◆ operator<<() [16/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
const char * output )

Definition at line 289 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [17/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
const std::string & output )

Definition at line 283 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [18/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
double output )

Definition at line 343 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [19/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
float output )

Definition at line 337 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [20/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
int output )

Definition at line 295 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [21/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
long int output )

Definition at line 319 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [22/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
long long int output )

Definition at line 331 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [23/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
short int output )

Definition at line 307 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [24/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
unsigned int output )

Definition at line 301 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [25/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
unsigned long int output )

Definition at line 325 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator<<() [26/26]

TextWriter & QDP::operator<< ( TextWriter & txt,
unsigned short int output )

Definition at line 313 of file qdp_io.cc.

References QDP::TextWriter::write().

◆ operator>>() [1/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
bool & input )

Definition at line 909 of file qdp_io.cc.

References read().

◆ operator>>() [2/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
char & input )

Definition at line 849 of file qdp_io.cc.

References read().

◆ operator>>() [3/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
double & input )

Definition at line 903 of file qdp_io.cc.

References read().

◆ operator>>() [4/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
float & input )

Definition at line 897 of file qdp_io.cc.

References read().

◆ operator>>() [5/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
int & input )

Definition at line 855 of file qdp_io.cc.

References read().

◆ operator>>() [6/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
long int & input )

Definition at line 879 of file qdp_io.cc.

References read().

◆ operator>>() [7/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
long long int & input )

Definition at line 891 of file qdp_io.cc.

References read().

◆ operator>>() [8/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
short int & input )

Definition at line 867 of file qdp_io.cc.

References read().

◆ operator>>() [9/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
unsigned int & input )

Definition at line 861 of file qdp_io.cc.

References read().

◆ operator>>() [10/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
unsigned long int & input )

Definition at line 885 of file qdp_io.cc.

References read().

◆ operator>>() [11/23]

BinaryReader & QDP::operator>> ( BinaryReader & bin,
unsigned short int & input )

Definition at line 873 of file qdp_io.cc.

References read().

◆ operator>>() [12/23]

TextReader & QDP::operator>> ( TextReader & txt,
bool & input )

Definition at line 176 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [13/23]

TextReader & QDP::operator>> ( TextReader & txt,
char & input )

Definition at line 126 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [14/23]

TextReader & QDP::operator>> ( TextReader & txt,
double & input )

Definition at line 171 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [15/23]

TextReader & QDP::operator>> ( TextReader & txt,
float & input )

Definition at line 166 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [16/23]

TextReader & QDP::operator>> ( TextReader & txt,
int & input )

Definition at line 131 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [17/23]

TextReader & QDP::operator>> ( TextReader & txt,
long int & input )

Definition at line 151 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [18/23]

TextReader & QDP::operator>> ( TextReader & txt,
long long int & input )

Definition at line 161 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [19/23]

TextReader & QDP::operator>> ( TextReader & txt,
short int & input )

Definition at line 141 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [20/23]

TextReader & QDP::operator>> ( TextReader & txt,
std::string & input )

Definition at line 121 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [21/23]

TextReader & QDP::operator>> ( TextReader & txt,
unsigned int & input )

Definition at line 136 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [22/23]

TextReader & QDP::operator>> ( TextReader & txt,
unsigned long int & input )

Definition at line 156 of file qdp_io.cc.

References QDP::TextReader::read().

◆ operator>>() [23/23]

TextReader & QDP::operator>> ( TextReader & txt,
unsigned short int & input )

Definition at line 146 of file qdp_io.cc.

References QDP::TextReader::read().

◆ read() [1/27]

template<class T>
void QDP::read ( BinaryReader & bin,
Array1dO< T > & d )
inline

Read a binary Array1dO object.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The ADAT::Array1dO can be resized.

Definition at line 825 of file qdp_io.h.

References read(), QDP::Array1dO< T >::resize(), and QDP::Array1dO< T >::size().

◆ read() [2/27]

void QDP::read ( BinaryReader & bin,
bool & input )

Definition at line 822 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [3/27]

void QDP::read ( BinaryReader & bin,
char & input )

Definition at line 782 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [4/27]

void QDP::read ( BinaryReader & bin,
double & input )

Definition at line 818 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [5/27]

void QDP::read ( BinaryReader & bin,
float & input )

Definition at line 814 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [6/27]

void QDP::read ( BinaryReader & bin,
int & input )

Definition at line 786 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [7/27]

void QDP::read ( BinaryReader & bin,
long int & input )

Definition at line 802 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [8/27]

void QDP::read ( BinaryReader & bin,
long long int & input )

Definition at line 810 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [9/27]

template<class T>
void QDP::read ( BinaryReader & bin,
multi1d< T > & d )
inline

Read a binary multi1d object.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The multi1d can be resized.

Definition at line 530 of file qdp_io.h.

References read(), QDP::multi1d< T >::resize(), and QDP::multi1d< T >::size().

◆ read() [10/27]

template<class T>
void QDP::read ( BinaryReader & bin,
multi1d< T > & d,
int num )
inline

Read a binary multi1d object.

This assumes that the number of elements to be read is not written in the file, i.e. that the data was written with the corresponding write code. The number of elements must therefore be supplied by the caller

Parameters
binThe initialised binary reader
dThe data to be filled.
numThe number of elements.
Precondition
The binary reader must have opened the file.
The multi1d must have space for at least num elements.

Definition at line 555 of file qdp_io.h.

References read().

◆ read() [11/27]

template<class T>
void QDP::read ( BinaryReader & bin,
multi2d< T > & d )
inline

Read a binary multi2d element.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The multi2d can be resized.

Definition at line 598 of file qdp_io.h.

References read(), QDP::multi2d< T >::resize(), QDP::multi2d< T >::size1(), and QDP::multi2d< T >::size2().

◆ read() [12/27]

template<class T>
void QDP::read ( BinaryReader & bin,
multi2d< T > & d,
int num1,
int num2 )
inline

Read a binary multi2d object.

This assumes that the number of elements to be read is not written in the file, i.e. that the data was written with the corresponding write code. The number of elements must therefore be supplied by the caller

Parameters
binThe initialised binary reader
dThe data to be filled.
num1The first dimension of the array
num2The second dimension of the array..
Precondition
The binary reader must have opened the file.
The multi2d must have space for at least num elements.

Definition at line 576 of file qdp_io.h.

References read().

◆ read() [13/27]

template<class T>
void QDP::read ( BinaryReader & bin,
multi3d< T > & d )
inline

Read a binary multi3d element.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The multi2d can be resized.

Definition at line 627 of file qdp_io.h.

References read(), QDP::multi3d< T >::resize(), QDP::multi3d< T >::size1(), QDP::multi3d< T >::size2(), and QDP::multi3d< T >::size3().

◆ read() [14/27]

template<class T>
void QDP::read ( BinaryReader & bin,
multi4d< T > & d )
inline

Read a binary multi4d element.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The multi4d will be resized.

Definition at line 665 of file qdp_io.h.

References read(), QDP::multi4d< T >::resize(), QDP::multi4d< T >::size1(), QDP::multi4d< T >::size2(), QDP::multi4d< T >::size3(), and QDP::multi4d< T >::size4().

◆ read() [15/27]

template<class T>
void QDP::read ( BinaryReader & bin,
multi5d< T > & d )
inline

Read a binary multi5d element.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The multi5d will be resized.

Definition at line 708 of file qdp_io.h.

References read(), QDP::multi5d< T >::resize(), QDP::multi5d< T >::size1(), QDP::multi5d< T >::size2(), QDP::multi5d< T >::size3(), QDP::multi5d< T >::size4(), and QDP::multi5d< T >::size5().

◆ read() [16/27]

template<class T>
void QDP::read ( BinaryReader & bin,
multiNd< T > & d )
inline

Read a binary multiNd element.

Definition at line 746 of file qdp_io.h.

References QDP::multiNd< T >::getElem(), QDP::multiNd< T >::numElem(), read(), and QDP::multiNd< T >::resize().

◆ read() [17/27]

void QDP::read ( BinaryReader & bin,
short int & input )

Definition at line 794 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [18/27]

void QDP::read ( BinaryReader & bin,
std::complex< double > & param )

Complex reader.

Definition at line 839 of file qdp_io.cc.

References read().

◆ read() [19/27]

void QDP::read ( BinaryReader & bin,
std::complex< float > & param )

Complex reader.

Definition at line 828 of file qdp_io.cc.

References read().

◆ read() [20/27]

template<class T>
void QDP::read ( BinaryReader & bin,
std::list< T > & d )
inline

Read a binary std::list object.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The std::list can be resized.

Definition at line 795 of file qdp_io.h.

References read().

◆ read() [21/27]

template<typename K, typename V>
void QDP::read ( BinaryReader & bin,
std::map< K, V > & d )
inline

Read a binary std::map object.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The std::vector can be resized.

Definition at line 849 of file qdp_io.h.

References read().

◆ read() [22/27]

template<typename T1, typename T2>
void QDP::read ( BinaryReader & bin,
std::pair< T1, T2 > & d )
inline

Read a binary std::pair object.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The std::vector can be resized.

Definition at line 882 of file qdp_io.h.

References read().

◆ read() [23/27]

◆ read() [24/27]

template<class T>
void QDP::read ( BinaryReader & bin,
std::vector< T > & d )
inline

Read a binary std::vector object.

This assumes that the number of elements to be read is also written in the file, i.e. that the data was written with the corresponding write code.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.
Postcondition
The std::vector can be resized.

Definition at line 771 of file qdp_io.h.

References read().

◆ read() [25/27]

void QDP::read ( BinaryReader & bin,
unsigned int & input )

Definition at line 790 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [26/27]

void QDP::read ( BinaryReader & bin,
unsigned long int & input )

Definition at line 806 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ read() [27/27]

void QDP::read ( BinaryReader & bin,
unsigned short int & input )

Definition at line 798 of file qdp_io.cc.

References QDP::BinaryReader::read().

◆ readArchiv() [1/4]

void QDP::readArchiv ( ArchivGauge_t & header,
multi1d< LatticeColorMatrix > & u,
const std::string & file )

Reads a NERSC Gauge Connection Archive format gauge field.

The data in the file is assumed to be big-endian. If the host nachine is little-endian, the data is byte-swapped. Based on the header information, the precision of the data can be converted.

Parameters
headerA container for the Gauge Connection header metadata ( Modify )
uThe gauge configuration ( Modify )
fileThe file name ( Read )
Note
This can handle three-row format link matrices if the DATATYPE header token has the value 4D_SU3_GAUGE_3x3 or two-row format matrices if it has the value 4D_SU3_GAUGE

The plaquette, link and checksum values are ignored.

Definition at line 497 of file qdp_iogauge.cc.

References QDP::QDPIO::cerr, QDP::ArchivGauge_t::checksum, QDP::BinaryFileReader::close(), fabs(), QDP::ArchivGauge_t::float_size, QDP::ArchivGauge_t::link, QDP::ArchivGauge_t::mat_size, QDP_abort(), readArchiv(), readArchivHeader(), toBool(), and QDP::ArchivGauge_t::w_plaq.

◆ readArchiv() [2/4]

void QDP::readArchiv ( BinaryReader & cfg_in,
multi1d< LatticeColorMatrix > & u,
n_uint32_t & checksum,
int mat_size,
int float_size )

Read a NERSC Gauge Connection Archive file.

Writes a NERSC Gauge Connection Archive gauge configuration file

An architecture-specific version of this routine is called by the generic readArchiv functions.

The data is written in big-endian IEEE format to the file. If the host nachine is little-endian, the data is byte-swapped.

Parameters
cfg_inA binary reader
uThe gauge configuration
mat_sizeThe number of floating-point numbers per link matrix in the file. This should be 12 to write two-row format or 18 for three-row format.
float_size
checksumThe 32bit parity checksum
Precondition
The binary writer should have already opened the file, and should be pointing to the beginning of the binary data.

Definition at line 1003 of file qdp_parscalar_specific.cc.

References QDP::QDPInternal::broadcast(), QDP::QDPIO::cerr, cmplx(), crtesn(), QDP::OScalar< T >::elem(), QDP::Layout::lattSize(), QDP::Layout::linearSiteIndex(), Nc, Nd, QDP::Layout::nodeNumber(), pokeColor(), QDP::Layout::primaryNode(), QDP_abort(), QDP_error_exit(), QDP::BinaryReader::readArrayPrimaryNode(), QDP::QDPInternal::recvFromWait(), QDP::QDPInternal::route(), QDP::QDPInternal::sendToWait(), QDP::Layout::sitesOnNode(), and QDP::Layout::vol().

Referenced by readArchiv(), readArchiv(), and readArchiv().

◆ readArchiv() [3/4]

void QDP::readArchiv ( multi1d< LatticeColorMatrix > & u,
const std::string & cfg_file )

Reads a NERSC Gauge Connection Archive gauge configuration file.

The data in the file is assumed to be big-endian. If the host nachine is little-endian, the data is byte-swapped.

Parameters
uThe gauge configuration ( Modify )
cfg_fileThe file name ( Read )
Note
This can handle three-row format link matrices if the DATATYPE header token has the value 4D_SU3_GAUGE_3x3 or two-row format matrices if it has the value 4D_SU3_GAUGE

The plaquette, link and checksum values are ignored.

Definition at line 576 of file qdp_iogauge.cc.

References readArchiv().

◆ readArchiv() [4/4]

void QDP::readArchiv ( XMLReader & xml,
multi1d< LatticeColorMatrix > & u,
const std::string & cfg_file )

Reads a NERSC Gauge Connection Archive gauge configuration file.

The data in the file is assumed to be big-endian. If the host nachine is little-endian, the data is byte-swapped. Based on the header information, the precision of the data can be converted.

Parameters
xmlA container for the Gauge Connection header metadata as XML ( Modify )
uThe gauge configuration ( Modify )
cfg_fileThe file name ( Read )
Note
This can handle three-row format link matrices if the DATATYPE header token has the value 4D_SU3_GAUGE_3x3 or two-row format matrices if it has the value 4D_SU3_GAUGE

The plaquette, link and checksum values are ignored.

Definition at line 543 of file qdp_iogauge.cc.

References QDP::QDPIO::cerr, QDP::XMLReader::open(), QDP_abort(), readArchiv(), and write().

◆ readArchivHeader()

void QDP::readArchivHeader ( BinaryReader & cfg_in,
ArchivGauge_t & header )
static

Read a QCD (NERSC) Archive format gauge field header.

Parameters
headerstructure holding config info ( Modify )
cfg_inbinary writer object ( Modify )
Note
This can handle three-row format link matrices if the DATATYPE key has the value 4D_SU3_GAUGE_3x3 or two-row format matrices if it has the value 4D_SU3_GAUGE

The plaquette, link value, and checksum are read and compared against computed values.

Definition at line 212 of file qdp_iogauge.cc.

References QDP::ArchivGauge_t::archive_date, QDP::ArchivGauge_t::boundary, QDP::QDPIO::cerr, QDP::ArchivGauge_t::checksum, QDP::QDPIO::cout, QDP::ArchivGauge_t::creation_date, QDP::ArchivGauge_t::creator, QDP::ArchivGauge_t::creator_hardware, QDP::ArchivGauge_t::ensemble_id, QDP::ArchivGauge_t::ensemble_label, QDP::ArchivGauge_t::float_size, QDP::Layout::lattSize(), QDP::ArchivGauge_t::link, QDP::ArchivGauge_t::mat_size, Nc, Nd, QDP::ArchivGauge_t::nrow, NumSpins< RScalar< T > >::value, QDP_abort(), QDP::BinaryReader::read(), QDP::multi1d< T >::resize(), QDP::ArchivGauge_t::sequence_number, and QDP::ArchivGauge_t::w_plaq.

Referenced by readArchiv().

◆ readDesc()

void QDP::readDesc ( BinaryReader & bin,
std::string & input )

Definition at line 774 of file qdp_io.cc.

References QDP::BinaryReader::readDesc().

Referenced by QDP::MapObjDiskEnv::getMetaData().

◆ setCacheSize()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::setCacheSize ( const unsigned int size)
inlinevirtual

How much data and keys should be kept in memory in bytes

This should be called before the open is called

Parameters
max_cache_sizenumber of bytes of data and keys should be kept in memory

Definition at line 70 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ setCacheSizeMB()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::setCacheSizeMB ( const unsigned int size)
inlinevirtual

How much data and keys should be kept in memory in megabytes

This should be called before the open is called

Parameters
max_cache_sizenumber of bytes of data and keys should be kept in memory

Definition at line 84 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ setMaxNumberConfigs()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::setMaxNumberConfigs ( unsigned int num)
inlinevirtual

Set and get maximum number of configurations

Definition at line 162 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ setMaxUserInfoLen()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::setMaxUserInfoLen ( unsigned int len)
inlinevirtual

Set and get maximum user information length

Definition at line 143 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ setNumberBuckets()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::setNumberBuckets ( const unsigned int num)
inlinevirtual

Set initial number of buckets

This should be called before the open is called

Parameters
numthe number of buckets should be used

Definition at line 115 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ setPageSize()

template<typename K, typename D>
virtual void QDP::BinaryStoreDB< K, D >::setPageSize ( const unsigned int size)
inlinevirtual

Page size used when a new data based is created This only effects a new database

Parameters
pagesizethe pagesize used in hash database. This value should be power of 2. The minimum value is 512 and maximum value is 262144

Definition at line 100 of file qdp_db_imp.h.

References QDP::Layout::primaryNode().

◆ storageName()

template<typename K, typename D>
virtual std::string QDP::BinaryStoreDB< K, D >::storageName ( void ) const
inlinevirtual

Name of database associated with this Data store

Returns
database name

Definition at line 389 of file qdp_db_imp.h.

References QDP::QDPInternal::broadcast_str(), and QDP::Layout::primaryNode().

◆ write() [1/27]

void QDP::write ( BinaryWriter & bin,
bool output )

Definition at line 1252 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [2/27]

void QDP::write ( BinaryWriter & bin,
char output )

Definition at line 1212 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [3/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const Array1dO< T > & d )
inline

Write all of a binary Array object.

This also writes the number of elements to the file.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.

Definition at line 1326 of file qdp_io.h.

References QDP::Array1dO< T >::size(), and write().

◆ write() [4/27]

void QDP::write ( BinaryWriter & bin,
const char * output )

Definition at line 1208 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [5/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const multi1d< T > & d )
inline

Write all of a binary multi1d object.

This also writes the number of elements to the file.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.

Definition at line 1169 of file qdp_io.h.

References QDP::multi1d< T >::size(), and write().

◆ write() [6/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const multi1d< T > & d,
int num )
inline

Write some or all of a binary multi1d object.

This does not write the number of elements to the file.

Parameters
binThe initialised binary writer
dThe data to be filled.
numThe number of elements to write.
Precondition
The binary writer must have opened the file.

Definition at line 1187 of file qdp_io.h.

References write().

◆ write() [7/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const multi2d< T > & d )
inline

Write a binary multi2d element.

Definition at line 1197 of file qdp_io.h.

References QDP::multi2d< T >::size1(), QDP::multi2d< T >::size2(), and write().

◆ write() [8/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const multi3d< T > & d )
inline

Write a binary multi3d element.

Definition at line 1215 of file qdp_io.h.

References QDP::multi3d< T >::size1(), QDP::multi3d< T >::size2(), QDP::multi3d< T >::size3(), and write().

◆ write() [9/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const multi4d< T > & d )
inline

◆ write() [10/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const multi5d< T > & d )
inline

◆ write() [11/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const multiNd< T > & d )
inline

Write a binary multiNd element.

Definition at line 1269 of file qdp_io.h.

References QDP::multiNd< T >::getElem(), QDP::multiNd< T >::numElem(), QDP::multiNd< T >::size(), and write().

◆ write() [12/27]

void QDP::write ( BinaryWriter & bin,
const std::complex< double > & param )

Complex writer.

Definition at line 1265 of file qdp_io.cc.

References write().

◆ write() [13/27]

void QDP::write ( BinaryWriter & bin,
const std::complex< float > & param )

Complex writer.

Definition at line 1258 of file qdp_io.cc.

References write().

◆ write() [14/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const std::list< T > & d )
inline

Write all of a binary std::list object.

This also writes the number of elements to the file.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.

Definition at line 1307 of file qdp_io.h.

References write().

◆ write() [15/27]

template<typename K, typename V>
void QDP::write ( BinaryWriter & bin,
const std::map< K, V > & d )
inline

Write all of a binary std::map object.

This also writes the number of elements to the file.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.

Definition at line 1345 of file qdp_io.h.

References write().

◆ write() [16/27]

template<typename T1, typename T2>
void QDP::write ( BinaryWriter & bin,
const std::pair< T1, T2 > & d )
inline

Write all of a binary std::pair object.

This also writes the number of elements to the file.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.

Definition at line 1370 of file qdp_io.h.

References write().

◆ write() [17/27]

◆ write() [18/27]

template<class T>
void QDP::write ( BinaryWriter & bin,
const std::vector< T > & d )
inline

Write all of a binary std::vector object.

This also writes the number of elements to the file.

Parameters
binThe initialised binary reader
dThe data to be filled.
Precondition
The binary reader must have opened the file.

Definition at line 1288 of file qdp_io.h.

References write().

◆ write() [19/27]

void QDP::write ( BinaryWriter & bin,
double output )

Definition at line 1248 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [20/27]

void QDP::write ( BinaryWriter & bin,
float output )

Definition at line 1244 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [21/27]

void QDP::write ( BinaryWriter & bin,
int output )

Definition at line 1216 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [22/27]

void QDP::write ( BinaryWriter & bin,
long int output )

Definition at line 1232 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [23/27]

void QDP::write ( BinaryWriter & bin,
long long int output )

Definition at line 1240 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [24/27]

void QDP::write ( BinaryWriter & bin,
short int output )

Definition at line 1224 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [25/27]

void QDP::write ( BinaryWriter & bin,
unsigned int output )

Definition at line 1220 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [26/27]

void QDP::write ( BinaryWriter & bin,
unsigned long int output )

Definition at line 1236 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ write() [27/27]

void QDP::write ( BinaryWriter & bin,
unsigned short int output )

Definition at line 1228 of file qdp_io.cc.

References QDP::BinaryWriter::write().

◆ writeArchiv() [1/4]

void QDP::writeArchiv ( ArchivGauge_t & header,
const multi1d< LatticeColorMatrix > & u,
const std::string & file )

Writes a NERSC Gauge Connection Archive gauge configuration file.

The data is written in 32-bit big-endian IEEE format to the file. If the host nachine is little-endian, the data is byte-swapped.

Parameters
headerA container for the Gauge Connection header metadata
uThe gauge configuration
fileThe file name
Precondition
The information in the header should be filled in.
Note
The value 0 is written as checksum.

Definition at line 691 of file qdp_iogauge.cc.

References QDP::ArchivGauge_t::checksum, QDP::BinaryFileWriter::close(), computeChecksum(), QDP::ArchivGauge_t::link, QDP::ArchivGauge_t::mat_size, QDP::ArchivGauge_t::w_plaq, writeArchiv(), and writeArchivHeader().

◆ writeArchiv() [2/4]

void QDP::writeArchiv ( BinaryWriter & cfg_out,
const multi1d< LatticeColorMatrix > & u,
int mat_size )

Writes a NERSC Gauge Connection Archive gauge configuration file.

An architecture-specific version of this routine is called by the generic readArchiv functions.

The data is written in big-endian IEEE format to the file. If the host nachine is little-endian, the data is byte-swapped.

Parameters
cfg_outA binary writer
uThe gauge configuration
mat_sizeThe number of floating-point numbers per link matrix to write. This should be 12 to write two-row format or 18 for three-row format.
Precondition
The binary writer should have already opened the file.

Definition at line 1142 of file qdp_parscalar_specific.cc.

References all, QDP::QDPIO::cerr, crtesn(), QDP::BinaryWriter::fail(), imag(), QDP::Layout::lattSize(), QDP::Layout::linearSiteIndex(), Nc, Nd, QDP::Layout::nodeNumber(), peekColor(), QDP::Layout::primaryNode(), QDP_abort(), QDP_error_exit(), real(), QDP::QDPInternal::recvFromWait(), QDP::multi1d< T >::resize(), QDP::QDPInternal::route(), QDP::QDPInternal::sendToWait(), QDP::Layout::sitesOnNode(), toFloat(), QDP::Layout::vol(), and QDP::BinaryWriter::writeArrayPrimaryNode().

Referenced by writeArchiv(), writeArchiv(), and writeArchiv().

◆ writeArchiv() [3/4]

void QDP::writeArchiv ( const multi1d< LatticeColorMatrix > & u,
const std::string & cfg_file )

Writes a NERSC Gauge Connection Archive gauge configuration file.

The data is written in 32-bit big-endian IEEE format to the file. If the host nachine is little-endian, the data is byte-swapped.

Parameters
uThe gauge configuration
cfg_fileThe file name
Note
Since no header information is supplied, the default ArchivGauge_t values are used.

Definition at line 742 of file qdp_iogauge.cc.

References writeArchiv().

◆ writeArchiv() [4/4]

void QDP::writeArchiv ( XMLBufferWriter & xml,
const multi1d< LatticeColorMatrix > & u,
const std::string & cfg_file )

Writes a NERSC Gauge Connection Archive gauge configuration file.

The data is written in 32-bit big-endian IEEE format to the file. If the host nachine is little-endian, the data is byte-swapped.

Parameters
headerA container for the Gauge Connection header metadata as XML
uThe gauge configuration
cfg_fileThe file name
Precondition
The information in the header should be filled in.
Note
The value 0 is written as checksum.
The token FLOATING_POINT is always given the value IEEE32BIG

Definition at line 717 of file qdp_iogauge.cc.

References QDP::ArchivGauge_t::checksum, computeChecksum(), QDP::ArchivGauge_t::link, QDP::ArchivGauge_t::mat_size, read(), QDP::ArchivGauge_t::w_plaq, and writeArchiv().

◆ writeArchivHeader()

void QDP::writeArchivHeader ( BinaryWriter & cfg_out,
const ArchivGauge_t & header )
static

Write a QCD (NERSC) Archive format gauge field.

Parameters
headerstructure holding config info ( Read )
cfg_outbinary writer object ( Modify )
Precondition
The information in the header should be filled in.
Note
The value 0 is written as checksum.
The token FLOATING_POINT is always given the value IEEE32BIG

Definition at line 599 of file qdp_iogauge.cc.

References QDP::ArchivGauge_t::archive_date, QDP::ArchivGauge_t::boundary, QDP::QDPIO::cerr, QDP::ArchivGauge_t::checksum, QDP::ArchivGauge_t::creation_date, QDP::ArchivGauge_t::creator, QDP::ArchivGauge_t::creator_hardware, QDP::ArchivGauge_t::ensemble_id, QDP::ArchivGauge_t::ensemble_label, QDP::Layout::lattSize(), QDP::ArchivGauge_t::link, Nc, Nd, QDP_abort(), QDP::ArchivGauge_t::sequence_number, QDP::ArchivGauge_t::w_plaq, and QDP::BinaryWriter::writeArray().

Referenced by writeArchiv().

◆ writeDesc()

void QDP::writeDesc ( BinaryWriter & bin,
const std::string & output )

Definition at line 1200 of file qdp_io.cc.

References QDP::BinaryWriter::writeDesc().

◆ ~BinaryStoreDB()

template<typename K, typename D>
QDP::BinaryStoreDB< K, D >::~BinaryStoreDB ( )
inline

Destroy the object

Definition at line 58 of file qdp_db_imp.h.

References close().

Variable Documentation

◆ db_cachesize

const int QDP::db_cachesize = 50*1024*1024

Fake cache and page sizes.

Database cache size in bytes

Definition at line 24 of file qdp_db_imp.h.

Referenced by QDP::BinaryStoreDB< K, D >::BinaryStoreDB().

◆ db_pagesize

const int QDP::db_pagesize = 64*1024

Database page size in bytes

Definition at line 29 of file qdp_db_imp.h.