VISR  0.11.1
Versatile Interactive Scene Renderer
visr::efl::DenormalisedNumbers Struct Reference

#include <denormalised_number_handling.hpp>

Classes

struct  State
 

Static Public Member Functions

static State setDenormHandling ()
 
static void resetDenormHandling (State stateToRestore)
 
static State setDenormHandling (State newState)
 

Detailed Description

Structure to collect the several types and functions for setting and storing the handling of denormalised numbers in the processor. Denormalised numbers are floating-=point numbers very close to zero. On processor architectures, floating-point instructions operating on denormalised numbers are orders of magnitudes slower than for other values. For audio signal processing, accurate handling of denormalised numbers is not sensible in almost all cases, and they can be treated as zero without negative effects.

Note
This could be also implemented as a namespace (just remove the 'static')

Member Function Documentation

void visr::efl::DenormalisedNumbers::resetDenormHandling ( State  stateToRestore)
static

Reset the handling of denormalised numbers into a previous state.

Parameters
stateToRestoreThe denorm handling mode which should be restord.
DenormalisedNumbers::State visr::efl::DenormalisedNumbers::setDenormHandling ( )
static

Set the processors into a mode suitable for realtime audio signal processing. This means that denormalised numbers should not incur a performance penalty.

Returns
The previous state of the processor.
DenormalisedNumbers::State visr::efl::DenormalisedNumbers::setDenormHandling ( State  newState)
static

Set the denormalised numbers handling into a user-defined mode. This is the most flexible interface which als provides the implementation for the simpler interfaces above.

Parameters
newStateThe denorm handling mode to be set.
Returns
The state before the new state is set.

The documentation for this struct was generated from the following files: