cloudy trunk
Loading...
Searching...
No Matches
cpu.cpp File Reference
#include "cdstd.h"
#include "cddefines.h"
#include "cpu.h"
#include "path.h"
#include "trace.h"
Include dependency graph for cpu.cpp:

Go to the source code of this file.

Functions

STATIC NORETURN void AbortErrorMessage (const char *fname, vector< string > &PathList, access_scheme scheme)
FILE * open_data (const char *fname, const char *mode, access_scheme scheme)
void open_data (fstream &stream, const char *fname, ios_base::openmode 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)
bool MyIsnan (const sys_float &x)
bool MyIsnan (const double &x)

Variables

static int cpu_count = 0

Detailed Description

implement hardware dependent definitions

Definition in file cpu.cpp.

Function Documentation

◆ AbortErrorMessage()

STATIC NORETURN void AbortErrorMessage ( const char * fname,
vector< string > & PathList,
access_scheme scheme )

Definition at line 572 of file cpu.cpp.

References AS_DATA_ONLY, AS_DATA_OPTIONAL, cdEXIT, cpu, DEBUG_ENTRY, EXIT_FAILURE, ioQQQ, NORETURN, and STATIC.

Referenced by t_cpu_i::open_data, and t_cpu_i::open_data.

◆ MyIsnan() [1/2]

bool MyIsnan ( const double & x)

detect quiet and signaling NaNs in double precision FP

Definition at line 768 of file cpu.cpp.

References cpu.

◆ MyIsnan() [2/2]

bool MyIsnan ( const sys_float & x)

detect quiet and signaling NaNs in single precision FP

Definition at line 753 of file cpu.cpp.

Referenced by ParseCrashDo().

◆ open_data() [1/2]

FILE * open_data ( const char * fname,
const char * mode,
access_scheme scheme )

Definition at line 625 of file cpu.cpp.

Referenced by append_file(), atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), atmdat_readin(), atmdat_STOUT_readin(), Badnell_rec_init(), cdGetLineList(), cdInput(), cdOutput(), cdRead(), check_grid_file(), CloudyPrintReference(), ContBandsCreate(), database_readin(), DatabasePrintReference(), FeIIBandsCreate(), FeIICreate(), FillGFF(), GetStandardHeLines(), diatomics::H2_CollidRateRead(), diatomics::H2_Read_hminus_distribution(), diatomics::H2_ReadDissocEnergies(), diatomics::H2_ReadDissprob(), diatomics::H2_ReadEnergies(), diatomics::H2_ReadTransprob(), HeCollidSetup(), HelikeTransProbSetup(), HyperfineCreate(), t_yield::init_yield(), InitGrid(), input_readvector(), iso_recomb_setup(), lgCompileAtmosphere(), lgCompileAtmosphereCoStar(), lgFileReadable(), lgOptimize_do(), lgValidAsciiFile(), lgValidBinFile(), main(), MD5datafile(), MD5file(), mie_read_mix(), mie_read_opc(), mie_read_rfi(), mie_read_szd(), mie_write_opc(), optimize_phymir(), phymir_state< X, Y, NP, NSTR >::p_execute_job_parallel(), phymir_state< X, Y, NP, NSTR >::p_rd_state(), phymir_state< X, Y, NP, NSTR >::p_wr_state(), ParseInit(), ParseSave(), ParseState(), ParseTable(), pnegopc(), process_output(), ptrcer(), RauchInitializeSub(), RauchReadMPP(), rd_block(), read_continuum_mesh(), read_data(), read_Helike_cross_sections(), read_hm05(), diatomics::Read_Mol_Diss_cross_sections(), read_SH98_He1_cross_sections(), read_species_file(), ReadAugerData(), ReadBadnellAIData(), ReadIsotopeFractions(), ReadTable(), save_opacity(), StarburstInitialize(), state_get_put(), t_ADfA::t_ADfA(), t_fe2ovr_la::t_fe2ovr_la(), vary_input(), and wr_block().

◆ open_data() [2/2]

void open_data ( fstream & stream,
const char * fname,
ios_base::openmode mode,
access_scheme scheme )

Definition at line 652 of file cpu.cpp.

◆ set_NaN() [1/4]

void set_NaN ( double & x)

Definition at line 708 of file cpu.cpp.

◆ set_NaN() [2/4]

void set_NaN ( double x[],
long n )

Definition at line 725 of file cpu.cpp.

◆ set_NaN() [3/4]

void set_NaN ( sys_float & x)

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 682 of file cpu.cpp.

Referenced by Amsterdam_Method(), ConvInitSolution(), invalidate_array(), invalidate_array(), MyMalloc(), iter_track::p_clear1(), ParseBlackbody(), ParseCrashDo(), SpeciesJunk(), xNI_coll_stren(), and zero().

◆ set_NaN() [4/4]

void set_NaN ( sys_float x[],
long n )

Definition at line 690 of file cpu.cpp.

Variable Documentation

◆ cpu_count

int cpu_count = 0
static

Definition at line 55 of file cpu.cpp.

Referenced by t_cpu::t_cpu(), and t_cpu::~t_cpu().