Cloudy
Spectral Synthesis Code for Astrophysics
|
#include "cdstd.h"
#include <locale.h>
#include "cddefines.h"
#include "trace.h"
#include "service.h"
#include "vectorhash.h"
#include "version.h"
#include "prt.h"
#include "ran.h"
Functions | |
STATIC void | ErrorMessage (const string &fname, const vector< string > &PathList, access_scheme scheme) |
STATIC string | check_mult_path (const string &fname, const vector< string > &PathList, access_scheme scheme, bool lgRead) |
FILE * | open_data (const string &fname, const string &mode, access_scheme scheme, string *rpath) |
void | open_data (fstream &stream, const string &fname, ios_base::openmode mode, access_scheme scheme, string *rpath) |
MPI_File | open_data (const string &fname, int mode, access_scheme scheme, string *rpath) |
void | check_data (const string &fpath, const string &fname) |
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 |
implement hardware dependent definitions
void check_data | ( | const string & | fpath, |
const string & | fname | ||
) |
References t_cpu_i::checksum_expct, cpu, DEBUG_ENTRY, fprintf(), t_cpu::i(), Singleton< t_version >::Inst(), ioQQQ, t_prt::lgPrintTime, t_cpu_i::nCSMismatch, NULL, prt, sys_fopen(), and VHstream().
Referenced by open_data().
STATIC string check_mult_path | ( | const string & | fname, |
const vector< string > & | PathList, | ||
access_scheme | scheme, | ||
bool | lgRead | ||
) |
References AS_SILENT_TRY, ASSERT, DEBUG_ENTRY, fprintf(), ioQQQ, t_trace::lgTrace, NULL, sys_fopen(), TorF(), and trace.
Referenced by open_data().
STATIC void ErrorMessage | ( | const string & | fname, |
const vector< string > & | PathList, | ||
access_scheme | scheme | ||
) |
References AS_OPTIONAL, cdEXIT, cpu, DEBUG_ENTRY, EXIT_FAILURE, t_cpu_i::firstOpen(), fprintf(), t_cpu::i(), ioQQQ, and t_cpu_i::printDataPath().
Referenced by open_data().
bool MyIsnan | ( | const sys_float & | x | ) |
detect quiet and signaling NaNs in single precision FP
bool MyIsnan | ( | const double & | x | ) |
detect quiet and signaling NaNs in double precision FP
FILE* open_data | ( | const string & | fname, |
const string & | mode, | ||
access_scheme | scheme, | ||
string * | rpath | ||
) |
References AS_DEFAULT, AS_LOCAL_ONLY, AS_OPTIONAL, check_data(), check_mult_path(), cpu, DEBUG_ENTRY, ErrorMessage(), t_cpu_i::getPathList(), t_cpu::i(), t_cpu_i::nFileDone, NULL, t_cpu_i::p_assertValidPath(), and sys_fopen().
Referenced by save_img_matrix::addImagePop_FITS(), append_file(), atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), Badnell_rec_init(), cdInput(), cdMain(), cdOutput(), cdRead(), check_grid_file(), CloudyPrintReference(), ContBandsCreate(), CoStarInitialize(), save_img_matrix::createImage_FITS(), save_img_matrix::createImage_PPM(), DatabasePrintReference(), DumpAtmosphere(), fix_grid_file(), GetJenkins09(), GetMetalsDeplete(), GridGatherOutputParallel(), GridGatherOutputSequential(), diatomics::H2_CollidRateRead(), diatomics::H2_Read_hminus_distribution(), diatomics::H2_Read_LTE_cooling_per_H2(), diatomics::H2_ReadDissocEnergies(), diatomics::H2_ReadDissprob(), diatomics::H2_ReadEnergies(), diatomics::H2_ReadTransprob(), HyperfineCreate(), t_yield::init_yield(), InitGrid(), InterpolateGridCoStar(), InterpolateRectGrid(), iso_recomb_setup(), lgCompileAtmosphere(), lgFileReadable(), lgValidASCIIFile(), lgValidIdxFile(), bands_file::load(), LoadIsotopes(), main(), MD5datafile(), MD5file(), mie_read_mix(), mie_read_opc(), mie_read_rfi(), mie_read_szd(), mie_write_opc(), open_abn_file(), optimize_do(), optimize_phymir(), phymir_state< X, Y, NP, NSTR >::p_execute_job_parallel(), DataParser::p_open(), phymir_state< X, Y, NP, NSTR >::p_rd_state(), t_gaunt::p_read_table(), t_mesh::p_ReadResolution(), phymir_state< X, Y, NP, NSTR >::p_wr_state(), ParseInitFile(), ParseTable(), plot_sparsity(), pnegopc(), process_output(), qheat(), RauchInitialize(), RauchReadMPP(), rd_block(), read_data(), read_Helike_cross_sections(), read_Hummer_Storey(), read_level2_lines(), read_mewe_gbar(), diatomics::Read_Mol_Diss_cross_sections(), read_SH98_He1_cross_sections(), read_species_file(), read_UTA_lines(), ReadBadnellAIData(), save_opacity(), saveFITSfile(), SaveGrid(), StarburstInitialize(), t_ADfA::t_ADfA(), vary_input(), and wr_block().
void open_data | ( | fstream & | stream, |
const string & | fname, | ||
ios_base::openmode | mode, | ||
access_scheme | scheme, | ||
string * | rpath | ||
) |
References AS_DEFAULT, AS_LOCAL_ONLY, AS_OPTIONAL, ASSERT, check_data(), check_mult_path(), cpu, DEBUG_ENTRY, ErrorMessage(), t_cpu_i::getPathList(), t_cpu::i(), t_cpu_i::nFileDone, and t_cpu_i::p_assertValidPath().
MPI_File open_data | ( | const string & | fname, |
int | mode, | ||
access_scheme | scheme, | ||
string * | rpath | ||
) |
References AS_DEFAULT, AS_LOCAL_ONLY, AS_OPTIONAL, check_data(), check_mult_path(), cpu, DEBUG_ENTRY, ErrorMessage(), t_cpu_i::getPathList(), t_cpu::i(), MPI_ERR_INTERN, MPI_FILE_NULL, MPI_File_open, mpi_mode_r, MPI_SUCCESS, t_cpu_i::nFileDone, and t_cpu_i::p_assertValidPath().
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()
References cpu, t_cpu_i::Float_SNaN_Value, and t_cpu::i().
Referenced by Amsterdam_Method(), ConvInitSolution(), dqc25c_(), dqc25f_(), invalidate_array(), iter_track::p_clear1(), t_gaunt::p_gauntff_vec(), ParseBlackbody(), ParseCrashDo(), qc25c_(), qc25f_(), and t_hmi::zero().
void set_NaN | ( | sys_float | x[], |
long | n | ||
) |
References cpu, t_cpu_i::Float_SNaN_Value, and t_cpu::i().
void set_NaN | ( | double & | x | ) |
References cpu, t_cpu_i::Double_SNaN_Value, and t_cpu::i().
void set_NaN | ( | double | x[], |
long | n | ||
) |
References cpu, t_cpu_i::Double_SNaN_Value, and t_cpu::i().
|
static |
Referenced by t_cpu::t_cpu(), and t_cpu::~t_cpu().