11#pragma warning( disable : 4127 )
17#define UNUSED __attribute__ ((unused))
22#define INT16_MAX 32767
25#define INT16_MIN (-INT16_MAX - 1)
28#if SHRT_MAX == INT16_MAX
29typedef short int int16;
30#elif INT_MAX == INT16_MAX
33#error failed to define int16, please report this to gary@pa.uky.edu
37#define UINT16_MAX 65535
40#if USHRT_MAX == UINT16_MAX
41typedef unsigned short int uint16;
42#elif UINT_MAX == UINT16_MAX
43typedef unsigned int uint16;
45#error failed to define uint16, please report this to gary@pa.uky.edu
49#define INT32_MAX 2147483647L
52#define INT32_MIN (-INT32_MAX - 1)
55#if INT_MAX == INT32_MAX
57#elif LONG_MAX == INT32_MAX
58typedef long int int32;
60#error failed to define int32, please report this to gary@pa.uky.edu
64#define UINT32_MAX 4294967295UL
67#if UINT_MAX == UINT32_MAX
68typedef unsigned int uint32;
69#elif ULONG_MAX == UINT32_MAX
70typedef unsigned long int uint32;
72#error failed to define uint32, please report this to gary@pa.uky.edu
75#if LONG_MAX > INT32_MAX
84#define INT64_MAX 9223372036854775807L
87#define INT64_MIN (-INT64_MAX - 1L)
89#if LONG_MAX == INT64_MAX
91typedef long int int64;
96#if ULONG_MAX > UINT32_MAX
99#define UINT64_MAX 18446744073709551615UL
101#if ULONG_MAX == UINT64_MAX
103typedef unsigned long int uint64;
142#if defined(_ARCH_PPC) || defined(__POWERPC__) || defined(__powerpc__) || defined(PPC)
153#if defined(unix) || defined(__unix__)
160#if defined(linux) || defined(__linux)
175#if defined(__GNUC__) && ! ( defined(__ICC) || defined(__PATHSCALE__) || defined(__OPENCC__) || defined(__clang__) )
176#define __GNUC_EXCL__ 1
182#define __func__ DEBUG_ENTRY.name()
212const ios_base::openmode
mode_r = ios_base::in;
213const ios_base::openmode
mode_w = ios_base::out | ios_base::trunc;
214const ios_base::openmode
mode_a = ios_base::out | ios_base::app;
215const ios_base::openmode
mode_rp = ios_base::in | ios_base::out;
216const ios_base::openmode
mode_wp = ios_base::in | ios_base::out | ios_base::trunc;
217const ios_base::openmode
mode_ap = ios_base::in | ios_base::out | ios_base::app;
252 struct sigaction p_action;
253 struct sigaction p_default;
294 const struct sigaction* action()
const {
return &p_action; }
295 const struct sigaction* deflt()
const {
return &p_default; }
306 sigaction( SIGABRT, deflt(), NULL );
308 sigaction( SIGABRT, action(), NULL );
312 signal( SIGABRT, SIG_DFL );
336 friend void open_data( fstream& stream,
const char* fname, ios_base::openmode mode,
access_scheme scheme );
340 friend void set_NaN(
double &x);
341 friend void set_NaN(
double x[],
long n);
379#define NORETURN __declspec(noreturn)
380#elif defined(__GNUC__) || ( defined(__INTEL_COMPILER) && defined(__linux__) )
381#define NORETURN __attribute__ ((noreturn))
387#define UNLIKELY(x) (x)
391#define UNLIKELY(x) __builtin_expect((x),0)
394#define RESTRICT __restrict
402#define DO_EXPAND(VAL) VAL ## 1
403#define EXPAND(VAL) DO_EXPAND(VAL)
408#if defined __INTEL_COMPILER
410# define __COMP_VER __INTEL_COMPILER
414#elif defined __PATHSCALE__
415# define __COMP "pathCC"
416# define __COMP_VER __PATHCC__ * 100 + __PATHCC_MINOR__ * 10 + __PATHCC_PATCHLEVEL__
420#elif defined __OPENCC__
421# define __COMP "Open64"
422# if EXPAND(__OPENCC_PATCHLEVEL__) == 1
423# define __COMP_VER __OPENCC__ * 100 + __OPENCC_MINOR__ * 10
425# define __COMP_VER __OPENCC__ * 100 + __OPENCC_MINOR__ * 10 + __OPENCC_PATCHLEVEL__
430#elif defined __clang__
431# define __COMP "clang++"
432# define __COMP_VER __clang_major__ * 100 + __clang_minor__ * 10 + __clang_patchlevel__
435#elif defined __GNUC__
437# if defined(__GNUC_PATCHLEVEL__)
438# define __COMP_VER (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
440# define __COMP_VER (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
444# define __COMP "Portland Group"
445# if defined(__PGIC__)
446# define __COMP_VER (__PGIC__ * 100 + __PGIC_MINOR__ * 10 + __PGIC_PATCHLEVEL__)
453#elif defined(__sgi) && defined(_COMPILER_VERSION)
454# define __COMP "MIPSpro"
455# define __COMP_VER _COMPILER_VERSION
458#elif defined __HP_aCC
459# define __COMP "HP aCC"
460# define __COMP_VER __HP_aCC
464# define __COMP "DEC CC"
465# define __COMP_VER __DECC_VER
468#elif defined _MSC_VER
470# define __COMP_VER _MSC_VER
473#elif defined __SUNPRO_CC
474# define __COMP "Solaris Studio"
475# define __COMP_VER __SUNPRO_CC
479# define __COMP "unknown"
487# define __OS "Linux (IA32)"
488# elif defined __amd64
489# define __OS "Linux (AMD64)"
491# define __OS "Linux (IA64)"
492# elif defined __ppc__
493# define __OS "Linux (PowerPC)"
495# define __OS "Linux (other)"
499#elif defined macintosh
500# define __OS "Mac OS 9"
503#elif defined __MACOSX__
504# define __OS "Mac OS X"
507#elif defined __APPLE__
508# define __OS "Apple MacOS"
516# define __OS "Solaris"
524# define __OS "Ultrix"
527#elif defined __FreeBSD__
528# define __OS "FreeBSD"
530#elif defined __NetBSD__
531# define __OS "NetBSD"
533#elif defined __OpenBSD__
534# define __OS "OpenBSD"
546#elif defined __CYGWIN__
547# define __OS "Cygwin"
555# define __OS "unknown"
561# if defined(__GNUC_EXCL__) && ((__GNUC__ == 2 && __GNUC_MINOR__ == 96) || (__GNUC__ == 3 && __GNUC_MINOR__ == 4))
562# error "This g++ version cannot compile Cloudy and must not be used! Please update g++ to a functional version. See http://wiki.nublado.org/wiki/CompilingCloudyC13 for more details."
565# if __INTEL_COMPILER >= 1200 && __INTEL_COMPILER < 1300
566# error "This icc version cannot compile Cloudy and must not be used! Please use a functional version of icc, or g++. See http://wiki.nublado.org/wiki/CompilingCloudyC13 for more details."
571#pragma warning( default : 4127 )
void set_MPISingleRankMode(bool mode)
const string & chExitStatus(exit_type s) const
int32 Double_SNaN_Value[2]
void setAssertAbort(bool val)
const char * host_name() const
sys_float min_float() const
void set_signal_handlers()
union t_cpu_i::@054004306043002077260303305210015065171251205067 endian
bool lgAssertAbort() const
double min_double() const
bool lgMPISingleRankMode() const
static void signal_handler(int sig)
bool little_endian() const
void getPathList(const char *fname, vector< string > &PathList, access_scheme scheme) const
void enable_traps() const
friend void set_NaN(sys_float &x)
bool p_lgMPISingleRankMode
friend FILE * open_data(const char *fname, const char *mode, access_scheme scheme)
vector< string > p_exit_status
void printDataPath() const
char chDirSeparator() const
vector< string > chSearchPath
const ios_base::openmode mode_r
const ios_base::openmode mode_a
UNUSED const realnum BIGFLOAT
const ios_base::openmode UNUSED mode_apb
bool MyIsnan(const sys_float &x)
const ios_base::openmode UNUSED mode_wpb
const ios_base::openmode UNUSED mode_rpb
const ios_base::openmode mode_rp
const ios_base::openmode mode_w
const ios_base::openmode UNUSED mode_rb
void set_NaN(sys_float &x)
FILE * open_data(const char *fname, const char *mode, access_scheme scheme=AS_DATA_ONLY)
const ios_base::openmode UNUSED mode_wb
const ios_base::openmode mode_wp
const ios_base::openmode UNUSED mode_ab
const ios_base::openmode mode_ap