file new in Git masterIntrinsicsSse4.h
Intrinsics for x86 SSE4.1, SSE4.2 and POPCNT instructions.
#include <smmintrin.h> and
#include <nmmintrin.h> on most compilers except for:
- GCC 4.8, where it contains an additional workaround to make the instructions available with just the CORRADE_
ENABLE_ SSE41 and CORRADE_ ENABLE_ SSE42 function attributes instead of having to specify
-msse4.2for the whole compilation unit. This however can't reliably be done for
-mpopcntbecause then it could not be freely combined with other instruction sets, only used alone. You have to enable these instructions globally in order to use them on GCC 4.8.
- Clang < 7, where
__POPCNT__has to be explicitly defined in order to access the POPCNT instruction
Because GCC puts both the SSE4.1 and the SSE4.2 instructions into the same header and just guards each with a different macro, they have to be included together, unlike with other SSE variants.