26#ifndef JUCE_SNAP_TO_ZERO
28 #define JUCE_SNAP_TO_ZERO(n) if (! (n < -1.0e-8f || n > 1.0e-8f)) n = 0;
30 #define JUCE_SNAP_TO_ZERO(n) ignoreUnused (n)
33class ScopedNoDenormals;
53template <
typename FloatType,
typename CountType>
129 static void JUCE_CALLTYPE clip (FloatType* dest,
const FloatType* src, FloatType low, FloatType high,
CountType num)
noexcept;
145template <
typename...
Bases>
146struct NameForwarder :
public Bases...
148 using Bases::clear...,
151 Bases::copyWithMultiply...,
154 Bases::addWithMultiply...,
155 Bases::subtractWithMultiply...,
162 Bases::findMinAndMax...,
163 Bases::findMinimum...,
164 Bases::findMaximum...;
181 FloatVectorOperationsBase<float, size_t>,
182 FloatVectorOperationsBase<double, int>,
183 FloatVectorOperationsBase<double, size_t>>
186 static void JUCE_CALLTYPE convertFixedToFloat (
float* dest,
const int* src,
float multiplier,
int num)
noexcept;
188 static void JUCE_CALLTYPE convertFixedToFloat (
float* dest,
const int* src,
float multiplier,
size_t num)
noexcept;
191 static void JUCE_CALLTYPE enableFlushToZeroMode (
bool shouldEnable)
noexcept;
199 static void JUCE_CALLTYPE disableDenormalisedNumberSupport (
bool shouldDisable =
true)
noexcept;
225 #if JUCE_USE_SSE_INTRINSICS || (JUCE_USE_ARM_NEON || (JUCE_64BIT && JUCE_ARM))
A collection of simple vector operations on arrays of floating point numbers, accelerated with SIMD i...
A general-purpose range object, that simply represents any linear range with a start and end point.
Helper class providing an RAII-based mechanism for temporarily disabling denormals on your CPU.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
A collection of simple vector operations on arrays of floating point numbers, accelerated with SIMD i...
static void JUCE_CALLTYPE add(FloatType *dest, FloatType amountToAdd, CountType numValues) noexcept
Adds a fixed value to the destination values.
static void JUCE_CALLTYPE max(FloatType *dest, const FloatType *src, FloatType comp, CountType num) noexcept
Each element of dest will be the maximum of the corresponding element of the source array and the giv...
static FloatType JUCE_CALLTYPE findMinimum(const FloatType *src, CountType numValues) noexcept
Finds the minimum value in the given array.
static void JUCE_CALLTYPE multiply(FloatType *dest, const FloatType *src, CountType numValues) noexcept
Multiplies the destination values by the source values.
static void JUCE_CALLTYPE clear(FloatType *dest, CountType numValues) noexcept
Clears a vector of floating point numbers.
static void JUCE_CALLTYPE addWithMultiply(FloatType *dest, const FloatType *src, FloatType multiplier, CountType numValues) noexcept
Multiplies each source value by the given multiplier, then adds it to the destination value.
static Range< FloatType > JUCE_CALLTYPE findMinAndMax(const FloatType *src, CountType numValues) noexcept
Finds the minimum and maximum values in the given array.
static void JUCE_CALLTYPE copy(FloatType *dest, const FloatType *src, CountType numValues) noexcept
Copies a vector of floating point numbers.
static void JUCE_CALLTYPE clip(FloatType *dest, const FloatType *src, FloatType low, FloatType high, CountType num) noexcept
Each element of dest is calculated by hard clipping the corresponding src element so that it is in th...
static FloatType JUCE_CALLTYPE findMaximum(const FloatType *src, CountType numValues) noexcept
Finds the maximum value in the given array.
static void JUCE_CALLTYPE subtractWithMultiply(FloatType *dest, const FloatType *src, FloatType multiplier, CountType numValues) noexcept
Multiplies each source value by the given multiplier, then subtracts it to the destination value.
static void JUCE_CALLTYPE copyWithMultiply(FloatType *dest, const FloatType *src, FloatType multiplier, CountType numValues) noexcept
Copies a vector of floating point numbers, multiplying each value by a given multiplier.
static void JUCE_CALLTYPE fill(FloatType *dest, FloatType valueToFill, CountType numValues) noexcept
Copies a repeated value into a vector of floating point numbers.
static void JUCE_CALLTYPE subtract(FloatType *dest, const FloatType *src, CountType numValues) noexcept
Subtracts the source values from the destination values.
static void JUCE_CALLTYPE abs(FloatType *dest, const FloatType *src, CountType numValues) noexcept
Copies a source vector to a destination, taking the absolute of each value.
static void JUCE_CALLTYPE negate(FloatType *dest, const FloatType *src, CountType numValues) noexcept
Copies a source vector to a destination, negating each value.
static void JUCE_CALLTYPE min(FloatType *dest, const FloatType *src, FloatType comp, CountType num) noexcept
Each element of dest will be the minimum of the corresponding element of the source array and the giv...