Chombo + EB  3.2
REAL.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 _REAL_H_
12 #define _REAL_H_
13 
14 #ifdef CH_USE_FLOAT /* precision */
15 # undef CH_USE_DOUBLE
16 # undef CH_USE_FLOAT
17 # define CH_USE_FLOAT 1
18 #else /* precision */
19 # undef CH_USE_FLOAT
20 # undef CH_USE_DOUBLE
21 # define CH_USE_DOUBLE 1
22 #endif /* precision */
23 
24 #if !defined(CH_LANG_FORT) /* language */
25 # define BYTE_T char
26 # ifdef CH_USE_FLOAT /* precision */
27  typedef float Real;
28 # define MPI_CH_REAL MPI_FLOAT
29 # define H5T_NATIVE_REAL H5T_NATIVE_FLOAT
30 # define BASEFAB_REAL_SETVAL 1.23456789e+30
31 # define CH_BADVAL (Real)1.0e30
32 # else /* precision */
33  typedef double Real;
34 # define MPI_CH_REAL MPI_DOUBLE
35 # define H5T_NATIVE_REAL H5T_NATIVE_DOUBLE
36 # define BASEFAB_REAL_SETVAL 1.23456789e+300
37 # define CH_BADVAL (Real)1.0e99
38 # endif /* precision */
39 
40 #else /* language */
41 # define BYTE_T integer*1
42 # ifdef CH_USE_FLOAT /* precision */
43 # define REAL_T REAL
44 # define COMPLEX_T COMPLEX
45 # else /* precision */
46 # if defined(CH_CRAY)
47 # define REAL_T REAL
48 # define COMPLEX_T COMPLEX
49 # else /*cray */
50 # define REAL_T REAL*8
51 # define COMPLEX_T COMPLEX*16
52 # endif /*cray*/
53 # endif /* precision */
54 
55 #endif /* language */
56 
57 #if defined(CH_LANG_FORT)
58 # define Real_T REAL_T
59 # define Real_t REAL_T
60 # define real_t REAL_T
61 # define Complex_T COMPLEX_T
62 # define complex_T COMPLEX_T
63 # define complex_t COMPLEX_T
64 #endif
65 
66 #if !defined(CH_USE_FLOAT) && !defined(CH_USE_DOUBLE)
67 #error Exactly one of CH_USE_FLOAT or CH_USE_DOUBLE must be defined
68 #endif
69 
70 #endif
double Real
Definition: REAL.H:33