-
Notifications
You must be signed in to change notification settings - Fork 7
/
global.realdef.h
53 lines (42 loc) · 1.48 KB
/
global.realdef.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
// autoparallelization
// use icc and -parallel to try autoparallelization (must have -O2 or -O3)
// doesn't work except for a few trivial loops
// for multi-core, use icc and -openmp as compiler option for directives
// export OMP_NUM_THREADS=2
//#pragma omp parallel for private( privIndx, privDbl ) reduction( + : globalCount )
// size of data type used for all floats
#define FLOATTYPE 0
#define DOUBLETYPE 1
#define LONGDOUBLETYPE 2
#define LONGLONGINTTYPE 3
#define INTTYPE 4
#define CHARTYPE 5
/////////////////////////////////////////////////////
//
// fundamental to set real type's for variables
// define your user type here
// (normal non-sensitive or performance critical datatypes)
#define REALTYPE DOUBLETYPE
// (non-perf critical or sensitive data types)
#define SENSITIVE DOUBLETYPE
// WE ASSUME SENSITIVE>=REALTYPE !
// counter (integer) stuff where counts can exceed integer (2 billion)
#define COUNTTYPE DOUBLETYPE // can't make long long int work, so use double
//#define COUNTTYPE LONGLONGINTTYPE // can't make long long int work, so use double
// type for pflags
#define PFLAGTYPE CHARTYPE
// need not change below datatype stuff
#if(REALTYPE==FLOATTYPE)
#define FTYPE float
#elif(REALTYPE==DOUBLETYPE)
#define FTYPE double
#elif(REALTYPE==LONGDOUBLETYPE)
#define FTYPE long double
#endif
#if(SENSITIVE==FLOATTYPE) // for sensitive counters
#define SFTYPE float
#elif(SENSITIVE==DOUBLETYPE)
#define SFTYPE double
#elif(SENSITIVE==LONGDOUBLETYPE)
#define SFTYPE long double
#endif