Functions for CPU flags management. More...
Functions | |
| SIMD_API void | SimdEmpty (void) |
| Clears MMX state for x86 SIMD code paths. More... | |
| SIMD_API SimdBool | SimdGetFastMode (void) |
| Gets the current 'fast mode' state for floating-point subnormal handling. More... | |
| SIMD_API void | SimdSetFastMode (SimdBool value) |
| Sets the current thread's 'fast mode' state for floating-point subnormal handling. More... | |
| SIMD_API void | SimdSetAmxFull (void) |
| Loads the full AMX tile configuration for the current thread. More... | |
Detailed Description
Functions for CPU flags management.
Function Documentation
◆ SimdEmpty()
| void SimdEmpty | ( | void | ) |
Clears MMX state for x86 SIMD code paths.
On supported x86 builds this function executes EMMS (via _mm_empty()) when the SSE4.1 backend is enabled at runtime. In other configurations it does nothing.
◆ SimdGetFastMode()
| SimdBool SimdGetFastMode | ( | void | ) |
Gets the current 'fast mode' state for floating-point subnormal handling.
When 'fast mode' is active, subnormal (denormalized) floating-point values are flushed to zero by the hardware rather than being processed normally, which avoids the significant performance penalty of software-assisted denormal handling.
On x86 platforms with SSE4.1 support, reads the MXCSR register and returns SimdTrue when either the Flush-To-Zero (FTZ, bit 15) or the Denormals-Are-Zero (DAZ, bit 6) bit is set. On ARM platforms with Neon support, reads the FPSCR (AArch32) or FPCR (AArch64) register and returns SimdTrue when the Flush-To-Zero (FTZ, bit 24) bit is set. On platforms without hardware support for this feature, always returns SimdFalse.
- Returns
SimdTrueif fast mode is currently enabled,SimdFalseotherwise.
◆ SimdSetFastMode()
| void SimdSetFastMode | ( | SimdBool | value | ) |
Sets the current thread's 'fast mode' state for floating-point subnormal handling.
When 'fast mode' is enabled, subnormal (denormalized) floating-point values are flushed to zero by the hardware rather than being processed normally, which avoids the significant performance penalty of software-assisted denormal handling.
On x86 platforms with SSE4.1 support, sets or clears both the Flush-To-Zero (FTZ, bit 15) and the Denormals-Are-Zero (DAZ, bit 6) bits in the current thread's MXCSR register. On ARM platforms with Neon support, sets or clears the Flush-To-Zero (FTZ, bit 24) bit in the current thread's FPSCR (AArch32) or FPCR (AArch64) register. Has no effect when this feature is not supported or the corresponding SIMD backend is not enabled at runtime.
- Parameters
-
[in] value - SimdTrueto enable fast mode,SimdFalseto disable it.
◆ SimdSetAmxFull()
| void SimdSetAmxFull | ( | void | ) |
Loads the full AMX tile configuration for the current thread.
On x86 platforms with AMX-BF16 support, this function forces loading of a predefined full AMX tile configuration into the current thread by calling the AMX tile configuration instruction. It is intended for code paths that need the full tile layout used by the library.
Has no effect on platforms without AMX-BF16 support or when the corresponding SIMD backend is not enabled at runtime.