#include <cpu.h>
Public Member Functions | |
t_cpu () | |
bool | big_endian () const |
bool | little_endian () const |
long | nCPU () const |
const char * | host_name () const |
Private Member Functions | |
void | enable_traps () const |
Private Attributes | |
union { | |
char c [4] | |
int32 i | |
} | endian |
int32 | Float_SNaN_Value |
int32 | Double_SNaN_Value [2] |
long | n_avail_CPU |
char | HostName [STDLEN] |
Friends | |
void | set_nanf (float &x) |
void | set_nanf (float x[], long n) |
void | set_nan (double &x) |
void | set_nan (double x[], long n) |
Definition at line 119 of file cpu.h.
t_cpu::t_cpu | ( | ) |
Definition at line 34 of file cpu.cpp.
References big_endian(), Double_SNaN_Value, enable_traps(), endian, Float_SNaN_Value, HostName, little_endian(), n_avail_CPU, and STDLEN.
bool t_cpu::big_endian | ( | ) | const [inline] |
void t_cpu::enable_traps | ( | ) | const [private] |
const char* t_cpu::host_name | ( | ) | const [inline] |
bool t_cpu::little_endian | ( | ) | const [inline] |
long t_cpu::nCPU | ( | ) | const [inline] |
void set_nanf | ( | float & | x | ) | [friend] |
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()
int32 t_cpu::Double_SNaN_Value[2] [private] |
union { ... } t_cpu::endian [private] |
alias an int32 to 4 chars to test if we are on a big-endian or little-endian CPU the array cpu.endian.c[] is initialized in cdInit()
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 139 of file cpu.h.
Referenced by host_name(), and t_cpu().
long t_cpu::n_avail_CPU [private] |