\hypertarget{a00842_source}{}\doxysection{AAX\+\_\+\+Denormal.\+h}
\label{a00842_source}\index{AAX\_Denormal.h@{AAX\_Denormal.h}}
\mbox{\hyperlink{a00842}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00002\ \textcolor{comment}{/*}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ \ Copyright\ 2014-\/2016,\ 2019,\ 2021,\ 2023\ Avid\ Technology,\ Inc.}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ \ All\ rights\ reserved.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ \ CONFIDENTIAL:\ this\ document\ contains\ confidential\ information\ of\ Avid.\ Do}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ \ not\ disclose\ to\ any\ third\ party.\ Use\ of\ the\ information\ contained\ in\ this}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ \ document\ is\ subject\ to\ an\ Avid\ SDK\ license.}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00017\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#ifndef\ AAX\_DENORMAL\_H}}
\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#define\ AAX\_DENORMAL\_H}}
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00024\ \textcolor{comment}{//\ AAX\ Includes}}
\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00533}{AAX.h}}"{}}}
\DoxyCodeLine{00026\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00833}{AAX\_PlatformOptimizationConstants.h}}"{}}}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ \textcolor{preprocessor}{\#if\ !\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00030\ \textcolor{preprocessor}{\#include\ <limits>}}
\DoxyCodeLine{00031\ \textcolor{preprocessor}{\#include\ <math.h>}}
\DoxyCodeLine{00032\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ !\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ }
\DoxyCodeLine{00053\ \textcolor{preprocessor}{\#if\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00054\ }
\DoxyCodeLine{00055\ \textcolor{comment}{//\ TODO:\ Currently\ noop\ on\ TI}}
\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00057\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00058\ }
\DoxyCodeLine{00059\ \textcolor{preprocessor}{\#elif\ ((defined\ \_MSC\_VER)\ ||\ defined(WINDOWS\_VERSION))}}
\DoxyCodeLine{00060\ \textcolor{comment}{//\ Visual\ Studio}}
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \textcolor{comment}{//\ Note:\ In\ Pro\ Tools\ 11\ and\ higher\ for\ Windows,\ DAZ\ is\ turned\ on\ for\ all\ plug-\/in\ processing\ threads}}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00064\ \textcolor{comment}{//\ FIXME:\ These\ macros\ are\ currently\ noop\ on\ Windows\ because\ of\ compiler\ problems\ when\ intrin.h\ is\ included.\ Investigate\ using\ \_controlfp(\_DN\_FLUSH,\ \_MCW\_DN)\ instead}}
\DoxyCodeLine{00065\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00066\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00067\ \textcolor{comment}{//\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ AAX\_StDenormalAsZeroFlagsOff\ computeDenormalFlagsScope\ \#\#\ \_\_LINE\_\_\ ;\ do\ \{\}\ while\ (0)}}
\DoxyCodeLine{00068\ \textcolor{comment}{//\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ AAX\_StDenormalAsZeroFlagsOn\ denormalAsZeroFlagsScope\ \#\#\ \_\_LINE\_\_\ ;\ do\ \{\}\ while\ (0)}}
\DoxyCodeLine{00069\ \textcolor{comment}{//}}
\DoxyCodeLine{00070\ \textcolor{comment}{//\#include\ <Windows.h>}}
\DoxyCodeLine{00071\ \textcolor{comment}{//\#include\ <mmintrin.h>}}
\DoxyCodeLine{00072\ \textcolor{comment}{//}}
\DoxyCodeLine{00078\ \textcolor{comment}{}\textcolor{comment}{//const\ unsigned\ gMXCSRFlags\_DAZFZ\ =\ 0x00008040;}}
\DoxyCodeLine{00079\ \textcolor{comment}{//}}
\DoxyCodeLine{00081\ \textcolor{comment}{}\textcolor{comment}{//struct\ AAX\_StDenormalAsZeroFlagsOn}}
\DoxyCodeLine{00082\ \textcolor{comment}{//\{}}
\DoxyCodeLine{00083\ \textcolor{comment}{//public:}}
\DoxyCodeLine{00084\ \textcolor{comment}{//\ \ AAX\_StDenormalAsZeroFlagsOn()}}
\DoxyCodeLine{00085\ \textcolor{comment}{//\ \ :\ mSSESupported(IsProcessorFeaturePresent(PF\_XMMI\_INSTRUCTIONS\_AVAILABLE))}}
\DoxyCodeLine{00086\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00087\ \textcolor{comment}{//\ \ \ \ \ \ if\ (mSSESupported)\ \{\ set\_flags();\ \}}}
\DoxyCodeLine{00088\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00089\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00090\ \textcolor{comment}{//\ \ \string~AAX\_StDenormalAsZeroFlagsOn()}}
\DoxyCodeLine{00091\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00092\ \textcolor{comment}{//\ \ \ \ \ \ if\ (mSSESupported)\ \{\ reset\_flags();\ \}}}
\DoxyCodeLine{00093\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00094\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00095\ \textcolor{comment}{//private:}}
\DoxyCodeLine{00096\ \textcolor{comment}{//\ \ void\ set\_flags()}}
\DoxyCodeLine{00097\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00098\ \textcolor{comment}{//\ \ \ \ \ \ mPrevFlags\ =\ \_mm\_getcsr();}}
\DoxyCodeLine{00099\ \textcolor{comment}{//\ \ \ \ \ \ unsigned\ newFlags\ =\ mPrevFlags\ |\ gMXCSRFlags\_DAZFZ;}}
\DoxyCodeLine{00100\ \textcolor{comment}{//\ \ \ \ \ \ \_mm\_setcsr(newFlags);}}
\DoxyCodeLine{00101\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00102\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00103\ \textcolor{comment}{//\ \ void\ reset\_flags()}}
\DoxyCodeLine{00104\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00105\ \textcolor{comment}{//\ \ \ \ \ \ \_mm\_setcsr(mPrevFlags);}}
\DoxyCodeLine{00106\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00107\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00108\ \textcolor{comment}{//\ \ unsigned\ mPrevFlags;}}
\DoxyCodeLine{00109\ \textcolor{comment}{//\ \ const\ bool\ mSSESupported;}}
\DoxyCodeLine{00110\ \textcolor{comment}{//\};}}
\DoxyCodeLine{00111\ \textcolor{comment}{//}}
\DoxyCodeLine{00113\ \textcolor{comment}{}\textcolor{comment}{//struct\ AAX\_StDenormalAsZeroFlagsOff}}
\DoxyCodeLine{00114\ \textcolor{comment}{//\{}}
\DoxyCodeLine{00115\ \textcolor{comment}{//public:}}
\DoxyCodeLine{00116\ \textcolor{comment}{//\ \ AAX\_StDenormalAsZeroFlagsOff()}}
\DoxyCodeLine{00117\ \textcolor{comment}{//\ \ :\ mSSESupported(IsProcessorFeaturePresent(PF\_XMMI\_INSTRUCTIONS\_AVAILABLE))}}
\DoxyCodeLine{00118\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00119\ \textcolor{comment}{//\ \ \ \ \ \ if\ (mSSESupported)\ \{\ set\_flags();\ \}}}
\DoxyCodeLine{00120\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00121\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00122\ \textcolor{comment}{//\ \ \string~AAX\_StDenormalAsZeroFlagsOff()}}
\DoxyCodeLine{00123\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00124\ \textcolor{comment}{//\ \ \ \ \ \ if\ (mSSESupported)\ \{\ reset\_flags();\ \}}}
\DoxyCodeLine{00125\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00126\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00127\ \textcolor{comment}{//private:}}
\DoxyCodeLine{00128\ \textcolor{comment}{//\ \ void\ set\_flags()}}
\DoxyCodeLine{00129\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00130\ \textcolor{comment}{//\ \ \ \ \ \ mPrevFlags\ =\ \_mm\_getcsr();}}
\DoxyCodeLine{00131\ \textcolor{comment}{//\ \ \ \ \ \ unsigned\ newFlags\ =\ mPrevFlags\ \&\ (\string~gMXCSRFlags\_DAZFZ);}}
\DoxyCodeLine{00132\ \textcolor{comment}{//\ \ \ \ \ \ \_mm\_setcsr(newFlags);}}
\DoxyCodeLine{00133\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00134\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00135\ \textcolor{comment}{//\ \ void\ reset\_flags()}}
\DoxyCodeLine{00136\ \textcolor{comment}{//\ \ \{}}
\DoxyCodeLine{00137\ \textcolor{comment}{//\ \ \ \ \ \ \_mm\_setcsr(mPrevFlags);}}
\DoxyCodeLine{00138\ \textcolor{comment}{//\ \ \}}}
\DoxyCodeLine{00139\ \textcolor{comment}{//\ \ }}
\DoxyCodeLine{00140\ \textcolor{comment}{//\ \ unsigned\ mPrevFlags;}}
\DoxyCodeLine{00141\ \textcolor{comment}{//\ \ const\ bool\ mSSESupported;}}
\DoxyCodeLine{00142\ \textcolor{comment}{//\};}}
\DoxyCodeLine{00143\ }
\DoxyCodeLine{00144\ }
\DoxyCodeLine{00145\ \textcolor{preprocessor}{\#elif\ defined(\_\_linux\_\_)}}
\DoxyCodeLine{00146\ \textcolor{comment}{//\ Linux}}
\DoxyCodeLine{00147\ }
\DoxyCodeLine{00148\ \textcolor{comment}{//\ TODO:\ Currently\ noop\ on\ Linux}}
\DoxyCodeLine{00149\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00150\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ \textcolor{preprocessor}{\#elif\ (defined\ (\_\_GNUC\_\_)\ ||\ defined(MAC\_VERSION))}}
\DoxyCodeLine{00153\ \textcolor{comment}{//\ GCC\ /\ macOS}}
\DoxyCodeLine{00154\ }
\DoxyCodeLine{00155\ \textcolor{comment}{//\ Note:\ In\ Pro\ Tools\ 11\ through\ Pro\ Tools\ 12.6\ on\ macOS,\ DAZ\ is\ turned\ off\ for\ all\ plug-\/in\ processing\ threads}}
\DoxyCodeLine{00156\ }
\DoxyCodeLine{00157\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ AAX\_StDenormalAsZeroFlagsOff\ computeDenormalFlagsScope\ \#\#\ \_\_LINE\_\_\ ;\ do\ \{\}\ while\ (0)}}
\DoxyCodeLine{00158\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ AAX\_StDenormalAsZeroFlagsOn\ denormalAsZeroFlagsScope\ \#\#\ \_\_LINE\_\_\ ;\ do\ \{\}\ while\ (0)}}
\DoxyCodeLine{00159\ }
\DoxyCodeLine{00160\ \textcolor{preprocessor}{\#include\ <fenv.h>}}
\DoxyCodeLine{00161\ \textcolor{keyword}{struct\ }AAX\_StDenormalAsZeroFlagsOn}
\DoxyCodeLine{00162\ \{}
\DoxyCodeLine{00163\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00164\ \ \ \ \ AAX\_StDenormalAsZeroFlagsOn()\ \{\ set\_flags();\ \}}
\DoxyCodeLine{00165\ \ \ \ \ \string~AAX\_StDenormalAsZeroFlagsOn()\ \{\ reset\_flags();\ \}}
\DoxyCodeLine{00166\ \ \ \ \ }
\DoxyCodeLine{00167\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00168\ \textcolor{preprocessor}{\#if\ !defined(\_\_arm64\_\_)}}
\DoxyCodeLine{00169\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_flags()\ \{\ fegetenv(\&mPrevFlags);\ fesetenv(FE\_DFL\_DISABLE\_SSE\_DENORMS\_ENV);\ \}}
\DoxyCodeLine{00170\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00171\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_flags()\ \{\ fegetenv(\&mPrevFlags);\ fesetenv(FE\_DFL\_DISABLE\_DENORMS\_ENV);\ \}}
\DoxyCodeLine{00172\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00173\ \ \ \ \ \textcolor{keywordtype}{void}\ reset\_flags()\ \{\ fesetenv(\&mPrevFlags);\ \}}
\DoxyCodeLine{00174\ \ \ \ \ fenv\_t\ mPrevFlags;}
\DoxyCodeLine{00175\ \};}
\DoxyCodeLine{00176\ \textcolor{keyword}{struct\ }AAX\_StDenormalAsZeroFlagsOff}
\DoxyCodeLine{00177\ \{}
\DoxyCodeLine{00178\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00179\ \ \ \ \ AAX\_StDenormalAsZeroFlagsOff()\ \{\ set\_flags();\ \}}
\DoxyCodeLine{00180\ \ \ \ \ \string~AAX\_StDenormalAsZeroFlagsOff()\ \{\ reset\_flags();\ \}}
\DoxyCodeLine{00181\ \ \ \ \ }
\DoxyCodeLine{00182\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00183\ \ \ \ \ \textcolor{keywordtype}{void}\ set\_flags()\ \{\ fegetenv(\&mPrevFlags);\ fesetenv(FE\_DFL\_ENV);\ \}\ \textcolor{comment}{//\ assuming\ that\ FE\_DFL\_ENV\ are\ the\ flags\ that\ we\ want\ here}}
\DoxyCodeLine{00184\ \ \ \ \ \textcolor{keywordtype}{void}\ reset\_flags()\ \{\ fesetenv(\&mPrevFlags);\ \}}
\DoxyCodeLine{00185\ \ \ \ \ fenv\_t\ mPrevFlags;}
\DoxyCodeLine{00186\ \};}
\DoxyCodeLine{00187\ }
\DoxyCodeLine{00188\ }
\DoxyCodeLine{00189\ }
\DoxyCodeLine{00190\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00191\ }
\DoxyCodeLine{00192\ \textcolor{preprocessor}{\#error\ AAX\_SCOPE\_COMPUTE\_DENORMALS\ is\ not\ defined\ for\ this\ compiler}}
\DoxyCodeLine{00193\ \textcolor{preprocessor}{\#error\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO\ is\ not\ defined\ for\ this\ compiler}}
\DoxyCodeLine{00194\ }
\DoxyCodeLine{00195\ \textcolor{comment}{//\ Just\ for\ Doxygen}}
\DoxyCodeLine{00196\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_COMPUTE\_DENORMALS()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00197\ \textcolor{preprocessor}{\#define\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO()\ do\ \{\}\ while(0)}}
\DoxyCodeLine{00198\ }
\DoxyCodeLine{00199\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ End\ compiler\ selection\ for\ AAX\_SCOPE\_COMPUTE\_DENORMALS\ /\ AAX\_SCOPE\_DENORMALS\_AS\_ZERO\ definition}}
\DoxyCodeLine{00200\ }
\DoxyCodeLine{00201\ }
\DoxyCodeLine{00202\ }
\DoxyCodeLine{00203\ }
\DoxyCodeLine{00204\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{a00935}{AAX}}}
\DoxyCodeLine{00205\ \{}
\DoxyCodeLine{00206\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{a00935_a5c2e1bff2891a4b11252759e152cf520}{cDenormalAvoidanceOffset}}=3.0e-\/34;}
\DoxyCodeLine{00207\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ \mbox{\hyperlink{a00935_ae3a66eee97cfe006ffbf11f901ddd286}{cFloatDenormalAvoidanceOffset}}=3.0e-\/20f;\ \ \ \ \textcolor{comment}{//This\ number\ is\ emprically\ derived\ with\ minimal\ trial\ and\ error.}}
\DoxyCodeLine{00208\ }
\DoxyCodeLine{00209\ \textcolor{preprocessor}{\#if\ !\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00210\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ cMinimumNormalFloat\ =\ std::numeric\_limits<float>::min();}
\DoxyCodeLine{00211\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00212\ \ \ \ \ }
\DoxyCodeLine{00222\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a00935_aaf103dc75b68b6c4f6792dd26f9b4fd0}{DeDenormal}}(\textcolor{keywordtype}{double}\ \&iValue)}
\DoxyCodeLine{00223\ \ \ \ \ \{}
\DoxyCodeLine{00224\ \textcolor{preprocessor}{\#if\ defined(WINDOWS\_VERSION)\ ||\ defined(MAC\_VERSION)\ ||\ defined(LINUX\_VERSION)}}
\DoxyCodeLine{00225\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(iValue\ <\ cDenormalAvoidanceOffset\ \&\&\ iValue\ >\ -\/\mbox{\hyperlink{a00935_a5c2e1bff2891a4b11252759e152cf520}{cDenormalAvoidanceOffset}})\ iValue=0.0;}
\DoxyCodeLine{00226\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00227\ \ \ \ \ \}}
\DoxyCodeLine{00228\ \ \ \ \ }
\DoxyCodeLine{00231\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a00935_aaf103dc75b68b6c4f6792dd26f9b4fd0}{DeDenormal}}(\textcolor{keywordtype}{float}\ \&iValue)}
\DoxyCodeLine{00232\ \ \ \ \ \{}
\DoxyCodeLine{00233\ \textcolor{preprocessor}{\#if\ defined(WINDOWS\_VERSION)\ ||\ defined(MAC\_VERSION)\ ||\ defined(LINUX\_VERSION)}}
\DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(iValue\ <\ cFloatDenormalAvoidanceOffset\ \&\&\ iValue\ >\ -\/\mbox{\hyperlink{a00935_ae3a66eee97cfe006ffbf11f901ddd286}{cFloatDenormalAvoidanceOffset}})\ iValue=0.0f;}
\DoxyCodeLine{00235\ \textcolor{preprocessor}{\#endif\ }}
\DoxyCodeLine{00236\ \ \ \ \ \}}
\DoxyCodeLine{00237\ \ \ \ \ }
\DoxyCodeLine{00238\ \textcolor{preprocessor}{\#if\ AAX\_CPP11\_SUPPORT}}
\DoxyCodeLine{00241\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{float}\ \mbox{\hyperlink{a00935_aaf103dc75b68b6c4f6792dd26f9b4fd0}{DeDenormal}}(\textcolor{keywordtype}{float}\ \&\&iValue)}
\DoxyCodeLine{00242\ \ \ \ \ \{}
\DoxyCodeLine{00243\ \textcolor{preprocessor}{\#if\ defined(WINDOWS\_VERSION)\ ||\ defined(MAC\_VERSION)\ ||\ defined(LINUX\_VERSION)}}
\DoxyCodeLine{00244\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (iValue\ <\ cFloatDenormalAvoidanceOffset\ \&\&\ iValue\ >\ -\/\mbox{\hyperlink{a00935_ae3a66eee97cfe006ffbf11f901ddd286}{cFloatDenormalAvoidanceOffset}})\ ?\ 0.f\ :\ iValue;}
\DoxyCodeLine{00245\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00246\ \ \ \ \ \}}
\DoxyCodeLine{00247\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ AAX\_CPP11\_SUPPORT}}
\DoxyCodeLine{00248\ \ \ \ \ }
\DoxyCodeLine{00253\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a00935_ac52b6214a1de32e59b90ddbc1878e515}{DeDenormalFine}}(\textcolor{keywordtype}{float}\ \&iValue)}
\DoxyCodeLine{00254\ \ \ \ \ \{}
\DoxyCodeLine{00255\ \textcolor{preprocessor}{\#if\ !\ defined(\ \_TMS320C6X\ )}}
\DoxyCodeLine{00256\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(iValue\ <\ cMinimumNormalFloat\ \&\&\ iValue\ >\ -\/cMinimumNormalFloat)\ iValue=0.0f;}
\DoxyCodeLine{00257\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00258\ \ \ \ \ \}}
\DoxyCodeLine{00259\ \ \ \ \ }
\DoxyCodeLine{00270\ \ \ \ \ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a00935_a73dd9a17abecc28625c4d34279e4534f}{FilterDenormals}}(\textcolor{keywordtype}{float}*\ inSamples,\ int32\_t\ inLength)}
\DoxyCodeLine{00271\ \ \ \ \ \{}
\DoxyCodeLine{00272\ \ \ \ \ \ \ \ \ \textcolor{comment}{//TODO:\ Implement\ optimized\ versions\ for\ TI\ and\ SSE}}
\DoxyCodeLine{00273\ \textcolor{preprocessor}{\#if\ !\ defined(\ \_TMS320C6X\ )\ }\textcolor{comment}{//\ Not\ yet\ implemented\ for\ TI}}
\DoxyCodeLine{00274\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}(\ int32\_t\ i\ =\ 0;\ i\ <\ inLength;\ ++i\ )}
\DoxyCodeLine{00275\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00276\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ curFloat\ =\ *inSamples;}
\DoxyCodeLine{00277\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}(\ \mbox{\hyperlink{a00935_a7fc4d4cd59850b8b875d085467ff5850}{fabsf}}(curFloat)\ <\ cMinimumNormalFloat\ )}
\DoxyCodeLine{00278\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ curFloat\ =\ 0.0f;}
\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ \ \ \ \ *(inSamples++)\ =\ curFloat;}
\DoxyCodeLine{00280\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00281\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00282\ \ \ \ \ \}}
\DoxyCodeLine{00283\ }
\DoxyCodeLine{00284\ \}\ \textcolor{comment}{//\ namespace\ AAX}}
\DoxyCodeLine{00285\ }
\DoxyCodeLine{00286\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ AAX\_QUANTIZE\_H}}

\end{DoxyCode}
