cloudy trunk
|
Go to the source code of this file.
Data Structures | |
class | t_cpu_i |
class | t_cpu |
Macros | |
#define | UNUSED /*@unused@*/ |
#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 /*@noreturn@*/ |
#define | RESTRICT |
#define | UNLIKELY(x) |
#define | DO_EXPAND(VAL) |
#define | 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 , AS_SILENT_TRY } |
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 | |
UNUSED 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 UNUSED | mode_rb = mode_r | ios_base::binary |
const ios_base::openmode UNUSED | mode_wb = mode_w | ios_base::binary |
const ios_base::openmode UNUSED | mode_ab = mode_a | ios_base::binary |
const ios_base::openmode UNUSED | mode_rpb = mode_rp | ios_base::binary |
const ios_base::openmode UNUSED | mode_wpb = mode_wp | ios_base::binary |
const ios_base::openmode UNUSED | mode_apb = mode_ap | ios_base::binary |
static t_cpu | cpu |
store CPU specific information
Definition in file cpu.h.
#define __COMP "unknown" |
Definition at line 479 of file cpu.h.
Referenced by t_version::t_version().
#define __COMP_VER 0 |
Definition at line 480 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. failsafe for obsolete or buggy systems to assure that the POSIX symbol linux is defined 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 555 of file cpu.h.
Referenced by t_version::t_version().
#define EXPAND | ( | VAL | ) |
#define INT16_MAX 32767 |
some definitions for integers with a guaranteed number of bits
Definition at line 22 of file cpu.h.
Referenced by iso_continuum_lower().
#define INT32_MAX 2147483647L |
Definition at line 49 of file cpu.h.
Referenced by getrf_wrapper(), and getrs_wrapper().
#define NORETURN /*@noreturn@*/ |
Definition at line 383 of file cpu.h.
Referenced by AbortErrorMessage(), BadRead(), Parser::CommandError(), Parser::NoNumb(), OUT_OF_RANGE(), SaveLineData(), and TotalInsanity().
#define UNLIKELY | ( | x | ) |
#define UNUSED /*@unused@*/ |
Definition at line 14 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 AS_SILENT_TRY: same as AS_LOCAL_ONLY_TRY, but does not write to ioQQQ in trace mode
Enumerator | |
---|---|
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 | |
AS_SILENT_TRY |
bool MyIsnan | ( | const double & | x | ) |
detect quiet and signaling NaNs in FP numbers
detect quiet and signaling NaNs in single precision FP
Definition at line 753 of file cpu.cpp.
Referenced by ParseCrashDo().
FILE * open_data | ( | const char * | fname, |
const char * | mode, | ||
access_scheme | scheme = AS_DATA_ONLY ) |
Definition at line 335 of file cpu.cpp.
Referenced by append_file(), atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), atmdat_readin(), atmdat_STOUT_readin(), Badnell_rec_init(), cdGetLineList(), cdInput(), cdOutput(), cdRead(), check_grid_file(), CloudyPrintReference(), ContBandsCreate(), database_readin(), DatabasePrintReference(), FeIIBandsCreate(), FeIICreate(), FillGFF(), GetStandardHeLines(), diatomics::H2_CollidRateRead(), diatomics::H2_Read_hminus_distribution(), diatomics::H2_ReadDissocEnergies(), diatomics::H2_ReadDissprob(), diatomics::H2_ReadEnergies(), diatomics::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(), ParseTable(), pnegopc(), process_output(), ptrcer(), RauchInitializeSub(), RauchReadMPP(), rd_block(), read_continuum_mesh(), read_data(), read_Helike_cross_sections(), read_hm05(), diatomics::Read_Mol_Diss_cross_sections(), read_SH98_He1_cross_sections(), read_species_file(), ReadAugerData(), ReadBadnellAIData(), ReadIsotopeFractions(), ReadTable(), save_opacity(), StarburstInitialize(), state_get_put(), t_ADfA::t_ADfA(), t_fe2ovr_la::t_fe2ovr_la(), vary_input(), and wr_block().
void open_data | ( | fstream & | stream, |
const char * | fname, | ||
ios_base::openmode | mode, | ||
access_scheme | scheme = AS_DATA_ONLY ) |
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 338 of file cpu.cpp.
Referenced by Amsterdam_Method(), ConvInitSolution(), invalidate_array(), 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 194 of file cpu.h.
Referenced by atmdat_CHIANTI_readin(), CS_l_mixing_PS64(), DoBeckert_etal(), DoSutherland(), iso_collide(), iso_set_ion_rates(), ParseDynaWind(), prt_constants(), and RandGauss().
set something that is too small to max of quantity and SMALLFLOAT, but then compare with SMALLFLOAT
Definition at line 189 of file cpu.h.
Referenced by cdLine(), ContSetIntensity(), database_prep(), DynaNewStep(), DynaStartZone(), DynaZero(), ffun(), FreeFreeGaunt(), diatomics::H2_DR(), diatomics::init(), iter_end_check(), IterStart(), mole_get_equilibrium_constant(), mole_partition_function(), mole_solve(), ParseBlackbody(), ParseConstant(), ParseTable(), prt_constants(), PrtFinal(), and SumDensities().
|
static |
Definition at line 355 of file cpu.h.
Referenced by AbortErrorMessage(), cdInit(), cdMain(), cdPrepareExit(), cdTalk(), load_balance::finalize(), t_cpu_i::getPathList(), grid_do(), GridGatherInCloudy(), gridXspec(), load_balance::init(), InitDefaultsPreparse(), iter_end_check(), lgCheckMonitors(), lgOptimize_do(), main(), MD5string(), mie_read_opc(), mie_write_opc(), MyIsnan(), load_balance::next_job(), t_cpu_i::open_data, t_cpu_i::open_data, 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(), ParseSet(), prt_constants(), ReadTable(), SaveDo(), SaveGrid(), t_cpu_i::set_NaN, t_cpu_i::set_NaN, t_cpu_i::set_NaN, t_cpu_i::set_NaN, t_cpu_i::signal_handler(), t_version::t_version(), and vary_input().
const ios_base::openmode mode_a = ios_base::out | ios_base::app |
Definition at line 214 of file cpu.h.
Referenced by check_grid_file().
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 212 of file cpu.h.
Referenced by atmdat_CHIANTI_readin(), check_grid_file(), CloudyPrintReference(), DatabasePrintReference(), input_readvector(), MD5datafile(), MD5file(), process_output(), RauchReadMPP(), read_species_file(), 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 213 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 195 of file cpu.h.
Referenced by conorm(), ConvInitSolution(), IonHydro(), iso_collide(), iso_radrecomb_from_cross_section(), iso_satellite_update(), lgCheckMonitors(), ParseMonitorResults(), prt_constants(), PrtFinal(), and RT_OTS_Update().
FLT_MIN is 1.175494351e-38 on wintel, so SMALLFLOAT is 1.175e-36
Definition at line 191 of file cpu.h.
Referenced by AbundancesPrt(), AbundancesSet(), AgeCheck(), atmdat_LAMDA_readin(), atom_levelN(), atom_pop3(), cdB21cm(), cdSPEC2(), cdTemp(), collision_strength_VF01(), ContCreatePointers(), ContRate(), ContSetIntensity(), ConvBase(), ConvEdenIoniz(), ConvInitSolution(), ConvPresTempEdenIoniz(), CoolCarb(), CoolEvaluate(), CoolOxyg(), CS_l_mixing_PS64(), database_prep(), dBase_solve(), DynaNewStep(), DynaStartZone(), FeIILevelPops(), FeIILyaPump(), FeIIRadPress(), FeIISaveLines(), FeIISumBand(), ffun(), H21_cm_pops(), diatomics::H2_LevelPops(), diatomics::H2_PunchDo(), diatomics::H2_RadPress(), diatomics::H2_Solomon_rate(), HeatSum(), hydro_transprob(), IncidentContinuumHere(), diatomics::init(), InitCoreload(), ion_trim(), IonHydro(), iso_collapsed_lifetimes_update(), iso_create(), iso_departure_coefficients(), iso_ionize_recombine(), iso_level(), iso_renorm(), iso_satellite_update(), iso_set_ion_rates(), iter_end_check(), IterEnd(), IterRestart(), lgElemsConserved(), lgStatesConserved(), lines_continuum(), lines_lv1_li_ne(), t_mean::MeanInc(), t_mean::MeanIon(), molcol(), mole_effects(), diatomics::mole_H2_form(), mole_h_fixup(), mole_h_rate_diagnostics(), mole_h_reactions(), OccupationNumberLine(), OpacityAddTotal(), optimize_func(), TransitionProxy::outline(), ParseConstant(), ParseCosmicRays(), ParseMonitorResults(), ParseSet(), ParseStop(), ParseTable(), 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_fine_opacity(), RT_line_one(), RT_OTS(), RT_recom_effic(), RT_tau_init(), save_colden(), save_line(), SaveDo(), SaveHeat(), SDIV(), SDIV(), SetDeuteriumIonization(), GroupMap::setup(), stepDensity(), TexcLine(), and zero().
const int STDLEN = 32 |
Definition at line 197 of file cpu.h.
Referenced by t_cpu_i::t_cpu_i().