iterative-solver 0.0
molpro::linalg::array::DistrArrayDisk::LocalBufferDisk Class Reference

#include <DistrArrayDisk.h>

Inheritance diagram for molpro::linalg::array::DistrArrayDisk::LocalBufferDisk:
Collaboration diagram for molpro::linalg::array::DistrArrayDisk::LocalBufferDisk:

Detailed Description

Reads the whole local buffer from disk into memory. By default the buffer is written to disk on destruction, unless do_dump is false.

Public Member Functions

 LocalBufferDisk (DistrArrayDisk &source)
 
 LocalBufferDisk (DistrArrayDisk &source, const span::Span< value_type > &buffer)
 
 ~LocalBufferDisk () override
 
- Public Member Functions inherited from molpro::linalg::array::DistrArray::LocalBuffer
virtual ~LocalBuffer ()=default
 
bool compatible (const LocalBuffer &other) const
 Checks that the current and the other buffers correspond to the same section of their respective arrays. More...
 
size_type start () const
 Return index to the start of the local buffer section in the distributed array. More...
 
- Public Member Functions inherited from molpro::linalg::array::span::Span< value_type >
 Span ()=default
 
 Span (value_type *data, size_type size)
 
 Span (const Span &source)=default
 
 Span (Span< value_type > &&source) noexcept
 
 ~Span ()=default
 
Spanoperator= (const Span &source)=default
 
Spanoperator= (Span &&source) noexcept
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
iterator data ()
 
const_iterator data () const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 
size_type size () const
 
bool empty () const
 
 Span ()=default
 
 Span (value_type *data, size_type size)
 
 Span (const Span &source)=default
 
 Span (Span< value_type > &&source) noexcept
 
 ~Span ()=default
 
Spanoperator= (const Span &source)=default
 
Spanoperator= (Span &&source) noexcept
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
iterator data ()
 
const_iterator data () const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 
size_type size () const
 
bool empty () const
 

Public Attributes

bool do_dump = true
 If true, than buffer is dumped to file on destruction. More...
 

Protected Attributes

std::vector< value_typem_snapshot_buffer
 when external buffer is not provided More...
 
DistrArrayDiskm_source
 keep a handle on source to dump data to disk More...
 
- Protected Attributes inherited from molpro::linalg::array::DistrArray::LocalBuffer
size_type m_start = 0
 index of first element of local buffer in the array More...
 
- Protected Attributes inherited from molpro::linalg::array::span::Span< value_type >
iterator m_buffer
 
size_type m_size
 
iterator m_buffer
 
size_type m_size
 

Additional Inherited Members

- Public Types inherited from molpro::linalg::array::span::Span< value_type >
using element_type = value_type
 
using value_type = std::remove_cv_t< value_type >
 
using reference = value_type &
 
using const_reference = value_type &
 
using size_type = size_t
 
using difference_type = std::ptrdiff_t
 
using iterator = value_type *
 
using const_iterator = value_type const *
 
using element_type = value_type
 
using value_type = std::remove_cv_t< value_type >
 
using reference = value_type &
 
using const_reference = value_type &
 
using size_type = size_t
 
using difference_type = std::ptrdiff_t
 
using iterator = value_type *
 
using const_iterator = value_type const *
 

Constructor & Destructor Documentation

◆ LocalBufferDisk() [1/2]

molpro::linalg::array::DistrArrayDisk::LocalBufferDisk::LocalBufferDisk ( DistrArrayDisk source)
explicit

◆ LocalBufferDisk() [2/2]

molpro::linalg::array::DistrArrayDisk::LocalBufferDisk::LocalBufferDisk ( DistrArrayDisk source,
const span::Span< value_type > &  buffer 
)
explicit

◆ ~LocalBufferDisk()

molpro::linalg::array::DistrArrayDisk::LocalBufferDisk::~LocalBufferDisk ( )
override

Member Data Documentation

◆ do_dump

bool molpro::linalg::array::DistrArrayDisk::LocalBufferDisk::do_dump = true

If true, than buffer is dumped to file on destruction.

◆ m_snapshot_buffer

std::vector<value_type> molpro::linalg::array::DistrArrayDisk::LocalBufferDisk::m_snapshot_buffer
protected

when external buffer is not provided

◆ m_source

DistrArrayDisk& molpro::linalg::array::DistrArrayDisk::LocalBufferDisk::m_source
protected

keep a handle on source to dump data to disk