Go to the source code of this file.
Data Structures | |
class | t_cpu |
Defines | |
#define | INT16_MAX 32767 |
#define | INT16_MIN (-INT16_MAX - 1) |
#define | UINT16_MAX 65535 |
#define | INT32_MAX 2147483647L |
#define | INT32_MIN (-INT32_MAX - 1) |
#define | UINT32_MAX 4294967295UL |
#define | UINT64_MAX 18446744073709551615UL |
#define | NORETURN |
#define | __COMP "unknown" |
#define | __COMP_VER 0 |
#define | __OS "unknown" |
#define | HAVE_POWI 0 |
#define | BROKEN_COMPILER 0 |
Functions | |
void | set_nanf (float &x) |
void | set_nan (float &x) |
void | set_nanf (float x[], long n) |
void | set_nan (float x[], long n) |
void | set_nan (double &x) |
void | set_nan (double x[], long n) |
int | MyIsnanf (float &x) |
int | MyIsnan (float &x) |
int | MyIsnan (double &x) |
Variables | |
const float | BIGFLOAT = FLT_MAX/100.f |
const float | SMALLFLOAT = FLT_MIN*100.f |
const double | BIGDOUBLE = DBL_MAX/100. |
const double | SMALLDOUBLE = DBL_MIN*100. |
const int | STDLEN = 16 |
EXTERN class t_cpu | cpu |
Definition in file cpu.h.
#define INT16_MAX 32767 |
#define INT32_MAX 2147483647L |
Definition at line 44 of file cpu.h.
Referenced by getrf_wrapper(), getrs_wrapper(), and H2_LevelPops().
#define NORETURN |
all vendors supply predefined preprocessor symbols to help identify their hardware/operating system/compiler, the following symbols will be used to bracket hardware/OS/compiler specific code:
Sun Sparc: __sun DEC Alpha: __alpha SGI Iris: __sgi HP Unix: __hpux Cray: __cray IA32: __i386 AMD64/EM64T: __amd64 UNIX: __unix (includes Linux) Linux: __linux MS Vis C: _MSC_VER Intel compiler: __ICC, __INTEL_COMPILER g++/icc/pathCC: __GNUC__ (also set by icc and pathCC!) g++: __GNUC_EXCL__ (excludes icc, pathCC)
NOTE: the user should NOT define these symbols at compile time. the Intel EM64T compiler does not set the __amd64 flag... on some UNIX systems only the preprocessor symbol "unix" is predefined (e.g. DEC alpha), on others only "__unix" (e.g. Cray), and on yet others both... This ensures "__unix" is always defined on all UNIX systems. on SGI IA64 systems, icc calls itself ecc... this is needed to discriminate between g++ and icc/pathCC
int MyIsnan | ( | double & | x | ) | [inline] |
detect quiet and signaling NaNs in doubles
Definition at line 258 of file cpu.h.
References t_cpu::big_endian(), cpu, and t_cpu::little_endian().
int MyIsnan | ( | float & | x | ) | [inline] |
Definition at line 255 of file cpu.h.
References MyIsnanf().
Referenced by ParseCrashDo().
int MyIsnanf | ( | float & | x | ) | [inline] |
void set_nan | ( | double | x[], | |
long | n | |||
) | [inline] |
void set_nan | ( | double & | x | ) | [inline] |
void set_nan | ( | float | x[], | |
long | n | |||
) | [inline] |
Definition at line 194 of file cpu.h.
References set_nanf().
void set_nan | ( | float & | x | ) | [inline] |
Definition at line 173 of file cpu.h.
References set_nanf().
Referenced by Fe7Lev8(), Fe_10_11_13_cs(), MyMalloc(), ParseCrashDo(), and zero().
void set_nanf | ( | float | x[], | |
long | n | |||
) | [inline] |
void set_nanf | ( | float & | x | ) | [inline] |
define routines for setting float and double signaling NaN The bit pattern for an SNaN is implementation defined, but this should work on most modern CPU's. The system definition is preferred, so in C++ this should be replaced by numeric_limits<TYPE>::signaling_NaN()
Definition at line 164 of file cpu.h.
References cpu, and t_cpu::Float_SNaN_Value.
Referenced by MyMalloc(), ParseCrashDo(), rfield_opac_zero(), set_nan(), and zero().
const double BIGDOUBLE = DBL_MAX/100. |
DBL_MAX is 1.797e308 on wintel so BIGDOUBLE is 1.797e306
Definition at line 112 of file cpu.h.
Referenced by CS_l_mixing_PS64(), DoBeckert_etal(), DoSutherland(), HeCollid(), HeLikeLevel(), HydroLevel(), ParseDynaWind(), PresTotCurrent(), and RandGauss().
const float BIGFLOAT = FLT_MAX/100.f |
set something that is too small to max of quantity and SMALLFLOAT, but then compare with SMALLFLOAT
Definition at line 107 of file cpu.h.
Referenced by cdLine(), ContSetIntensity(), DynaNewStep(), DynaStartZone(), DynaZero(), FreeFreeGaunt(), H2_Create(), H2_DR(), hmole(), HydroLevel(), HydroRenorm(), HydroT2Low(), IterStart(), and PrtFinal().
Referenced by MyIsnan(), optimize_phymir(), ParseOptimize(), set_nan(), and set_nanf().
const double SMALLDOUBLE = DBL_MIN*100. |
Definition at line 113 of file cpu.h.
Referenced by HeCollid(), HeLikeLevel(), HydroCollid(), HydroLevel(), lgCheckAsserts(), lines_helium(), ParseAssertResults(), PrtFinal(), radrecomb(), and RT_OTS_Update().
const float SMALLFLOAT = FLT_MIN*100.f |
FLT_MIN is 1.175494351e-38 on wintel, so SMALLFLOAT is 1.175e-36
Definition at line 109 of file cpu.h.
Referenced by AbundancesPrt(), AbundancesSet(), atom_pop3(), cdB21cm(), cdSPEC2(), cdTemp(), CO_solve(), collision_strength_VF01(), ContCreatePointers(), ContRate(), ContSetIntensity(), ConvBase(), ConvEdenIoniz(), ConvPresTempEdenIoniz(), CoolDima(), CoolEvaluate(), CoolOxyg(), cross_section(), DynaNewStep(), DynaPresChngFactor(), DynaStartZone(), eden_sum(), FeIILevelPops(), FeIILyaPump(), FeIIPunchLines(), FeIIRadPress(), H21_cm_pops(), H2_Cooling(), H2_Create(), H2_LevelPops(), H2_PunchDo(), H2_RadPress(), H2_Solomon_rate(), HeatPunch(), HeatSum(), HeLike(), HeLikeLevel(), Hion_colldeexc_cs(), hmole(), hmole_reactions(), hmole_step(), Hydrogenic(), HydroLevel(), HydroRenorm(), ion_trim(), IonNitro(), IonOxyge(), IonSilic(), IonSulph(), iter_end_check(), IterEnd(), IterRestart(), lgMolecAver(), lines_continuum(), lines_lv1_li_ne(), MakeDeriv(), MeanInc(), MeanIonRadius(), MeanIonVolume(), molcol(), OccupationNumberLine(), OpacityAddTotal(), ParseCosmicRays(), ParseSet(), ParseStop(), PresTotCurrent(), prt_smooth_predictions(), PrtFinal(), PrtLinePres(), punch_colden(), PunchDo(), radius_first(), radius_increment(), radius_next(), RT_diffuse(), RT_line_all(), RT_line_one(), RT_line_static(), RT_OTS(), RT_OTS_Update(), RT_recom_effic(), SDIV(), TexcLine(), and zero().
const int STDLEN = 16 |
Definition at line 115 of file cpu.h.
Referenced by optimize_phymir(), rd_continue(), t_cpu::t_cpu(), and wr_continue().