Chombo + EB + MF  3.2
HDF5Portable.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _HDF5PORTABLE_H_
12 #define _HDF5PORTABLE_H_
13 
14 #include "Vector.H"
15 extern "C"
16 {
17 #ifdef CH_USE_HDF5
18 #include <hdf5.h>
19 #else
20  typedef long hid_t;
21 #endif
22 }
23 
24 #include "Box.H"
25 #include "Interval.H"
26 #include "NamespaceHeader.H"
27 
28 template <class T> void dataTypes(Vector<hid_t>& a_types,
29  const T& a_dummySpecializationArg);
30 
31 template <class T> void dataSize(const T& a_item,
32  Vector<int>& a_sizes,
33  const Box& a_box,
34  const Interval& a_comps);
35 
36 template <class T> void write(const T& a_item,
37  Vector<void*>& a_allocatedBuffers,
38  const Box& a_box,
39  const Interval& a_comps);
40 
41 template <class T> void read(T& a_item,
42  Vector<void*>& a_allocatedBuffers,
43  const Box& a_box,
44  const Interval& a_comps);
45 
46 template <class T> const char* name(const T& a_dummySpecializationArg);
47 
48 // These are the default template declarations for the HDF5 I/O
49 // template functions needed by T objects for binary IO. The default
50 // implementations use the linearOut/linearIn/size functions of the
51 // T template classes to provide non-portable binary IO.
52 //
53 // A user can add their own template specializations for
54 // portable binary IO abilities.
55 //
56 // To use this header, a user includes this file first, then
57 // declares their template specializations, then includes the CH_HDF5.H
58 // header file.
59 //
60 // http://hdf.ncsa.uiuc.edu/HDF5/
61 //
62 // available datatypes in HDF5
63 //
64 // Example
65 // Corresponding C Type
66 // H5T_NATIVE_CHAR
67 // char
68 // H5T_NATIVE_UCHAR
69 // unsigned char
70 // H5T_NATIVE_SHORT
71 // short
72 // H5T_NATIVE_USHORT
73 // unsigned short
74 // H5T_NATIVE_INT
75 // int
76 // H5T_NATIVE_UINT
77 // unsigned
78 // H5T_NATIVE_LONG
79 // long
80 // H5T_NATIVE_ULONG
81 // unsigned long
82 // H5T_NATIVE_FLOAT
83 // float
84 // H5T_NATIVE_DOUBLE
85 // double
86 //
87 // and some special ones defined for Chombo:
88 //
89 // H5T_NATIVE_REAL Real
90 //
91 // box_id Box
92 //
93 // intvect_id IntVect
94 
95 #include "NamespaceFooter.H"
96 #endif
void write(const T &a_item, Vector< void *> &a_allocatedBuffers, const Box &a_box, const Interval &a_comps)
Definition: CH_HDF5.H:951
const char * name(const T &a_dummySpecializationArg)
Definition: CH_HDF5.H:965
void read(T &a_item, Vector< void *> &a_allocatedBuffers, const Box &a_box, const Interval &a_comps)
Definition: CH_HDF5.H:958
void dataSize(const T &a_item, Vector< int > &a_sizes, const Box &a_box, const Interval &a_comps)
Definition: CH_HDF5.H:944
Structure for passing component ranges in code.
Definition: Interval.H:23
void dataTypes(Vector< hid_t > &a_types, const T &a_dummySpecializationArg)
Definition: CH_HDF5.H:937
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469