cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Structures | Macros | Enumerations | Functions | Variables
cpu.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  t_cpu
 

Macros

#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 __func__   DEBUG_ENTRY.name()
 
#define NORETURN   /*@noreturn@*/
 
#define __COMP   "unknown"
 
#define __COMP_VER   0
 
#define __OS   "unknown"
 
#define HAVE_POWI   0
 

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
 

Detailed Description

store CPU specific information

Definition in file cpu.h.

Macro Definition Documentation

#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()

Definition at line 115 of file cpu.h.

#define __OS   "unknown"

Definition at line 445 of file cpu.h.

Referenced by t_version::t_version().

#define HAVE_POWI   0

Definition at line 452 of file cpu.h.

#define INT16_MAX   32767

>>chng 05 dec 14, added this file, PvH some definitions for integers with a guaranteed number of bits

Definition at line 18 of file cpu.h.

#define INT16_MIN   (-INT16_MAX - 1)

Definition at line 21 of file cpu.h.

#define INT32_MAX   2147483647L

Definition at line 45 of file cpu.h.

Referenced by getrf_wrapper(), getrs_wrapper(), and H2_LevelPops().

#define INT32_MIN   (-INT32_MAX - 1)

Definition at line 48 of file cpu.h.

#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

Definition at line 307 of file cpu.h.

#define UINT16_MAX   65535

Definition at line 33 of file cpu.h.

#define UINT32_MAX   4294967295UL

Definition at line 60 of file cpu.h.

#define UINT64_MAX   18446744073709551615UL

Definition at line 95 of file cpu.h.

Enumeration Type Documentation

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

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 

Definition at line 139 of file cpu.h.

Function Documentation

bool MyIsnan ( sys_float x)

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().

Here is the call graph for this function:

FILE* open_data ( const char *  fname,
const char *  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 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().

void set_NaN ( sys_float  x[],
long  n 
)

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.

Variable Documentation

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().

const realnum BIGFLOAT = (realnum)(FLT_MAX/100.f)

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().

EXTERN class t_cpu cpu
const double SMALLDOUBLE = DBL_MIN*100.
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().


Generated for cloudy by doxygen 1.8.4