57#define JUCE_DSP_H_INCLUDED
59#include <juce_audio_basics/juce_audio_basics.h>
60#include <juce_audio_formats/juce_audio_formats.h>
62#if ! JUCE_HAS_CONSTEXPR
63 #ifndef JUCE_DEMO_RUNNER
64 #error "The juce_dsp module requires a compiler that supports constexpr"
68#if defined(_M_X64) || defined(__amd64__) || defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP == 2)
70 #if defined(_M_X64) || defined(__amd64__)
77 #define JUCE_USE_SIMD 1
81 #include <immintrin.h>
84#elif defined (__ARM_NEON__) || defined (__ARM_NEON) || defined (__arm64__) || defined (__aarch64__)
87 #define JUCE_USE_SIMD 1
96 #define JUCE_USE_SIMD 0
101#ifndef JUCE_VECTOR_CALLTYPE
104 #if _MSC_VER && JUCE_USE_SIMD && ! (defined(_M_X64) || defined(__amd64__))
105 #define JUCE_VECTOR_CALLTYPE __vectorcall
107 #define JUCE_VECTOR_CALLTYPE
127#ifndef JUCE_ASSERTION_FIRFILTER
128 #define JUCE_ASSERTION_FIRFILTER 1
141#ifndef JUCE_DSP_USE_INTEL_MKL
142 #define JUCE_DSP_USE_INTEL_MKL 0
157 #ifndef JUCE_DSP_USE_SHARED_FFTW
158 #define JUCE_DSP_USE_SHARED_FFTW 0
172#ifndef JUCE_DSP_USE_STATIC_FFTW
173 #define JUCE_DSP_USE_STATIC_FFTW 0
188#ifndef JUCE_DSP_ENABLE_SNAP_TO_ZERO
189 #define JUCE_DSP_ENABLE_SNAP_TO_ZERO 1
202 template <
typename Type>
203 using Complex = std::complex<Type>;
211 #if JUCE_DSP_ENABLE_SNAP_TO_ZERO
212 inline void snapToZero (
float& x)
noexcept { JUCE_SNAP_TO_ZERO (x); }
214 inline void snapToZero (
double& x)
noexcept { JUCE_SNAP_TO_ZERO (x); }
215 inline void snapToZero (
long double& x)
noexcept { JUCE_SNAP_TO_ZERO (x); }
218 inline void snapToZero (
float& x)
noexcept { ignoreUnused (x); }
220 inline void snapToZero (
double& x)
noexcept { ignoreUnused (x); }
221 inline void snapToZero (
long double& x)
noexcept { ignoreUnused (x); }
230 #include "native/juce_fallback_SIMDNativeOps.h"
233 #if defined(__i386__) || defined(__amd64__) || defined(_M_X64) || defined(_X86_) || defined(_M_IX86)
235 #include "native/juce_avx_SIMDNativeOps.h"
237 #include "native/juce_sse_SIMDNativeOps.h"
239 #elif defined(__arm__) || defined(_M_ARM) || defined (__arm64__) || defined (__aarch64__)
240 #include "native/juce_neon_SIMDNativeOps.h"
242 #error "SIMD register support not implemented for this platform"
245 #include "containers/juce_SIMDRegister.h"
248#include "maths/juce_SpecialFunctions.h"
249#include "maths/juce_Matrix.h"
250#include "maths/juce_Phase.h"
251#include "maths/juce_Polynomial.h"
252#include "maths/juce_FastMathApproximations.h"
253#include "maths/juce_LookupTable.h"
254#include "maths/juce_LogRampedValue.h"
255#include "containers/juce_AudioBlock.h"
256#include "processors/juce_ProcessContext.h"
257#include "processors/juce_ProcessorWrapper.h"
258#include "processors/juce_ProcessorChain.h"
259#include "processors/juce_ProcessorDuplicator.h"
260#include "processors/juce_Bias.h"
261#include "processors/juce_Gain.h"
262#include "processors/juce_WaveShaper.h"
263#include "processors/juce_IIRFilter.h"
264#include "processors/juce_FIRFilter.h"
265#include "processors/juce_Oscillator.h"
266#include "processors/juce_LadderFilter.h"
267#include "processors/juce_StateVariableFilter.h"
268#include "processors/juce_Oversampling.h"
269#include "processors/juce_Reverb.h"
270#include "frequency/juce_FFT.h"
271#include "frequency/juce_Convolution.h"
272#include "frequency/juce_Windowing.h"
273#include "filter_design/juce_FilterDesign.h"