26 #ifdef __INTEL_COMPILER
27 #define VC_ICC __INTEL_COMPILER_BUILD_DATE
28 #elif defined(__OPENCC__)
30 #elif defined(__clang__)
31 #define VC_CLANG (__clang_major__ * 0x10000 + __clang_minor__ * 0x100 + __clang_patchlevel__)
32 #elif defined(__GNUC__)
33 #define VC_GCC (__GNUC__ * 0x10000 + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
34 #elif defined(_MSC_VER)
35 #define VC_MSVC _MSC_FULL_VER
37 #define VC_UNSUPPORTED_COMPILER 1
41 #if defined VC_MSVC && defined _WIN32
43 #define VC_PASSING_VECTOR_BY_VALUE_IS_BROKEN 1
45 #if defined(__GNUC__) && !defined(VC_NO_INLINE_ASM)
48 #if defined(VC_GCC) && (VC_GCC <= 0x40405 || (VC_GCC >= 0x40500 && VC_GCC <= 0x40502)) && !(VC_GCC == 0x40502 && defined(__GNUC_UBUNTU_VERSION__) && __GNUC_UBUNTU_VERSION__ == 0xb0408)
51 #define VC_MM256_MASKSTORE_WRONG_MASK_TYPE 1
53 #if defined(VC_GCC) && VC_GCC >= 0x40300
54 #define VC_HAVE_ATTRIBUTE_ERROR 1
55 #define VC_HAVE_ATTRIBUTE_WARNING 1
58 #if (defined(__GXX_EXPERIMENTAL_CXX0X__) && VC_GCC >= 0x40600) || __cplusplus >= 201103
61 # if VC_GCC >= 0x40700 // && VC_GCC < 0x408000)
63 # define VC_HAVE_MAX_ALIGN_T 1
65 # elif defined(VC_ICC)
66 # define VC_HAVE_MAX_ALIGN_T 1
67 # elif !defined(VC_CLANG)
69 # define VC_HAVE_STD_MAX_ALIGN_T 1
75 #if (defined(VC_ICC) && VC_ICC >= 20120731) || (defined(VC_MSVC) && VC_MSVC >= 170000000)
76 #define VC_UNCONDITIONAL_AVX2_INTRINSICS 1
83 #define Scalar 0x00100000
84 #define SSE 0x00200000
85 #define SSE2 0x00300000
86 #define SSE3 0x00400000
87 #define SSSE3 0x00500000
88 #define SSE4_1 0x00600000
89 #define SSE4_2 0x00700000
90 #define AVX 0x00800000
92 #define XOP 0x00000001
93 #define FMA4 0x00000002
94 #define F16C 0x00000004
95 #define POPCNT 0x00000008
96 #define SSE4a 0x00000010
97 #define FMA 0x00000020
99 #define IMPL_MASK 0xFFF00000
100 #define EXT_MASK 0x000FFFFF
114 # elif defined(_M_AMD64)
127 # if defined(__AVX__)
128 # define VC_IMPL_AVX 1
130 # if defined(__SSE4_2__)
131 # define VC_IMPL_SSE 1
132 # define VC_IMPL_SSE4_2 1
134 # if defined(__SSE4_1__)
135 # define VC_IMPL_SSE 1
136 # define VC_IMPL_SSE4_1 1
138 # if defined(__SSE3__)
139 # define VC_IMPL_SSE 1
140 # define VC_IMPL_SSE3 1
142 # if defined(__SSSE3__)
143 # define VC_IMPL_SSE 1
144 # define VC_IMPL_SSSE3 1
146 # if defined(__SSE2__)
147 # define VC_IMPL_SSE 1
148 # define VC_IMPL_SSE2 1
151 # if defined(VC_IMPL_SSE)
154 # define VC_IMPL_Scalar 1
157 # if defined(VC_IMPL_AVX) || defined(VC_IMPL_SSE)
159 # define VC_IMPL_FMA4 1
162 # define VC_IMPL_XOP 1
165 # define VC_IMPL_F16C 1
168 # define VC_IMPL_POPCNT 1
171 # define VC_IMPL_SSE4a 1
174 # define VC_IMPL_FMA 1
180 # if (VC_IMPL & IMPL_MASK) == AVX // AVX supersedes SSE
181 # define VC_IMPL_AVX 1
182 # elif (VC_IMPL & IMPL_MASK) == Scalar
183 # define VC_IMPL_Scalar 1
184 # elif (VC_IMPL & IMPL_MASK) == SSE4_2
185 # define VC_IMPL_SSE4_2 1
186 # define VC_IMPL_SSE4_1 1
187 # define VC_IMPL_SSSE3 1
188 # define VC_IMPL_SSE3 1
189 # define VC_IMPL_SSE2 1
190 # define VC_IMPL_SSE 1
191 # elif (VC_IMPL & IMPL_MASK) == SSE4_1
192 # define VC_IMPL_SSE4_1 1
193 # define VC_IMPL_SSSE3 1
194 # define VC_IMPL_SSE3 1
195 # define VC_IMPL_SSE2 1
196 # define VC_IMPL_SSE 1
197 # elif (VC_IMPL & IMPL_MASK) == SSSE3
198 # define VC_IMPL_SSSE3 1
199 # define VC_IMPL_SSE3 1
200 # define VC_IMPL_SSE2 1
201 # define VC_IMPL_SSE 1
202 # elif (VC_IMPL & IMPL_MASK) == SSE3
203 # define VC_IMPL_SSE3 1
204 # define VC_IMPL_SSE2 1
205 # define VC_IMPL_SSE 1
206 # elif (VC_IMPL & IMPL_MASK) == SSE2
207 # define VC_IMPL_SSE2 1
208 # define VC_IMPL_SSE 1
209 # elif (VC_IMPL & IMPL_MASK) == SSE
210 # define VC_IMPL_SSE 1
211 # if defined(__SSE4_2__)
212 # define VC_IMPL_SSE4_2 1
214 # if defined(__SSE4_1__)
215 # define VC_IMPL_SSE4_1 1
217 # if defined(__SSE3__)
218 # define VC_IMPL_SSE3 1
220 # if defined(__SSSE3__)
221 # define VC_IMPL_SSSE3 1
223 # if defined(__SSE2__)
224 # define VC_IMPL_SSE2 1
226 # elif (VC_IMPL & IMPL_MASK) == 0 && (VC_IMPL & SSE4a)
229 # define VC_IMPL_SSE3 1
230 # define VC_IMPL_SSE2 1
231 # define VC_IMPL_SSE 1
234 # define VC_IMPL_XOP 1
236 # if (VC_IMPL & FMA4)
237 # define VC_IMPL_FMA4 1
239 # if (VC_IMPL & F16C)
240 # define VC_IMPL_F16C 1
242 # if (VC_IMPL & POPCNT)
243 # define VC_IMPL_POPCNT 1
245 # if (VC_IMPL & SSE4a)
246 # define VC_IMPL_SSE4a 1
249 # define VC_IMPL_FMA 1
257 # define VC_USE_VEX_CODING 1
260 #if defined(VC_GCC) && VC_GCC < 0x40300 && !defined(VC_IMPL_Scalar)
261 # ifndef VC_DONT_WARN_OLD_GCC
262 # warning "GCC < 4.3 does not have full support for SSE2 intrinsics. Using scalar types/operations only. Define VC_DONT_WARN_OLD_GCC to silence this warning."
267 # undef VC_IMPL_SSE4_1
268 # undef VC_IMPL_SSE4_2
269 # undef VC_IMPL_SSSE3
274 # undef VC_IMPL_POPCNT
275 # undef VC_IMPL_SSE4a
277 # undef VC_USE_VEX_CODING
278 # define VC_IMPL_Scalar 1
281 # if !defined(VC_IMPL_Scalar) && !defined(VC_IMPL_SSE) && !defined(VC_IMPL_AVX)
282 # error "No suitable Vc implementation was selected! Probably VC_IMPL was set to an invalid value."
283 # elif defined(VC_IMPL_SSE) && !defined(VC_IMPL_SSE2)
284 # error "SSE requested but no SSE2 support. Vc needs at least SSE2!"
349 #if __cplusplus >= 201103
350 #define Vc_CONSTEXPR constexpr
351 #elif defined(__GNUC__)
352 #define Vc_CONSTEXPR inline __attribute__((__always_inline__, __const__))
353 #elif defined(VC_MSVC)
354 #define Vc_CONSTEXPR inline __forceinline
356 #define Vc_CONSTEXPR inline
428 #ifdef VC_IMPL_Scalar
429 #define VC_IMPL ::ROOT::Vc::ScalarImpl
430 #elif defined(VC_IMPL_AVX)
431 #define VC_IMPL ::ROOT::Vc::AVXImpl
432 #elif defined(VC_IMPL_SSE4_2)
433 #define VC_IMPL ::ROOT::Vc::SSE42Impl
434 #elif defined(VC_IMPL_SSE4_1)
435 #define VC_IMPL ::ROOT::Vc::SSE41Impl
436 #elif defined(VC_IMPL_SSSE3)
437 #define VC_IMPL ::ROOT::Vc::SSSE3Impl
438 #elif defined(VC_IMPL_SSE3)
439 #define VC_IMPL ::ROOT::Vc::SSE3Impl
440 #elif defined(VC_IMPL_SSE2)
441 #define VC_IMPL ::ROOT::Vc::SSE2Impl
450 typedef ImplementationT<
451 #ifdef VC_USE_VEX_CODING
469 #ifdef VC_IMPL_POPCNT
491 #ifdef VC_HAVE_ATTRIBUTE_WARNING
492 __attribute__((warning(
"\n\tUse of Vc::Vector::operator[] to modify scalar entries is known to miscompile with GCC 4.3.x.\n\tPlease upgrade to a more recent GCC or avoid operator[] altogether.\n\t(This warning adds an unnecessary function call to operator[] which should work around the problem at a little extra cost.)")))
509 #endif // VC_GLOBAL_H
Support for XOP instructions.
ImplementationT< VC_IMPL > CurrentImplementation
static Vc_CONSTEXPR UnalignedFlag the()
Namespace for new ROOT classes and functions.
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1 + SSE4.2
static Vc_CONSTEXPR StreamingAndUnalignedFlag the()
Align on boundary of cache line sizes (e.g.
StreamingAndUnalignedFlag
Support for FMA4 instructions.
void _operator_bracket_warning()
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1
Support for float16 conversions in hardware.
Support for FMA instructions (3 operand variant)
RooCmdArg Warnings(Bool_t flag=kTRUE)
Align on boundary of vector sizes (e.g.
static Vc_CONSTEXPR StreamingAndAlignedFlag the()
HelperImpl< VC_IMPL > Helper
uses only fundamental types
Support for SSE4a instructions.
x86 SSE + SSE2 + SSE3 + SSSE3
Vc_CONSTEXPR StreamingAndUnalignedFlag operator&(UnalignedFlag, StreamingAndAlignedFlag)
MallocAlignment
Enum that specifies the alignment and padding restrictions to use for memory allocation with Vc::mall...
static Vc_CONSTEXPR AlignedFlag the()
Support for the population count instruction.
Implementation
Enum to identify a certain SIMD instruction set.
Align on boundary of page sizes (e.g.
Vc_CONSTEXPR StreamingAndUnalignedFlag operator|(UnalignedFlag, StreamingAndAlignedFlag)
void Error(ErrorHandler_t func, int code, const char *va_(fmt),...)
Write error message and call a handler, if required.
ExtraInstructions
The list of available instructions is not easily described by a linear list of instruction sets...