QMCPACK
h5data_proxy< accumulator_set< T > > Struct Template Reference
+ Inheritance diagram for h5data_proxy< accumulator_set< T > >:
+ Collaboration diagram for h5data_proxy< accumulator_set< T > >:

Public Types

enum  { CAPACITY = accumulator_set<T>::CAPACITY }
 
using data_type = accumulator_set< T >
 

Public Member Functions

 h5data_proxy (const data_type &a)
 
bool read (data_type &ref, hid_t grp, const std::string &aname, hid_t xfer_plist=H5P_DEFAULT)
 
bool write (const data_type &ref, hid_t grp, const std::string &aname, hid_t xfer_plist=H5P_DEFAULT) const
 

Additional Inherited Members

- Static Public Member Functions inherited from h5_space_type< T, 1 >
static constexpr int added_rank ()
 new rank added due to T More...
 
static auto get_address (T *a)
 return the address More...
 
static auto get_address (const T *a)
 
- Public Attributes inherited from h5_space_type< T, 1 >
hsize_t dims [RANK > 0 ? RANK :1]
 shape of the dataspace, protected for zero size array, hdf5 support scalar as rank = 0 More...
 
- Static Public Attributes inherited from h5_space_type< T, 1 >
static constexpr hsize_t rank
 rank of the multidimensional dataspace More...
 

Detailed Description

template<typename T>
struct qmcplusplus::h5data_proxy< accumulator_set< T > >

Definition at line 53 of file BranchIO.cpp.

Member Typedef Documentation

◆ data_type

Definition at line 61 of file BranchIO.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CAPACITY 

Definition at line 55 of file BranchIO.cpp.

Constructor & Destructor Documentation

◆ h5data_proxy()

h5data_proxy ( const data_type a)
inline

Definition at line 63 of file BranchIO.cpp.

References h5_space_type< T, 0 >::dims.

63 { dims[0] = CAPACITY; }
hsize_t dims[RANK > 0 ? RANK :1]
shape of the dataspace, protected for zero size array, hdf5 support scalar as rank = 0 ...
Definition: hdf_dataspace.h:47

Member Function Documentation

◆ read()

bool read ( data_type ref,
hid_t  grp,
const std::string &  aname,
hid_t  xfer_plist = H5P_DEFAULT 
)
inline

Definition at line 65 of file BranchIO.cpp.

References h5_space_type< T, 0 >::get_address(), qmcplusplus::h5d_read(), and accumulator_set< T, typename >::properties.

66  {
67  return h5d_read(grp, aname, get_address(ref.properties), xfer_plist);
68  }
static auto get_address(T *a)
return the address
Definition: hdf_dataspace.h:53
bool h5d_read(hid_t grp, const std::string &aname, T *first, hid_t xfer_plist)
return true, if successful

◆ write()

bool write ( const data_type ref,
hid_t  grp,
const std::string &  aname,
hid_t  xfer_plist = H5P_DEFAULT 
) const
inline

Definition at line 70 of file BranchIO.cpp.

References h5_space_type< T, 0 >::dims, h5_space_type< T, 0 >::get_address(), qmcplusplus::h5d_write(), and accumulator_set< T, typename >::properties.

71  {
72  return h5d_write(grp, aname.c_str(), this->size(), dims, get_address(ref.properties), xfer_plist);
73  }
hsize_t dims[RANK > 0 ? RANK :1]
shape of the dataspace, protected for zero size array, hdf5 support scalar as rank = 0 ...
Definition: hdf_dataspace.h:47
static auto get_address(T *a)
return the address
Definition: hdf_dataspace.h:53
bool h5d_write(hid_t grp, const std::string &aname, hsize_t ndims, const hsize_t *dims, const T *first, hid_t xfer_plist)

The documentation for this struct was generated from the following file: