ifft2

ifft2#

Perform a 2D inverse FFT. Batching is supported for any tensor with a rank higher than 2.

template<typename OpA>
__MATX_INLINE__ auto matx::ifft2(const OpA &a, FFTNorm norm = FFTNorm::BACKWARD)#

Run a 2D IFFT with a cached plan

Creates a new FFT plan in the cache if none exists, and uses that to execute the 2D IFFT. 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

  • norm – Normalization to apply to IFFT

template<typename OpA>
__MATX_INLINE__ auto matx::ifft2(const OpA &a, const int32_t (&axis)[2], FFTNorm norm = FFTNorm::BACKWARD)#

Run a 2D IFFT with a cached plan

Creates a new IFFT 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 data type

Parameters:
  • a – Input operator or tensor

  • axis – axes to perform ifft on

  • norm – Normalization to apply to IFFT

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 = ifft2(in)).run(this->exec);
(out2 = ifft2(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}) = ifft2(in.Permute({1,2,0}))).run(this->exec);
(out2 = ifft2(in, {2,0})).run(this->exec);