criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
Loading...
Searching...
No Matches
Types.H
Go to the documentation of this file.
1
13#ifndef _TYPES_H_
14#define _TYPES_H_
15
16#include <climits>
17#include <cstddef>
18#include <cstdint>
19#include <limits>
20#include <vector>
21#include "../Definitions.H"
22#include "hdf5.h"
23
27namespace criptic {
28
29 // Define types
30#ifdef CRIPTIC_PRECISION_SINGLE
31 using Real = float;
36# define H5T_NATIVE_REAL H5T_NATIVE_FLOAT
37#else
38 using Real = double;
43# define H5T_NATIVE_REAL H5T_NATIVE_DOUBLE
44#endif
45 using IdxType = std::vector<Real>::size_type;
46 using SignedIdxType = std::ptrdiff_t;
48 // Define numeric limits
49 constexpr Real maxReal =
50 std::numeric_limits<Real>::max();
51 constexpr Real eps =
52 std::numeric_limits<Real>::epsilon();
53 constexpr IdxType maxInt =
54 std::numeric_limits<int>::max();
55 constexpr IdxType maxIdx =
56 std::numeric_limits<IdxType>::max();
57 constexpr IdxType nullIdx = maxIdx;
58}
59
60#endif
61// _TYPES_H_
The primary namespace for criptic objects.
Definition AdvancePacket.H:25
constexpr Real eps
Definition Types.H:51
constexpr IdxType maxIdx
Definition Types.H:55
constexpr Real maxReal
Definition Types.H:49
std::ptrdiff_t SignedIdxType
Definition Types.H:46
std::vector< Real >::size_type IdxType
Definition Types.H:45
double Real
Definition Types.H:38
constexpr IdxType nullIdx
Definition Types.H:57
constexpr IdxType maxInt
Definition Types.H:53