MPQC
3.0.0-alpha
|
Array-like collection of data. More...
#include <mpqc/file.hpp>
Public Member Functions | |
template<typename Extents > | |
Dataset (const Object &parent, const std::string &name, const Extents &extents, const File::Properties &dcpl=File::Properties(H5P_DATASET_CREATE)) | |
Create dataset belonging to some file object. More... | |
size_t | rank () const |
Dataspace rank (number of dimensions) | |
std::vector< range > | extents () const |
void | write (const T *buffer) |
Writes contiguous buffer into dataset. More... | |
void | read (T *buffer) const |
Reads contiguous buffer from dataset. More... | |
Dataspace< T > | operator[] (size_t index) |
Access dataspace of rank-1. | |
Dataspace< T > | operator() (const std::vector< range > &r) |
Access dataspace of same rank. | |
Dataspace< const T > | operator() (const std::vector< range > &r) const |
Access dataspace of same rank. | |
template<class R , ... > | |
Dataspace< T > | operator() (const R &r,...) |
N-ary sub-dataspace access operators. More... | |
Public Member Functions inherited from mpqc::detail::File::Object | |
Object () | |
Default constructor with an invalid handle. | |
Object (const Object &o) | |
Copy constructor. | |
Object (const Object &parent, hid_t id, void(*close)(hid_t), bool increment) | |
void | operator= (const Object &o) |
hid_t | id () const |
const Object & | parent () const |
hid_t | file () const |
operator bool () const | |
Static Public Member Functions | |
template<typename Extents > | |
static Object | create (const Object &parent, const std::string &name, const Extents &extents, const Properties &dcpl) |
Static Public Member Functions inherited from mpqc::detail::File::Object | |
static std::string | filename (hid_t id) |
Static Protected Member Functions | |
static range | extent (const range &r) |
Return range as is. | |
template<typename E > | |
static range | extent (const E &e) |
Return integral argument e as range(0,e) | |
Additional Inherited Members | |
Protected Member Functions inherited from mpqc::detail::File::Object | |
template<class F > | |
void | update (hid_t id, F close, bool increment) |
Protected Attributes inherited from mpqc::detail::File::Object | |
std::auto_ptr< Object > | parent_ |
hid_t | id_ |
void(* | close_ )(hid_t) |
Array-like collection of data.
|
inline |
Dataspace<T> mpqc::File::Dataset< T >::operator() | ( | const R & | r, |
... | |||
) |
N-ary sub-dataspace access operators.
The parameters R should be either integral types (a single element) or of type mpqc::range (a range of elements) The method packs arguments into std::vector<range>
and calls the equivalent operator.
|
inline |
Reads contiguous buffer from dataset.
The size of buffer must be the same as size of dataset This function is threadsafe
Referenced by mpqc::operator>>().
|
inline |
Writes contiguous buffer into dataset.
The size of buffer must be the same as size of dataset This function is threadsafe
Referenced by mpqc::operator<<().