00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011
00012 #ifndef _REAL_H_
00013 #define _REAL_H_
00014
00015 #ifdef CH_USE_FLOAT
00016 # undef CH_USE_DOUBLE
00017 # undef CH_USE_FLOAT
00018 # define CH_USE_FLOAT 1
00019 #else
00020 # undef CH_USE_FLOAT
00021 # undef CH_USE_DOUBLE
00022 # define CH_USE_DOUBLE 1
00023 #endif
00024
00025 #if !defined(CH_LANG_FORT)
00026 # ifdef CH_USE_FLOAT
00027 typedef float Real;
00028 # define MPI_CH_REAL MPI_FLOAT
00029 # define H5T_NATIVE_REAL H5T_NATIVE_FLOAT
00030 # define BASEFAB_REAL_SETVAL 1.23456789e+30
00031 # define CH_BADVAL (Real)1.0e30
00032 # else
00033 typedef double Real;
00034 # define MPI_CH_REAL MPI_DOUBLE
00035 # define H5T_NATIVE_REAL H5T_NATIVE_DOUBLE
00036 # define BASEFAB_REAL_SETVAL 1.23456789e+300
00037 # define CH_BADVAL (Real)1.0e99
00038 # endif
00039
00040 #else
00041
00042 # ifdef CH_USE_FLOAT
00043 # define REAL_T REAL
00044 # define COMPLEX_T COMPLEX
00045 # else
00046 # if defined(CH_CRAY)
00047 # define REAL_T REAL
00048 # define COMPLEX_T COMPLEX
00049 # else
00050 # define REAL_T REAL*8
00051 # define COMPLEX_T COMPLEX*16
00052 # endif
00053 # endif
00054
00055 #endif
00056
00057 #if defined(CH_LANG_FORT)
00058 # define Real_T REAL_T
00059 # define Real_t REAL_T
00060 # define real_t REAL_T
00061 # define Complex_T COMPLEX_T
00062 # define complex_T COMPLEX_T
00063 # define complex_t COMPLEX_T
00064 #endif
00065
00066 #if !defined(CH_USE_FLOAT) && !defined(CH_USE_DOUBLE)
00067 #error Exactly one of CH_USE_FLOAT or CH_USE_DOUBLE must be defined
00068 #endif
00069
00070 #endif