-
Notifications
You must be signed in to change notification settings - Fork 9
/
Definitions.h
98 lines (83 loc) · 1.43 KB
/
Definitions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef DEFINITIONS_H
#define DEFINITIONS_H
#ifndef CSTDDEF
#define CSTDDEF <cstddef>
#endif
#ifndef CSTRING
#define CSTRING <cstring>
#endif
#ifndef CFLOAT
#define CFLOAT <cfloat>
#endif
#ifndef CMATH
#define CMATH <cmath>
#endif
#ifndef ALGORITHM
#define ALGORITHM <algorithm>
#endif
#ifndef STRING
#define STRING <string>
#endif
#ifndef CASSERT
#define CASSERT <cassert>
#endif
#ifndef IOSTREAM
#define IOSTREAM <iostream>
#endif
#ifndef IOMANIP
#define IOMANIP <iomanip>
#endif
#include <bitset>
#include IOSTREAM
#include IOMANIP
#include STRING
#include ALGORITHM
#ifdef __sgi
extern "C"
{
#endif
#include CSTDDEF
#include CFLOAT
#include CMATH
#include CSTRING
#include CASSERT
#ifdef __sgi
}
#endif
#include "mpi++.h"
//#define DEBUG_TRACE
namespace Daetk
{
#ifdef __sgi
using ::size_t;
using ::fabs;
using ::sqrt;
using ::pow;
using ::log;
using ::log10;
using ::exp;
#else
using std::size_t;
using std::fabs;
using std::sqrt;
using std::pow;
using std::log;
using std::log10;
using std::exp;
#endif
typedef double real;
//#define USE_SINGLE_PRECISION
#ifdef F77_POST_UNDERSCORE
#define F77NAME(name) name ## _
#else
#define F77NAME(name) name
#endif
#ifndef USE_SINGLE_PRECISION
const double MACHINE_EPSILON=DBL_EPSILON;
const double SQRT_MACHINE_EPSILON=sqrt(MACHINE_EPSILON);
#else
const float MACHINE_EPSILON=FLT_EPSILON;
const float SQRT_MACHINE_EPSILON=sqrt(MACHINE_EPSILON);
#endif
}//Daetk
#endif