1 #ifndef MPQC_ARRAY_FILE_HPP
2 #define MPQC_ARRAY_FILE_HPP
4 #include "mpqc/range.hpp"
5 #include "mpqc/array/forward.hpp"
6 #include "mpqc/file.hpp"
19 template<
typename Extent>
21 const std::vector<Extent> &extents)
30 void _put(
const std::vector<range> &r,
const void *buffer) {
32 (*data_)(r).
write((
const T*)buffer);
34 void _get(
const std::vector<range> &r,
void *buffer)
const {
36 (*data_)(r).
read((T*)buffer);
39 std::auto_ptr< mpqc::File::Dataset<T> > data_;
42 #ifdef H5_HAVE_PARALLEL
43 #if 0 // TODO Andrey, do we need this?
49 const std::vector<size_t> &dims,
53 File file = (comm == MPI_COMM_NULL) ?
55 File(name +
".h5", File::Driver::MPIIO(comm));
58 void put(
const std::vector<range> &r,
const void *buffer) {
59 dataset_(r).put((
const void*)buffer);
61 void get(
const std::vector<range> &r,
void *buffer)
const {
62 dataset_(r).get((
void*)buffer);
65 File::Dataset<T> dataset_;
68 #endif // H5_HAVE_PARALLEL
76 static const detail::array_file_driver ARRAY_FILE;
Definition: forward.hpp:18
Contains new MPQC code since version 3.
Definition: integralenginepool.hpp:37
Top-level file object that holds groups.
Definition: file.hpp:196
Array-like collection of data.
Definition: file.hpp:205
void write(ci::Vector &V, File::Dataspace< double > F, const std::vector< mpqc::range > &local)
write local segments of V to F
Definition: direct.hpp:41
void read(ci::Vector &V, File::Dataspace< double > F, const std::vector< mpqc::range > &local)
read local segments into V from F
Definition: direct.hpp:25
Definition: forward.hpp:21
Definition: forward.hpp:23
Generated at Sun Jan 26 2020 23:24:01 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.