cloudy trunk
|
#include <cpu.h>
Public Member Functions | |
t_cpu () | |
bool | big_endian () const |
bool | little_endian () const |
void | setAssertAbort (bool val) |
bool | lgAssertAbort () const |
long | nCPU () const |
const char * | host_name () const |
void | printDataPath () const |
Private Member Functions | |
void | enable_traps () const |
Static Private Member Functions | |
static void | signal_handler (int sig) |
Private Attributes | |
union { | |
char c [4] | |
int32 i | |
} | endian |
int32 | Float_SNaN_Value |
int32 | Double_SNaN_Value [2] |
bool | p_lgAssertAbort |
long | n_avail_CPU |
char | HostName [STDLEN] |
vector< string > | chSearchPath |
int | nFileDone |
Friends | |
FILE * | open_data (const char *fname, const char *mode, access_scheme scheme) |
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) |
t_cpu::t_cpu | ( | ) |
Definition at line 38 of file cpu.cpp.
References big_endian(), chSearchPath, CLOUDY_DATA_PATH, DEBUG_ENTRY, Double_SNaN_Value, enable_traps(), endian, Float_SNaN_Value, HostName, i, little_endian(), n_avail_CPU, nFileDone, p_lgAssertAbort, signal_handler(), Split(), SPM_RELAX, and STDLEN.
bool t_cpu::big_endian | ( | ) | const [inline] |
void t_cpu::enable_traps | ( | ) | const [private] |
Definition at line 240 of file cpu.cpp.
Referenced by signal_handler(), and t_cpu().
const char* t_cpu::host_name | ( | ) | const [inline] |
bool t_cpu::lgAssertAbort | ( | ) | const [inline] |
bool t_cpu::little_endian | ( | ) | const [inline] |
long t_cpu::nCPU | ( | ) | const [inline] |
void t_cpu::printDataPath | ( | ) | const |
Definition at line 431 of file cpu.cpp.
References chSearchPath, cpu, i, and ioQQQ.
Referenced by open_data(), and ParsePrint().
void t_cpu::setAssertAbort | ( | bool | val | ) | [inline] |
Definition at line 192 of file cpu.h.
References p_lgAssertAbort, and signal_handler().
Referenced by main(), and ParseSet().
void t_cpu::signal_handler | ( | int | sig | ) | [static, private] |
Definition at line 419 of file cpu.cpp.
References cpu, and enable_traps().
Referenced by setAssertAbort(), and t_cpu().
FILE* open_data | ( | const char * | fname, |
const char * | mode, | ||
access_scheme | scheme | ||
) | [friend] |
void set_NaN | ( | sys_float & | x | ) | [friend] |
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()
set_NaN - set variable or array to SNaN
vector<string> t_cpu::chSearchPath [private] |
the default search path to the data files
Definition at line 176 of file cpu.h.
Referenced by open_data(), printDataPath(), and t_cpu().
int32 t_cpu::Double_SNaN_Value[2] [private] |
union { ... } t_cpu::endian [private] |
Referenced by big_endian(), little_endian(), and t_cpu().
int32 t_cpu::Float_SNaN_Value [private] |
char t_cpu::HostName[STDLEN] [private] |
the name of the computer, not detected on all systems
Definition at line 174 of file cpu.h.
Referenced by host_name(), and t_cpu().
int32 t_cpu::i |
Definition at line 153 of file cpu.h.
Referenced by printDataPath(), and t_cpu().
long t_cpu::n_avail_CPU [private] |
int t_cpu::nFileDone [private] |
Definition at line 177 of file cpu.h.
Referenced by open_data(), and t_cpu().
bool t_cpu::p_lgAssertAbort [private] |
should a failed assert raise SIGABRT so that we can catch it in a debugger?
Definition at line 169 of file cpu.h.
Referenced by lgAssertAbort(), setAssertAbort(), and t_cpu().