Audio Processing Framework (APF)  version 0.3.0
Classes | Functions
apf::dp Namespace Reference

Denormal prevention. More...

Classes

struct  ac< double >
 Add sine component at nyquist frequency (double specialization). More...
 
struct  ac< float >
 Add sine component at nyquist frequency (float specialization). More...
 
struct  dc< double >
 Add DC signal (double specialization). More...
 
struct  dc< float >
 Add DC signal (float specialization). More...
 
struct  none
 Disable denormal prevention. More...
 
struct  quantization< double >
 Quantize denormal numbers (double specialization). More...
 
struct  quantization< float >
 Quantize denormal numbers (float specialization). More...
 
struct  set_zero_1
 Detect denormals and set 0. More...
 
struct  set_zero_2
 Detect denormals and set 0. More...
 
struct  set_zero_3
 Detect denormals and set 0. More...
 

Functions

void ftz_on ()
 Set Flush-To-Zero (FTZ). More...
 
void ftz_off ()
 Unset Flush-To-Zero (FTZ). More...
 
void daz_on ()
 Set Denormals-Are-Zero (DAZ). More...
 
void daz_off ()
 Unset Denormals-Are-Zero (DAZ). More...
 

Detailed Description

Denormal prevention.

See also
Laurent de Soras, "Denormal numbers in floating point signal processing applications": http://ldesoras.free.fr/doc/articles/denormal-en.pdf

Function Documentation

void apf::dp::ftz_on ( )
inline

Set Flush-To-Zero (FTZ).

Note
requires SSE support

Definition at line 197 of file denormalprevention.h.

void apf::dp::ftz_off ( )
inline

Unset Flush-To-Zero (FTZ).

Note
requires SSE support

Definition at line 204 of file denormalprevention.h.

References daz_on().

void apf::dp::daz_on ( )

Set Denormals-Are-Zero (DAZ).

Note
requires SSE3 support

From http://softpixel.com/~cwright/programming/simd/sse.php:

DAZ wasn't available in the first version of SSE. Since setting a reserved bit in MXCSR causes a general protection fault, we need to be able to check the availability of this feature without causing problems. To do this, one needs to set up a 512-byte area of memory to save the SSE state to, using fxsave, and then one needs to inspect bytes 28 through 31 for the MXCSR_MASK value. If bit 6 is set, DAZ is supported, otherwise, it isn't.

Definition at line 221 of file denormalprevention.h.

Referenced by ftz_off().

void apf::dp::daz_off ( )

Unset Denormals-Are-Zero (DAZ).

Note
requires SSE3 support

Definition at line 228 of file denormalprevention.h.