MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
mpqc::File::Dataspace< T_ > Struct Template Reference

A subset of File::Dataset. More...

#include <mpqc/file.hpp>

Public Types

typedef boost::remove_const< T_ >::type T
 

Public Member Functions

size_t size () const
 Number of elements in the set.
 
const std::vector< range > & extents () const
 The extents of the set in terms of ranges.
 
Dataspace< T > operator[] (size_t i)
 Access sub-dataspace of rank-1.
 
Dataspace< T > operator() (const std::vector< range > &r)
 Access sub-dataspace of the same rank.
 
template<class R , ... >
Dataspace< T > operator() (const R &r,...)
 N-ary sub-dataspace access operators.
 
void write (const T *buffer)
 Writes contiguous buffer into dataset.
 
void read (T *buffer) const
 Reads contiguous buffer from dataset.
 

Friends

class Dataset< T >
 

Detailed Description

template<typename T_>
struct mpqc::File::Dataspace< T_ >

A subset of File::Dataset.

Todo
Fix const version

Member Function Documentation

◆ operator()()

template<typename T_ >
template<class R , ... >
Dataspace< T > mpqc::File::Dataspace< 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.

◆ read()

template<typename T_ >
void mpqc::File::Dataspace< T_ >::read ( T * buffer) const
inline

Reads contiguous buffer from dataset.

The size of buffer must be the same as size of dataspace This function is threadsafe

Referenced by mpqc::operator>>().

◆ write()

template<typename T_ >
void mpqc::File::Dataspace< T_ >::write ( const T * buffer)
inline

Writes contiguous buffer into dataset.

The size of buffer must be the same as size of dataspace This function is threadsafe

Referenced by mpqc::operator<<().


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

Generated at Wed Sep 25 2024 02:45:31 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.