mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-07 04:10:08 +00:00
New method: FloatVectorOperations::enableFlushToZeroMode()
This commit is contained in:
parent
5051b2ffcc
commit
239c15845a
2 changed files with 14 additions and 0 deletions
|
|
@ -332,3 +332,12 @@ float JUCE_CALLTYPE FloatVectorOperations::findMaximum (const float* src, int nu
|
|||
return juce::findMaximum (src, num);
|
||||
#endif
|
||||
}
|
||||
|
||||
void JUCE_CALLTYPE FloatVectorOperations::enableFlushToZeroMode (bool shouldEnable) noexcept
|
||||
{
|
||||
#if JUCE_USE_SSE_INTRINSICS
|
||||
if (FloatVectorHelpers::isSSE2Available())
|
||||
_MM_SET_FLUSH_ZERO_MODE (shouldEnable ? _MM_FLUSH_ZERO_ON : _MM_FLUSH_ZERO_OFF);
|
||||
#endif
|
||||
(void) shouldEnable;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@ public:
|
|||
|
||||
/** Finds the maximum value in the given array. */
|
||||
static float JUCE_CALLTYPE findMaximum (const float* src, int numValues) noexcept;
|
||||
|
||||
/** On Intel CPUs, this method enables or disables the SSE flush-to-zero mode.
|
||||
Effectively, this is a wrapper around a call to _MM_SET_FLUSH_ZERO_MODE
|
||||
*/
|
||||
static void JUCE_CALLTYPE enableFlushToZeroMode (bool shouldEnable) noexcept;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue