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

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


Detailed Description

store CPU specific information

Definition in file cpu.h.


Define Documentation

#define __COMP   "unknown"

Definition at line 426 of file cpu.h.

Referenced by cdInit().

#define __COMP_VER   0

Definition at line 427 of file cpu.h.

Referenced by cdInit().

#define __OS   "unknown"

Definition at line 502 of file cpu.h.

Referenced by cdInit().

#define BROKEN_COMPILER   0

Definition at line 517 of file cpu.h.

#define HAVE_POWI   0

Definition at line 509 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 17 of file cpu.h.

#define INT16_MIN   (-INT16_MAX - 1)

Definition at line 20 of file cpu.h.

#define INT32_MAX   2147483647L

Definition at line 44 of file cpu.h.

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

#define INT32_MIN   (-INT32_MAX - 1)

Definition at line 47 of file cpu.h.

#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

Definition at line 364 of file cpu.h.

#define UINT16_MAX   65535

Definition at line 32 of file cpu.h.

#define UINT32_MAX   4294967295UL

Definition at line 59 of file cpu.h.

#define UINT64_MAX   18446744073709551615UL

Definition at line 94 of file cpu.h.


Function Documentation

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

Here is the call graph for this function:

int MyIsnan ( float &  x  )  [inline]

Definition at line 255 of file cpu.h.

References MyIsnanf().

Referenced by ParseCrashDo().

Here is the call graph for this function:

int MyIsnanf ( float &  x  )  [inline]

detect quiet and signaling NaNs in floats

Definition at line 240 of file cpu.h.

Referenced by MyIsnan().

void set_nan ( double  x[],
long  n 
) [inline]

Definition at line 212 of file cpu.h.

References cpu, and t_cpu::Double_SNaN_Value.

void set_nan ( double &  x  )  [inline]

Definition at line 196 of file cpu.h.

References cpu, and t_cpu::Double_SNaN_Value.

void set_nan ( float  x[],
long  n 
) [inline]

Definition at line 194 of file cpu.h.

References set_nanf().

Here is the call graph for this function:

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

Here is the call graph for this function:

void set_nanf ( float  x[],
long  n 
) [inline]

Definition at line 175 of file cpu.h.

References cpu, and t_cpu::Float_SNaN_Value.

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


Variable Documentation

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

EXTERN class t_cpu cpu

const double SMALLDOUBLE = DBL_MIN*100.

const float SMALLFLOAT = FLT_MIN*100.f

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


Generated for cloudy by doxygen 1.5.9