-
Notifications
You must be signed in to change notification settings - Fork 0
/
CompilerHints.h
58 lines (46 loc) · 1.12 KB
/
CompilerHints.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
#ifndef COMPILERHINTS_H
#define COMPILERHINTS_H
#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \
defined(__ECC)
// Intel
#define ALIGN64 __declspec(align(64))
#define RESTRICT restrict
//#define PURE __declspec(const)
#elif defined(__GNUC__)
// GNU C++
#define ALIGN64 __attribute__((aligned(64)))
#define RESTRICT __restrict__
//#define PURE __attribute__ ((pure))
#elif defined(_MSC_VER)
// Microsoft Visual C++
#define ALIGN64 __declspec(align(64))
#define RESTRICT __restrict
//#define PURE
#elif defined(__PGI)
// PGI C++
#define ALIGN64 //__attribute__ ((aligned (64)))
#define RESTRICT restrict
//#define PURE __attribute__ ((pure))
#elif defined(_CRAYC)
// Cray C++
#define ALIGN64 __attribute__((aligned(64)))
#define RESTRICT restrict
//#define PURE __attribute__ ((pure))
#elif defined(__MTA__)
// Cray XMT
#define ALIGN64
#define RESTRICT
//#define PURE
#elif defined(__xlC__)
#define ALIGN64
#define RESTRICT
#elif defined(__xlc__)
#define ALIGN64
#define RESTRICT
#else
#warning "Unknown compiler detected"
#define ALIGN64
#define RESTRICT
//#define PURE
#endif
#endif