cloudy
trunk
|
Go to the source code of this file.
Data Structures | |
class | t_cpu |
Defines | |
#define | __func__ DEBUG_ENTRY.name() |
#define | NORETURN /*@noreturn@*/ |
#define | __COMP "unknown" |
#define | __COMP_VER 0 |
#define | __OS "unknown" |
Enumerations | |
enum | access_scheme { AS_DATA_ONLY_TRY, AS_DATA_LOCAL_TRY, AS_LOCAL_DATA_TRY, AS_LOCAL_ONLY_TRY, AS_DATA_ONLY, AS_DATA_OPTIONAL, AS_DATA_LOCAL, AS_LOCAL_DATA, AS_LOCAL_ONLY } |
Functions | |
FILE * | open_data (const char *fname, const char *mode, access_scheme scheme=AS_DATA_ONLY) |
void | set_NaN (sys_float &x) |
void | set_NaN (sys_float x[], long n) |
void | set_NaN (double &x) |
void | set_NaN (double x[], long n) |
bool | MyIsnan (sys_float &x) |
bool | MyIsnan (double &x) |
Variables | |
const realnum | BIGFLOAT = (realnum)(FLT_MAX/100.f) |
const realnum | SMALLFLOAT = (realnum)(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 |
store CPU specific information
Definition in file cpu.h.
#define __COMP "unknown" |
Definition at line 369 of file cpu.h.
Referenced by t_version::t_version().
#define __COMP_VER 0 |
Definition at line 370 of file cpu.h.
Referenced by t_version::t_version().
#define __func__ DEBUG_ENTRY.name() |
#define __OS "unknown" |
Definition at line 445 of file cpu.h.
Referenced by t_version::t_version().
#define NORETURN /*@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
enum access_scheme |
flag used as third parameter for open_data, indicates how data files are searched AS_DATA_ONLY: search only in the data directories, not in the current working directory (default) AS_DATA_OPTIONAL: same as AS_DATA_ONLY, except that the precense of the file is optional AS_DATA_LOCAL: search in data directories first, then in the current working directory AS_LOCAL_DATA: search in the current working directory first, then in the data directories AS_LOCAL_ONLY: search in the current working directory only versions with _TRY appended have the same meaning, except that they don't abort
detect quiet and signaling NaNs in FP numbers
detect quiet and signaling NaNs in single precision FP
Definition at line 622 of file cpu.cpp.
Referenced by ParseCrashDo().
bool MyIsnan | ( | double & | x | ) |
detect quiet and signaling NaNs in double precision FP
Definition at line 637 of file cpu.cpp.
References t_cpu::big_endian(), cpu, and t_cpu::little_endian().
FILE* open_data | ( | const char * | fname, |
const char * | mode, | ||
access_scheme | scheme = AS_DATA_ONLY |
||
) |
Definition at line 438 of file cpu.cpp.
References AS_DATA_LOCAL, AS_DATA_LOCAL_TRY, AS_DATA_ONLY, AS_DATA_ONLY_TRY, AS_DATA_OPTIONAL, AS_LOCAL_DATA, AS_LOCAL_DATA_TRY, AS_LOCAL_ONLY, AS_LOCAL_ONLY_TRY, cdEXIT, t_cpu::chSearchPath, cpu, DEBUG_ENTRY, ioQQQ, lgAbort, t_trace::lgTrace, t_cpu::nFileDone, t_cpu::printDataPath(), TotalInsanity(), and trace.
Referenced by atmdat_Chianti_readin(), atmdat_lamda_readin(), atmdat_readin(), Badnell_rec_init(), cdGetLineList(), ContBandsCreate(), FeIIBandsCreate(), FeIICreate(), FillGFF(), GetStandardHeLines(), H2_CollidRateRead(), H2_He_coll_init(), H2_Read_hminus_distribution(), H2_ReadDissprob(), H2_ReadEnergies(), H2_ReadTransprob(), HeCollidSetup(), HelikeTransProbSetup(), HyperfineCreate(), t_yield::init_yield(), InitGrid(), iso_recomb_setup(), lgCompileAtmosphere(), lgCompileAtmosphereCoStar(), lgFileReadable(), lgOptimize_do(), lgValidAsciiFile(), lgValidBinFile(), mie_read_mix(), mie_read_opc(), mie_read_rfi(), mie_read_szd(), mie_write_opc(), Nemala_Start(), optimize_phymir(), ParseInit(), ParseOptimize(), ParsePunch(), ParseState(), pnegopc(), ptrcer(), punch_opacity(), RauchInitializeSub(), rd_continue(), read_continuum_mesh(), read_hm05(), ReadAugerData(), ReadTable(), StarburstInitialize(), state_get_put(), t_ADfA::t_ADfA(), t_fe2ovr_la::t_fe2ovr_la(), and wr_continue().
set_NaN - set variable or array to SNaN
define routines for setting single and double precision 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 551 of file cpu.cpp.
References cpu, and t_cpu::Float_SNaN_Value.
Referenced by ConvInitSolution(), Fe7Lev8(), Fe_10_11_13_cs(), invalidate_array(), MyMalloc(), ParseCrashDo(), and zero().
Definition at line 559 of file cpu.cpp.
References cpu, and t_cpu::Float_SNaN_Value.
void set_NaN | ( | double & | x | ) |
Definition at line 577 of file cpu.cpp.
References cpu, and t_cpu::Double_SNaN_Value.
void set_NaN | ( | double | x[], |
long | n | ||
) |
Definition at line 594 of file cpu.cpp.
References cpu, and t_cpu::Double_SNaN_Value.
const double BIGDOUBLE = DBL_MAX/100. |
DBL_MAX is 1.797e308 on wintel so BIGDOUBLE is 1.797e306
Definition at line 127 of file cpu.h.
Referenced by atmdat_Chianti_readin(), CS_l_mixing_PS64(), DoBeckert_etal(), DoSutherland(), iso_collide(), iso_level(), ParseDynaWind(), and RandGauss().
set something that is too small to max of quantity and SMALLFLOAT, but then compare with SMALLFLOAT
Definition at line 122 of file cpu.h.
Referenced by cdLine(), CO_solve(), ContSetIntensity(), database_prep(), DynaNewStep(), DynaStartZone(), DynaZero(), ffun(), FreeFreeGaunt(), H2_Create(), H2_DR(), hmole(), HydroRenorm(), HydroT2Low(), iter_end_check(), IterStart(), ParseSet(), PresTotCurrent(), and PrtFinal().
Referenced by main(), MyIsnan(), open_data(), optimize_phymir(), OUT_OF_RANGE(), ParseOptimize(), ParsePrint(), ParseSet(), t_cpu::printDataPath(), set_NaN(), and t_cpu::signal_handler().
const double SMALLDOUBLE = DBL_MIN*100. |
Definition at line 128 of file cpu.h.
Referenced by ConvInitSolution(), helike_radrecomb_from_cross_section(), hlike_radrecomb_from_cross_section(), iso_collide(), iso_level(), iso_satellite_update(), lgCheckAsserts(), ParseAssertResults(), PrtFinal(), and RT_OTS_Update().
const realnum SMALLFLOAT = (realnum)(FLT_MIN*100.f) |
FLT_MIN is 1.175494351e-38 on wintel, so SMALLFLOAT is 1.175e-36
Definition at line 124 of file cpu.h.
Referenced by AbundancesPrt(), AbundancesSet(), atmol_popsolve(), atom_pop3(), cdB21cm(), cdSPEC2(), cdTemp(), CO_solve(), collision_strength_VF01(), ContCreatePointers(), ContRate(), ContSetIntensity(), ConvBase(), ConvEdenIoniz(), ConvInitSolution(), ConvPresTempEdenIoniz(), CoolDima(), CoolEvaluate(), CoolOxyg(), cross_section(), CS_l_mixing_PS64(), database_prep(), DynaNewStep(), DynaPresChngFactor(), DynaStartZone(), eden_sum(), FeIILevelPops(), FeIILyaPump(), FeIIPunchLines(), FeIIRadPress(), ffun(), H21_cm_pops(), H2_Cooling(), H2_Create(), H2_LevelPops(), H2_PunchDo(), H2_RadPress(), H2_Solomon_rate(), HeatPunch(), hmole(), hmole_reactions(), hmole_step(), hydro_transprob(), HydroRenorm(), InitCoreload(), ion_trim(), IonNitro(), IonOxyge(), IonSulph(), iso_collapsed_lifetimes_update(), iso_create(), iso_level(), iso_satellite_update(), iso_solve(), iter_end_check(), IterEnd(), IterRestart(), lgMolecAver(), lines_continuum(), lines_lv1_li_ne(), MakeDeriv(), MeanInc(), MeanIonRadius(), MeanIonVolume(), molcol(), OccupationNumberLine(), OpacityAddTotal(), ParseAssertResults(), ParseCosmicRays(), ParseSet(), ParseStop(), PressureRadiationLine(), PresTotCurrent(), prt_smooth_predictions(), PrtComment(), PrtFinal(), PrtLinePres(), punch_colden(), punch_line(), 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(), RT_tau_init(), SDIV(), TexcLine(), and zero().
const int STDLEN = 16 |
Definition at line 130 of file cpu.h.
Referenced by optimize_phymir(), rd_continue(), t_cpu::t_cpu(), and wr_continue().