DirectXMath Library Compiler Directives

Compiler directives tune the functionality that the DirectXMath library uses.

Directive Description
XM_NO_INTRINSICS When XM_NO_INTRINSICS is defined, DirectXMath operations are implemented without using any platform-specific intrinsics. Instead, DirectXMath uses only standard floating point operations. By default, XM_NO_INTRINSICS is not defined.
Note This directive overrides all other directives. Therefore, we recommend that you check for XM_NO_INTRINSICS before you determine the status of XM_ARM_NEON_INTRINSICS or XM_SSE_INTRINSICS.
XM_SSE_INTRINSICS When XM_SSE_INTRINSICS is defined, code is compiled to use supporting SSE and SSE2 on platforms that support these instruction sets. The Windows versions providing SSE intrinsics support both SSE and SSE2. XM_SSE_INTRINSICS has no effect on systems that do not support SSE and SSE2. By default, XM_SSE_INTRINSICS is defined when users compile for a Windows platform. DirectXMath uses the standard compiler defines (_M_IX86 / _M_AMD64) to determine Windows x86 or Windows x64 targets.
XM_ARM_NEON_INTRINSICS This indicates the DirectXMath implementation uses of the ARM-NEON intrinsics. By defualt, XM_ARM_NEON_INTRINSICS is defined when users compile for a Windows RT platform. DirectXMath uses the standard compiler define (_M_ARM, _M_ARM64) to determine this binary target. ARM-NEON intrinsics support is new to DirectXMath and is not supported by XNAMath 2.x.
XM_SSE4_INTRINSICS When you specify this compiler directive, DirectXMath functions are implemented to make use of SSE3 and SSE4.1 instriniscs where applicable; otherwise it uses to SSE/SSE2.
XM_AVX_INTRINSICS This compiler directive is implied when building with /arch:AVX. When you specify this compiler directive, DirectXMath functions are implemented to make use of SSE3, SSE4.1, and AVX 128-bit intrinsics where applicable; otherwise DirectXMath uses SSE/SSE2. When you specify this compiler directive, it also implies XM_SSE4_INTRINSICS and XM_SSE_INTRINSICS, and includes a small subset of SSE3 instructions.
XM_F16C_INTRINSICS This compiler directive is implied when building with /arch:AVX2.When you specify this compiler directive, DirectXMath functions are implemented to make use of SSE3, SSE4.1, AVX 128-bit, and F16C/CVT16 intrinsics where applicable; otherwise DirectXMath uses SSE/SSE2. When you use XM_F16C_INTRINSICS, it implies XM_AVX_INTRINSICS, XM_SSE4_INTRINSICS, and XM_SSE_INTRINSICS. This is the default for _DURANGO projects with DirectXMath 3.05 or later.
XM_VECTORCALL This enables the use of the new _vectorcall calling convention for x86 and x64 targets. It defaults to _XM_VECTORCALL=1 when the compiler supports this feature. You can manually set it to XM_VECTORCALL=0 to always disable it. This compiler directive is specific to DirectXMath for Xbox One, and is not supported in the Windows SDK version. __vectorcall is not supported for ARM or Managed C++.