t_cpu Class Reference

#include <cpu.h>

Collaboration diagram for t_cpu:

Collaboration graph
[legend]

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)

Detailed Description

Definition at line 119 of file cpu.h.


Constructor & Destructor Documentation

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.

Here is the call graph for this function:


Member Function Documentation

bool t_cpu::big_endian (  )  const [inline]

Definition at line 145 of file cpu.h.

References endian.

Referenced by MyIsnan(), and t_cpu().

void t_cpu::enable_traps (  )  const [private]

Definition at line 166 of file cpu.cpp.

Referenced by t_cpu().

const char* t_cpu::host_name (  )  const [inline]

Definition at line 149 of file cpu.h.

References HostName.

Referenced by optimize_phymir().

bool t_cpu::little_endian (  )  const [inline]

Definition at line 146 of file cpu.h.

References endian.

Referenced by MyIsnan(), and t_cpu().

long t_cpu::nCPU (  )  const [inline]

Definition at line 148 of file cpu.h.

References n_avail_CPU.

Referenced by ParseOptimize().


Friends And Related Function Documentation

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

Definition at line 212 of file cpu.h.

void set_nan ( double &  x  )  [friend]

Definition at line 196 of file cpu.h.

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

Definition at line 175 of file cpu.h.

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

Definition at line 164 of file cpu.h.


Field Documentation

char t_cpu::c[4]

Definition at line 125 of file cpu.h.

int32 t_cpu::Double_SNaN_Value[2] [private]

Definition at line 133 of file cpu.h.

Referenced by set_nan(), and t_cpu().

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]

Definition at line 129 of file cpu.h.

Referenced by set_nanf(), and t_cpu().

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

int32 t_cpu::i

Definition at line 126 of file cpu.h.

long t_cpu::n_avail_CPU [private]

the number of available CPUs on the system, not detected on all systems

Definition at line 137 of file cpu.h.

Referenced by nCPU(), and t_cpu().


The documentation for this class was generated from the following files:

Generated for cloudy by doxygen 1.5.9