@@ -107,16 +107,32 @@ fftabs2type(::Type{T}) where {T<:Union{Real,Complex}} = Float64
107107const FAST_FFT_SIZES = (2 , 3 , 5 , 7 )
108108
109109"""
110- nextfastfft(n)
110+ nextfastfft(n::Integer)
111+ nextfastfft(ns::Tuple)
111112
112- Return the closest product of 2, 3, 5, and 7 greater than or equal
113- to `n`. FFTW contains optimized kernels for these sizes and
114- computes Fourier transforms of input that is a product of these
115- sizes faster than for input of other sizes.
113+ Return an estimate for the padded size of an array that
114+ is optimal for the performance of an n-dimensional FFT.
115+
116+ For `Tuple` inputs, this returns a `Tuple` that is the size
117+ of the padded array.
118+
119+ For `Integer` inputs, this returns the closest product of 2, 3, 5, and 7
120+ greater than or equal to `n`.
121+ FFTW contains optimized kernels for these sizes and computes
122+ Fourier transforms of inputs that are a product of these
123+ sizes faster than for inputs of other sizes.
124+
125+ !!! warning
126+
127+ Currently, `nextfastfft(ns::Tuple)` is implemented as
128+ `nextfastfft.(ns)`. This may change in future releases if
129+ a better estimation model is found.
130+
131+ It is recommended to use `nextfastfft.(ns)` to obtain
132+ a tuple of padded lengths for 1D FFTs.
116133"""
117- nextfastfft (n) = nextprod (FAST_FFT_SIZES, n)
118- nextfastfft (ns:: Tuple ) = nextfastfft .(ns)
119- nextfastfft (ns... ) = nextfastfft (ns)
134+ nextfastfft (n:: Integer ) = nextprod (FAST_FFT_SIZES, n)
135+ nextfastfft (ns:: Tuple{Vararg{Integer}} ) = nextfastfft .(ns)
120136
121137
122138# # COMMON DSP TOOLS
0 commit comments