sisi4s
Loading...
Searching...
No Matches
Float.hpp
Go to the documentation of this file.
1#ifndef FLOAT_DEFINED
2#define FLOAT_DEFINED
3
4#ifndef INTEL_COMPILER
5# include <ostream>
6#endif
7
8// TODO: use configuration for setting default float type sizes in bits
9#define DEFAULT_FLOAT_BIT_SIZE 64
10#define MACHINE_FLOAT_BIT_SIZE 64
11
12namespace sisi4s {
13template <int FloatSize>
15
16template <>
17class FloatTypes<32> {
18public:
19 typedef float type;
20};
21
22template <>
23class FloatTypes<64> {
24public:
25 typedef double type;
26};
27
28// define explicit size float types
31
32// define machine supported float as real type
33typedef FloatTypes
36 : DEFAULT_FLOAT_BIT_SIZE>::type real;
37
38} // namespace sisi4s
39#endif
#define DEFAULT_FLOAT_BIT_SIZE
Definition Float.hpp:9
#define MACHINE_FLOAT_BIT_SIZE
Definition Float.hpp:10
float type
Definition Float.hpp:19
double type
Definition Float.hpp:25
Definition Float.hpp:14
Definition Algorithm.hpp:10
FloatTypes< 64 >::type Float64
Definition Float.hpp:30
FloatTypes< 32 >::type Float32
Definition Float.hpp:29