Contents

class

SushiDSP::DenormalGuard

Puts the calling thread's FPU into flush-to-zero / denormals-are-zero mode for the guard's lifetime, restoring the previous mode on destruction.

Declared in
include/SushiDSP/core/DenormalGuard.hpp

One guard is engaged at the top of every device callback; the mode is per thread. The guard is a control-register read and write, with no allocation, lock or syscall (include/SushiDSP/README.md).

Public member functions

DenormalGuard()
~DenormalGuard()
DenormalGuard(const DenormalGuard &)=delete
DenormalGuard & operator=(const DenormalGuard &)=delete

Static public member functions

static constexpr bool is_supported()

Whether this build can actually change the FPU mode.

False on targets with neither SSE nor AArch64 FPCR, where the guard is a no-op.

Returns

True when flush-to-zero is engaged while a guard is alive.