Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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. 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 default, _XM_ARM_NEON_INTRINSICS_ is defined when users compile for a Windows on ARM / ARM64 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_SSE3_INTRINSICS_ | New for DirectXMath 3.10. When you specify this compiler directive, DirectXMath functions are implemented to make use of SSE3 intrinsics where applicable; otherwise it uses SSE/SSE2. |
_XM_SSE4_INTRINSICS_ | New for DirectMath 3.09. When you specify this compiler directive, DirectXMath functions are implemented to make use of SSE3 and SSE4.1 intrinsics where applicable; otherwise it uses SSE/SSE2. When you specify this compiler directive, it also implies _XM_SSE3_INTRINSICS_ and _XM_SSE_INTRINSICS_. |
_XM_AVX_INTRINSICS_ | New for DirectXMath 3.09. Use of /arch:AVX will enable this directive. 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_SSE3_INTRINSICS, _XM_SSE4_INTRINSICS_, and _XM_SSE_INTRINSICS_, and includes a small subset of SSE3 instructions. |
XM_AVX2_INTRINSICS_ | New for DirectXMath 3.11. Use of /arch:AVX2 enables this directive. When you specify this compiler directive, DirectXMath functions make use of AVX2, F16C/CVT16, FMA3, AVX 128-bit, SSE4.1, and SSE3 intrinsics where applicable. When you use _XM_AVX2_INTRINSICS_, it implies _XM_F16C_INTRINSICS_, _XM_FMA3_INTRINSICS_, _XM_AVX_INTRINSICS_, _XM_SSE_INTRINSICS_, _XM_SSE3_INTRINSICS_, and _XM_SSE4_INTRINSICS_. |
_XM_F16C_INTRINSICS_ | New for DirectXMath 3.09. 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_SSE_INTRINSICS_, _XM_SSE3_INTRINSICS_, and _XM_SSE4_INTRINSICS_. |
_XM_FMA3_INTRINSICS_ | New for DirectXMath 3.11. When you specify this compiler directive, DirectXMath functions will make use of SSE3, SSE4.1, AVX 128-bit, and FMA3 intrinsics where applicable; otherwise DirectXMath uses SSE/SSE2. When you use _XM_FMA3_INTRINSICS_, it implies _XM_AVX_INTRINSICS_, _XM_SSE_INTRINSICS_, _XM_SSE3_INTRINSICS_, and _XM_SSE4_INTRINSICS_. |
_XM_VECTORCALL_ | This enables the use of the __vectorcall calling convention for Windows x86 or Windows 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. __vectorcall is not supported for the Windows on ARM / ARM64 platform or Managed C++. |
_XM_SVML_INTRINSICS_ | New for DirectXMath 3.16. With VS 2019 or later, this enables the library to use the IntelĀ® Short Vector Matrix Library for x86/x64. |
Related topics