fft2#
Perform a 2D FFT. Batching is supported for any tensor with a rank higher than 2.
-
template<typename OpA>
__MATX_INLINE__ auto matx::fft2(const OpA &a, FFTNorm norm = FFTNorm::BACKWARD)# Run a 2D FFT with a cached plan
Creates a new FFT plan in the cache if none exists, and uses that to execute the 2D FFT. Note that FFTs and IFFTs share the same plans if all dimensions match
- Template Parameters:
OpA – Input operator or tensor
- Parameters:
a – Input operator or tensor
norm – Normalization to apply to FFT
-
template<typename OpA>
__MATX_INLINE__ auto matx::fft2(const OpA &a, const int32_t (&axis)[2], FFTNorm norm = FFTNorm::BACKWARD)# Run a 2D FFT with a cached plan
Creates a new FFT plan in the cache if none exists, and uses that to execute the 2D FFT. Note that FFTs and IFFTs share the same plans if all dimensions match
- Template Parameters:
OpA – Input operator or tensor type
- Parameters:
a – input operator or tensor
axis – axes to perform fft on
norm – Normalization to apply to FFT
Examples#
// Perform a 2D FFT from 3D tensor "in" into "out1". This is equivalent to performing the FFT
// on the last two dimension unpermuted.
(out1 = fft2(in)).run(this->exec);
(out2 = fft2(in, {1,2})).run(this->exec);
// Perform a 2D FFT from 3D tensor "in" into "out2" across dimensions 2, 0. This is equivalent
// to permuting the tensor before input and after output
(out1.Permute({1,2,0}) = fft2(in.Permute({1,2,0}))).run(this->exec);
(out2 = fft2(in, {2,0})).run(this->exec);