sisi4s
Loading...
Searching...
No Matches
Read.hpp
Go to the documentation of this file.
1
#ifndef READ_HPP_
2
#define READ_HPP_
3
#include <
algorithms/Algorithm.hpp
>
4
5
namespace
sisi4s
{
6
7
namespace
cc4s {
8
9
enum
AxisType
{
AuxiliaryField
,
State
};
10
11
struct
Dimension
{
12
size_t
length
;
13
AxisType
type
;
14
};
15
using
Dimensions
= std::vector<Dimension>;
16
17
enum
ElementFileType
{
TextFile
,
IeeeBinaryFile
};
18
19
enum
ScalarType
{
Real64
,
Complex64
};
20
21
template
<ScalarType t>
22
struct
ScalarTypeTraits
;
23
24
template
<>
25
struct
ScalarTypeTraits
<
ScalarType
::
Real64
> {
26
using
type
= double;
27
};
28
29
template
<>
30
struct
ScalarTypeTraits
<
ScalarType
::
Complex64
> {
31
using
type
=
sisi4s::complex
;
32
};
33
34
enum
ReadableType
{
35
Tensor
,
36
};
37
38
struct
ReadHeader
{
39
40
enum
Version
{
ONE
= 100 };
41
42
Version
version
;
43
ReadableType
type
;
44
ScalarType
scalarType
;
45
Dimensions
dimensions
;
46
ElementFileType
elementsType
;
47
double
unit
;
48
};
49
50
}
// namespace cc4s
51
52
DEFINE_ALGORITHM_HEADER
(
Read
, );
53
DEFINE_ALGORITHM_HEADER
(
Write
, );
54
55
}
// namespace sisi4s
56
57
#endif
Algorithm.hpp
DEFINE_ALGORITHM_HEADER
#define DEFINE_ALGORITHM_HEADER(NAME,...)
Definition
Algorithm.hpp:185
sisi4s::Read
Definition
Read.hpp:52
sisi4s::Write
Definition
Read.hpp:53
sisi4s::cc4s::AxisType
AxisType
Definition
Read.hpp:9
sisi4s::cc4s::AuxiliaryField
@ AuxiliaryField
Definition
Read.hpp:9
sisi4s::cc4s::State
@ State
Definition
Read.hpp:9
sisi4s::cc4s::ElementFileType
ElementFileType
Definition
Read.hpp:17
sisi4s::cc4s::IeeeBinaryFile
@ IeeeBinaryFile
Definition
Read.hpp:17
sisi4s::cc4s::TextFile
@ TextFile
Definition
Read.hpp:17
sisi4s::cc4s::ReadableType
ReadableType
Definition
Read.hpp:34
sisi4s::cc4s::Tensor
@ Tensor
Definition
Read.hpp:35
sisi4s::cc4s::Dimensions
std::vector< Dimension > Dimensions
Definition
Read.hpp:15
sisi4s::cc4s::ScalarType
ScalarType
Definition
Read.hpp:19
sisi4s::cc4s::Real64
@ Real64
Definition
Read.hpp:19
sisi4s
Definition
Algorithm.hpp:10
sisi4s::Complex64
Complex< Float64 > Complex64
Definition
Complex.hpp:14
sisi4s::complex
Complex< real > complex
Definition
Complex.hpp:17
sisi4s::cc4s::Dimension
Definition
Read.hpp:11
sisi4s::cc4s::Dimension::length
size_t length
Definition
Read.hpp:12
sisi4s::cc4s::Dimension::type
AxisType type
Definition
Read.hpp:13
sisi4s::cc4s::ReadHeader
Definition
Read.hpp:38
sisi4s::cc4s::ReadHeader::elementsType
ElementFileType elementsType
Definition
Read.hpp:46
sisi4s::cc4s::ReadHeader::scalarType
ScalarType scalarType
Definition
Read.hpp:44
sisi4s::cc4s::ReadHeader::Version
Version
Definition
Read.hpp:40
sisi4s::cc4s::ReadHeader::ONE
@ ONE
Definition
Read.hpp:40
sisi4s::cc4s::ReadHeader::dimensions
Dimensions dimensions
Definition
Read.hpp:45
sisi4s::cc4s::ReadHeader::type
ReadableType type
Definition
Read.hpp:43
sisi4s::cc4s::ReadHeader::unit
double unit
Definition
Read.hpp:47
sisi4s::cc4s::ReadHeader::version
Version version
Definition
Read.hpp:42
sisi4s::cc4s::ScalarTypeTraits< ScalarType::Complex64 >::type
sisi4s::complex type
Definition
Read.hpp:31
sisi4s::cc4s::ScalarTypeTraits< ScalarType::Real64 >::type
double type
Definition
Read.hpp:26
sisi4s::cc4s::ScalarTypeTraits
Definition
Read.hpp:22
src
algorithms
Read.hpp
Generated on Tue Jan 1 1980 00:00:00 for sisi4s by
1.9.7