28 #if defined(VC_GCC) && VC_GCC >= 0x40400
29 #define VC_TARGET_NO_SIMD __attribute__((target("no-sse2,no-avx")))
31 #define VC_TARGET_NO_SIMD
41 #if defined(VC_MSVC) && VC_MSVC >= 160040219 // MSVC 2010 SP1 introduced _xgetbv
42 unsigned long long xcrFeatureMask = _xgetbv(_XCR_XFEATURE_ENABLED_MASK);
43 return (xcrFeatureMask & bits) == bits;
44 #elif defined(VC_GNU_ASM) && !defined(VC_NO_XGETBV)
46 asm(
"xgetbv" :
"=a"(eax) :
"c"(0) :
"edx");
47 return (eax & bits) == bits;
101 unsigned int flags = 0;
117 #undef VC_TARGET_NO_SIMD
Support for XOP instructions.
static bool hasXop()
Return whether the CPU supports the XOP instructions.
Namespace for new ROOT classes and functions.
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1 + SSE4.2
static bool hasFma()
Return whether the CPU supports FMA extensions using YMM state.
VC_TARGET_NO_SIMD Vc::Implementation bestImplementationSupported()
Determines the best supported implementation for the current system.
Support for FMA4 instructions.
static void init()
Reads the CPU capabilities and stores them for faster subsequent access.
VC_TARGET_NO_SIMD bool isImplementationSupported(Vc::Implementation impl)
Tests whether the given implementation is supported by the system the code is executing on...
static bool hasFma4()
Return whether the CPU supports the FMA4 instructions.
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1
Support for float16 conversions in hardware.
static bool hasSse42()
Return whether the CPU supports SSE 4.2.
Support for FMA instructions (3 operand variant)
static bool hasSse2()
Return whether the CPU supports SSE2.
static bool hasSse41()
Return whether the CPU supports SSE 4.1.
static bool hasOsxsave()
Return whether the CPU and OS support the XSETBV/XGETBV instructions.
uses only fundamental types
Support for SSE4a instructions.
VC_TARGET_NO_SIMD unsigned int extraInstructionsSupported()
Determines the extra instructions supported by the current CPU.
static bool hasF16c()
Return whether the CPU supports 16-bit floating-point conversion instructions.
static VC_TARGET_NO_SIMD bool xgetbvCheck(unsigned int bits)
static bool hasSse4a()
Return whether the CPU supports SSE4a.
x86 SSE + SSE2 + SSE3 + SSSE3
static bool hasPopcnt()
Return whether the CPU supports the POPCNT instruction.
static bool hasSse3()
Return whether the CPU supports SSE3.
#define VC_TARGET_NO_SIMD
Support for the population count instruction.
Implementation
Enum to identify a certain SIMD instruction set.
static bool hasSsse3()
Return whether the CPU supports SSSE3.
static bool hasAvx()
Return whether the CPU supports AVX.