MPQC  3.0.0-alpha
mpqc::Array< T > Struct Template Reference

Array implementation. More...

#include <mpqc/array.hpp>

Public Member Functions

 Array ()
 Create new empty array.
 
template<typename Extent >
 Array (const std::string &name, const std::vector< Extent > &extents, MPI::Comm comm=MPI::Comm::Self())
 Create new array using CORE driver (in-memory)
 
template<typename Extent , class Driver >
 Array (const std::string &name, const std::vector< Extent > &extents, Driver driver, MPI::Comm comm=MPI::Comm(MPI::Comm::Self()))
 Create new array using an arbitrary driver.
 
 Array (const Array &a)
 Shallow copy constructor. More...
 
void put (const T *buffer)
 Put buffer data into array. More...
 
void get (T *buffer) const
 Get array data into buffer. More...
 
void sync ()
 
const std::vector< size_t > & dims () const
 
size_t rank () const
 
 operator vector< T > () const
 
 operator matrix< T > () const
 
Array operator() (const std::vector< range > &r)
 
Array operator() (const std::vector< range > &r) const
 
template<class R , ... >
Array operator() (const R &r,...)
 N-ary sub-array access operators. More...
 

Protected Member Functions

template<class Extent , class Driver >
void initialize (const std::string &name, const std::vector< Extent > &extents, Driver driver, MPI::Comm comm)
 
 Array (const Array &A, const std::vector< range > &r)
 
size_t block () const
 

Detailed Description

template<typename T>
struct mpqc::Array< T >

Array implementation.

Array can either be serial or parallel and reside in memory or filesystem.

Constructor & Destructor Documentation

◆ Array()

template<typename T>
mpqc::Array< T >::Array ( const Array< T > &  a)
inline

Shallow copy constructor.

Warning
Shallow copy

Member Function Documentation

◆ get()

template<typename T>
void mpqc::Array< T >::get ( T *  buffer) const
inline

Get array data into buffer.

Warning
buffer must be contiguous

◆ operator()()

template<typename T>
template<class R , ... >
Array mpqc::Array< T >::operator() ( const R &  r,
  ... 
)

N-ary sub-array 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.

◆ put()

template<typename T>
void mpqc::Array< T >::put ( const T *  buffer)
inline

Put buffer data into array.

Warning
buffer must be contigous

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

Generated at Sun Jan 26 2020 23:24:02 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.