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 | __func__ DEBUG_ENTRY.name() |
#define | NORETURN |
#define | UNUSED |
#define | DO_EXPAND(VAL) VAL ## 1 |
#define | EXPAND(VAL) DO_EXPAND(VAL) |
#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 | open_data (fstream &stream, const char *fname, ios_base::openmode 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 (const sys_float &x) |
bool | MyIsnan (const double &x) |
Variables | |
const realnum | BIGFLOAT = numeric_limits<realnum>::max()/realnum(100.f) |
const realnum | SMALLFLOAT = numeric_limits<realnum>::min()*realnum(100.f) |
const double | BIGDOUBLE = DBL_MAX/100. |
const double | SMALLDOUBLE = DBL_MIN*100. |
const int | STDLEN = 32 |
const ios_base::openmode | mode_r = ios_base::in |
const ios_base::openmode | mode_w = ios_base::out | ios_base::trunc |
const ios_base::openmode | mode_a = ios_base::out | ios_base::app |
const ios_base::openmode | mode_rp = ios_base::in | ios_base::out |
const ios_base::openmode | mode_wp = ios_base::in | ios_base::out | ios_base::trunc |
const ios_base::openmode | mode_ap = ios_base::in | ios_base::out | ios_base::app |
const ios_base::openmode | mode_rb = mode_r | ios_base::binary |
const ios_base::openmode | mode_wb = mode_w | ios_base::binary |
const ios_base::openmode | mode_ab = mode_a | ios_base::binary |
const ios_base::openmode | mode_rpb = mode_rp | ios_base::binary |
const ios_base::openmode | mode_wpb = mode_wp | ios_base::binary |
const ios_base::openmode | mode_apb = mode_ap | ios_base::binary |
EXTERN class t_cpu | cpu |
store CPU specific information
Definition in file cpu.h.
#define __COMP "unknown" |
Definition at line 432 of file cpu.h.
Referenced by t_version::t_version().
#define __COMP_VER 0 |
Definition at line 433 of file cpu.h.
Referenced by t_version::t_version().
#define __func__ DEBUG_ENTRY.name() |
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/openCC/clang++
#define __OS "unknown" |
Definition at line 508 of file cpu.h.
Referenced by t_version::t_version().
#define INT16_MAX 32767 |
#define INT32_MAX 2147483647L |
Definition at line 43 of file cpu.h.
Referenced by getrf_wrapper(), getrs_wrapper(), and H2_LevelPops().
#define UNUSED |
Definition at line 348 of file cpu.h.
Referenced by ParseSet(), and read_SH98_He1_cross_sections().
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
bool MyIsnan | ( | const double & | x | ) |
detect quiet and signaling NaNs in double precision FP
Definition at line 689 of file cpu.cpp.
References t_cpu::big_endian(), cpu, and t_cpu::little_endian().
bool MyIsnan | ( | const sys_float & | x | ) |
detect quiet and signaling NaNs in FP numbers
detect quiet and signaling NaNs in single precision FP
Definition at line 674 of file cpu.cpp.
Referenced by ParseCrashDo().
void open_data | ( | fstream & | stream, | |
const char * | fname, | |||
ios_base::openmode | mode, | |||
access_scheme | scheme = AS_DATA_ONLY | |||
) |
Definition at line 573 of file cpu.cpp.
References AbortErrorMessage(), AS_DATA_LOCAL, AS_DATA_ONLY, AS_DATA_OPTIONAL, AS_LOCAL_DATA, AS_LOCAL_ONLY, ASSERT, cpu, DEBUG_ENTRY, t_cpu::getPathList(), ioQQQ, lgAbort, t_trace::lgTrace, t_cpu::nFileDone, TorF(), and trace.
FILE* open_data | ( | const char * | fname, | |
const char * | mode, | |||
access_scheme | scheme = AS_DATA_ONLY | |||
) |
Definition at line 546 of file cpu.cpp.
References AbortErrorMessage(), AS_DATA_LOCAL, AS_DATA_ONLY, AS_DATA_OPTIONAL, AS_LOCAL_DATA, AS_LOCAL_ONLY, cpu, DEBUG_ENTRY, t_cpu::getPathList(), ioQQQ, lgAbort, t_trace::lgTrace, t_cpu::nFileDone, and trace.
Referenced by append_file(), atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), atmdat_readin(), Badnell_rec_init(), cdGetLineList(), cdInput(), cdOutput(), ContBandsCreate(), database_readin(), FeIIBandsCreate(), FeIICreate(), FillGFF(), GetStandardHeLines(), H2_CollidRateRead(), H2_He_coll_init(), H2_ORH2_coll_init(), H2_PAH2_coll_init(), H2_Read_hminus_distribution(), H2_ReadDissprob(), H2_ReadEnergies(), H2_ReadTransprob(), HeCollidSetup(), HelikeTransProbSetup(), HyperfineCreate(), t_yield::init_yield(), InitGrid(), input_readvector(), iso_recomb_setup(), lgCompileAtmosphere(), lgCompileAtmosphereCoStar(), lgFileReadable(), lgOptimize_do(), lgValidAsciiFile(), lgValidBinFile(), main(), MD5datafile(), MD5file(), mie_read_mix(), mie_read_opc(), mie_read_rfi(), mie_read_szd(), mie_write_opc(), optimize_phymir(), phymir_state< X, Y, NP, NSTR >::p_execute_job_parallel(), phymir_state< X, Y, NP, NSTR >::p_rd_state(), phymir_state< X, Y, NP, NSTR >::p_wr_state(), ParseInit(), ParseSave(), ParseState(), pnegopc(), process_output(), ptrcer(), RauchInitializeSub(), RauchReadMPP(), rd_block(), read_continuum_mesh(), read_Helike_cross_sections(), read_hm05(), read_SH98_He1_cross_sections(), ReadAugerData(), ReadBadnellAIData(), ReadTable(), save_opacity(), StarburstInitialize(), state_get_put(), t_ADfA::t_ADfA(), t_fe2ovr_la::t_fe2ovr_la(), vary_input(), and wr_block().
void set_NaN | ( | double | x[], | |
long | n | |||
) |
Definition at line 646 of file cpu.cpp.
References cpu, and t_cpu::Double_SNaN_Value.
void set_NaN | ( | double & | x | ) |
Definition at line 629 of file cpu.cpp.
References cpu, and t_cpu::Double_SNaN_Value.
void set_NaN | ( | sys_float | x[], | |
long | n | |||
) |
Definition at line 611 of file cpu.cpp.
References cpu, and t_cpu::Float_SNaN_Value.
void set_NaN | ( | sys_float & | x | ) |
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 603 of file cpu.cpp.
References cpu, and t_cpu::Float_SNaN_Value.
Referenced by Amsterdam_Method(), ConvInitSolution(), Fe7Lev8(), Fe_10_11_13_cs(), invalidate_array(), MyMalloc(), iter_track::p_clear1(), ParseBlackbody(), ParseCrashDo(), SpeciesJunk(), xNI_coll_stren(), and zero().
const double BIGDOUBLE = DBL_MAX/100. |
DBL_MAX is 1.797e308 on wintel so BIGDOUBLE is 1.797e306
Definition at line 181 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 176 of file cpu.h.
Referenced by cdLine(), CO_solve(), ContSetIntensity(), database_prep(), DynaNewStep(), DynaStartZone(), DynaZero(), ffun(), FreeFreeGaunt(), H2_Create(), H2_DR(), hmole(), HydroRenorm(), iter_end_check(), IterStart(), ParseConstant(), ParseTable(), PresTotCurrent(), prt_constants(), PrtFinal(), and RT_LineWidth().
Referenced by AbortErrorMessage(), cdInit(), cdMain(), cdTalk(), t_cpu::getPathList(), grid_do(), GridGatherInCloudy(), gridXspec(), InitDefaultsPreparse(), iter_end_check(), lgCheckMonitors(), lgOptimize_do(), main(), MD5string(), mie_read_opc(), mie_write_opc(), MyIsnan(), open_data(), optimize_func(), optimize_phymir(), OUT_OF_RANGE(), phymir_state< X, Y, NP, NSTR >::p_execute_job(), phymir_state< X, Y, NP, NSTR >::p_process_output(), phymir_state< X, Y, NP, NSTR >::p_wr_state(), ParseCommands(), ParseOptimize(), ParsePrint(), ParseSave(), ParseSet(), t_cpu::printDataPath(), ReadTable(), SaveDo(), set_NaN(), t_cpu::signal_handler(), t_version::t_version(), and vary_input().
const ios_base::openmode mode_a = ios_base::out | ios_base::app |
const ios_base::openmode mode_ap = ios_base::in | ios_base::out | ios_base::app |
const ios_base::openmode mode_r = ios_base::in |
Definition at line 198 of file cpu.h.
Referenced by atmdat_CHIANTI_readin(), input_readvector(), MD5datafile(), MD5file(), process_output(), RauchReadMPP(), and ReadBadnellAIData().
const ios_base::openmode mode_rp = ios_base::in | ios_base::out |
const ios_base::openmode mode_w = ios_base::out | ios_base::trunc |
Definition at line 199 of file cpu.h.
Referenced by vary_input().
const ios_base::openmode mode_wp = ios_base::in | ios_base::out | ios_base::trunc |
const double SMALLDOUBLE = DBL_MIN*100. |
Definition at line 182 of file cpu.h.
Referenced by ConvInitSolution(), iso_collide(), iso_level(), iso_radrecomb_from_cross_section(), iso_satellite_update(), lgCheckMonitors(), ParseMonitorResults(), PrtFinal(), and RT_OTS_Update().
const realnum SMALLFLOAT = numeric_limits<realnum>::min()*realnum(100.f) |
FLT_MIN is 1.175494351e-38 on wintel, so SMALLFLOAT is 1.175e-36
Definition at line 178 of file cpu.h.
Referenced by AbundancesPrt(), AbundancesSet(), atmdat_LAMDA_readin(), atom_levelN(), atom_pop3(), cdB21cm(), cdSPEC2(), cdTemp(), CO_solve(), collision_strength_VF01(), ContCreatePointers(), ContRate(), ContSetIntensity(), ConvBase(), ConvEdenIoniz(), ConvInitSolution(), ConvPresTempEdenIoniz(), CoolEvaluate(), CoolOxyg(), CS_l_mixing_PS64(), database_prep(), dBase_solve(), DynaNewStep(), DynaPresChngFactor(), DynaStartZone(), FeIILevelPops(), FeIILyaPump(), FeIIRadPress(), FeIISaveLines(), FeIISumBand(), ffun(), H21_cm_pops(), H2_Cooling(), H2_Create(), H2_LevelPops(), H2_PunchDo(), H2_RadPress(), H2_Solomon_rate(), hmole(), hmole_reactions(), hmole_step(), hydro_transprob(), HydroRenorm(), IncidentContinuumHere(), InitCoreload(), ion_trim(), IonHydro(), iso_collapsed_lifetimes_update(), iso_create(), iso_departure_coefficients(), iso_level(), iso_satellite_update(), iter_end_check(), IterEnd(), IterRestart(), lgMolecAver(), lines_continuum(), lines_lv1_li_ne(), t_mean::MeanInc(), molcol(), normalizeProfile(), OccupationNumberLine(), OpacityAddTotal(), optimize_func(), transition::outline(), ParseConstant(), ParseCosmicRays(), ParseMonitorResults(), ParseSet(), ParseStop(), PressureRadiationLine(), PresTotCurrent(), PrintRatio(), prt_constants(), prt_smooth_predictions(), PrtComment(), PrtFinal(), PrtLinePres(), radius_first(), radius_increment(), radius_next(), RT_continuum(), RT_diffuse(), RT_line_all(), RT_line_electron_scatter(), RT_line_fine_opacity(), RT_line_one(), RT_OTS(), RT_recom_effic(), RT_tau_init(), save_colden(), save_line(), SaveDo(), SaveHeat(), SDIV(), TexcLine(), and zero().
const int STDLEN = 32 |
Definition at line 184 of file cpu.h.
Referenced by t_cpu::t_cpu().