Mercurial > hg > segmenter-vamp-plugin
comparison armadillo-2.4.4/include/armadillo_bits/compiler_setup.hpp @ 0:8b6102e2a9b0
Armadillo Library
author | maxzanoni76 <max.zanoni@eecs.qmul.ac.uk> |
---|---|
date | Wed, 11 Apr 2012 09:27:06 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:8b6102e2a9b0 |
---|---|
1 // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) | |
2 // Copyright (C) 2008-2011 Conrad Sanderson | |
3 // | |
4 // This file is part of the Armadillo C++ library. | |
5 // It is provided without any warranty of fitness | |
6 // for any purpose. You can redistribute this file | |
7 // and/or modify it under the terms of the GNU | |
8 // Lesser General Public License (LGPL) as published | |
9 // by the Free Software Foundation, either version 3 | |
10 // of the License or (at your option) any later version. | |
11 // (see http://www.opensource.org/licenses for more info) | |
12 | |
13 | |
14 | |
15 #define arma_hot | |
16 #define arma_cold | |
17 #define arma_pure | |
18 #define arma_const | |
19 #define arma_inline inline | |
20 #define arma_aligned | |
21 #define arma_warn_unused | |
22 #define arma_deprecated | |
23 #define arma_ignore(variable) ((void)(variable)) | |
24 | |
25 | |
26 #if defined(ARMA_BLAS_UNDERSCORE) | |
27 #define arma_fortran2_noprefix(function) function##_ | |
28 #define arma_fortran2_prefix(function) wrapper_##function##_ | |
29 #else | |
30 #define arma_fortran2_prefix(function) wrapper_##function | |
31 #define arma_fortran2_noprefix(function) function | |
32 #endif | |
33 | |
34 #if defined(ARMA_USE_WRAPPER) | |
35 #define arma_fortran(function) arma_fortran2_prefix(function) | |
36 #define arma_atlas(function) wrapper_##function | |
37 #else | |
38 #define arma_fortran(function) arma_fortran2_noprefix(function) | |
39 #define arma_atlas(function) function | |
40 #endif | |
41 | |
42 #define arma_fortran_prefix(function) arma_fortran2_prefix(function) | |
43 #define arma_fortran_noprefix(function) arma_fortran2_noprefix(function) | |
44 | |
45 | |
46 #define ARMA_INCFILE_WRAP(x) <x> | |
47 | |
48 | |
49 #if defined(__INTEL_COMPILER) | |
50 | |
51 #if (__INTEL_COMPILER < 1000) | |
52 #error "*** Need a newer compiler ***" | |
53 #endif | |
54 | |
55 #define ARMA_GOOD_COMPILER | |
56 #undef ARMA_HAVE_STD_TR1 | |
57 | |
58 #if (__INTEL_COMPILER <= 1110) | |
59 #undef ARMA_HAVE_STD_ISFINITE | |
60 #endif | |
61 | |
62 #elif defined(__GNUG__) | |
63 | |
64 #if (__GNUC__ < 4) | |
65 #error "*** Need a newer compiler ***" | |
66 #endif | |
67 | |
68 #define ARMA_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) | |
69 | |
70 #define ARMA_GOOD_COMPILER | |
71 #undef ARMA_HAVE_STD_TR1 | |
72 | |
73 #undef arma_pure | |
74 #undef arma_const | |
75 #undef arma_inline | |
76 #undef arma_aligned | |
77 #undef arma_warn_unused | |
78 #undef arma_deprecated | |
79 | |
80 #define arma_pure __attribute__((pure)) | |
81 #define arma_const __attribute__((const)) | |
82 #define arma_inline inline __attribute__((always_inline)) | |
83 #define arma_aligned __attribute__((aligned)) | |
84 #define arma_warn_unused __attribute__((warn_unused_result)) | |
85 #define arma_deprecated __attribute__((deprecated)) | |
86 | |
87 #if (ARMA_GCC_VERSION >= 40200) | |
88 #if defined(_GLIBCXX_USE_C99_MATH_TR1) && defined(_GLIBCXX_USE_C99_COMPLEX_TR1) | |
89 #define ARMA_HAVE_STD_TR1 | |
90 #endif | |
91 #endif | |
92 | |
93 #if defined(__GXX_EXPERIMENTAL_CXX0X__) | |
94 #undef ARMA_HAVE_STD_TR1 | |
95 | |
96 #if !defined(ARMA_USE_CXX11) | |
97 #define ARMA_USE_CXX11 | |
98 #endif | |
99 #endif | |
100 | |
101 #if defined(__clang__) | |
102 #undef ARMA_HAVE_STD_TR1 | |
103 #endif | |
104 | |
105 #if (ARMA_GCC_VERSION >= 40300) | |
106 #undef arma_hot | |
107 #undef arma_cold | |
108 | |
109 #define arma_hot __attribute__((hot)) | |
110 #define arma_cold __attribute__((cold)) | |
111 #endif | |
112 | |
113 #undef ARMA_GCC_VERSION | |
114 | |
115 #endif | |
116 | |
117 | |
118 #if defined(_MSC_VER) | |
119 | |
120 #if (_MSC_VER < 1500) | |
121 #error "*** Need a newer compiler ***" | |
122 #endif | |
123 | |
124 #undef ARMA_GOOD_COMPILER | |
125 #undef ARMA_HAVE_STD_ISFINITE | |
126 #undef ARMA_HAVE_STD_SNPRINTF | |
127 #undef ARMA_HAVE_LOG1P | |
128 #undef ARMA_HAVE_STD_ISINF | |
129 #undef ARMA_HAVE_STD_ISNAN | |
130 #undef ARMA_HAVE_STD_TR1 | |
131 | |
132 #undef arma_inline | |
133 #define arma_inline inline __forceinline | |
134 | |
135 // #if (_MSC_VER >= 1400) | |
136 // #undef arma_aligned | |
137 // #define arma_aligned __declspec(align(16)) | |
138 // #endif | |
139 | |
140 #endif | |
141 | |
142 | |
143 #if defined(__CUDACC__) | |
144 #undef ARMA_HAVE_STD_ISFINITE | |
145 #undef ARMA_HAVE_STD_SNPRINTF | |
146 #undef ARMA_HAVE_LOG1P | |
147 #undef ARMA_HAVE_STD_ISINF | |
148 #undef ARMA_HAVE_STD_ISNAN | |
149 #undef ARMA_HAVE_STD_TR1 | |
150 #endif | |
151 | |
152 | |
153 #if defined(__SUNPRO_CC) | |
154 #undef ARMA_HAVE_STD_ISFINITE | |
155 #undef ARMA_HAVE_STD_SNPRINTF | |
156 #undef ARMA_HAVE_LOG1P | |
157 #undef ARMA_HAVE_STD_ISINF | |
158 #undef ARMA_HAVE_STD_ISNAN | |
159 #undef ARMA_HAVE_STD_TR1 | |
160 #endif |