H5FileDriver_misc.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c), 2017-2018, Adrien Devresse <adrien.devresse@epfl.ch>
3  * Juan Hernando <juan.hernando@epfl.ch>
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE_1_0.txt or copy at
7  * http://www.boost.org/LICENSE_1_0.txt)
8  *
9  */
10 #ifndef H5FILEDRIVER_MISC_HPP
11 #define H5FILEDRIVER_MISC_HPP
12 
13 #include "../H5FileDriver.hpp"
14 
15 #include <H5Ppublic.h>
16 
17 #ifdef H5_HAVE_PARALLEL
18 #include <H5FDmpi.h>
19 #endif
20 
21 namespace HighFive {
22 
23 namespace {
24 
25 template <typename Comm, typename Info>
26 class MPIOFileAccess
27 {
28 public:
29  MPIOFileAccess(Comm comm, Info info)
30  : _comm(comm)
31  , _info(info)
32  {}
33 
34  void apply(const hid_t list) const {
35  if (H5Pset_fapl_mpio(list, _comm, _info) < 0) {
36  HDF5ErrMapper::ToException<FileException>(
37  "Unable to setup MPIO Driver configuration");
38  }
39  }
40 private:
41  Comm _comm;
42  Info _info;
43 };
44 
45 // depecrated, use Properties(Properties::FILE_ACCESS) instead
46 class DefaultFileDriver : public FileDriver {
47 };
48 }
49 
50 // file access property
51 inline FileDriver::FileDriver() : Properties(FILE_ACCESS) {}
52 
53 template <typename Comm, typename Info>
54 inline MPIOFileDriver::MPIOFileDriver(Comm comm, Info info) {
55  add(MPIOFileAccess<Comm, Info>(comm, info));
56 }
57 }
58 
59 #endif // H5FILEDRIVER_MISC_HPP
HighFive::MPIOFileDriver::MPIOFileDriver
MPIOFileDriver(Comm mpi_comm, Info mpi_info)
Definition: H5FileDriver_misc.hpp:54
_comm
Comm _comm
Definition: H5FileDriver_misc.hpp:41
HighFive::Properties::add
void add(const Property &property)
Definition: H5PropertyList_misc.hpp:51
_info
Info _info
Definition: H5FileDriver_misc.hpp:42
HighFive::FileDriver::FileDriver
FileDriver()
Definition: H5FileDriver_misc.hpp:51
HighFive::Properties
Generic HDF5 property List.
Definition: H5PropertyList.hpp:21
HighFive
Definition: H5Annotate_traits.hpp:14


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23