Set the FTZ and DAZ Flags
In Intel® processors, the flush-to-zero (
FTZ
) and
denormals
-are-zero (DAZ
) flags in the
MXCSR
register are used to control floating-point calculations. Intel® Streaming SIMD Extensions (Intel® SSE) and Intel® Advanced Vector Extensions (Intel® AVX) instructions, including scalar and vector instructions, benefit from enabling the
FTZ
and
DAZ
flags. Floating-point computations using the Intel® SSE and Intel® AVX instructions are accelerated when the
FTZ
and
DAZ
flags are enabled. This improves the application's performance.
Manually set the flags with the following macros:
Feature
| Examples
|
---|---|
Enable
FTZ | _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON) |
Enable
DAZ | _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON) |
The prototypes for these macros are in
xmmintrin.h
(FTZ
) and
pmmintrin.h
(DAZ
).