Inplace#

Objects for computing Fast Fourier Transforms in place, i.e., the output data overwrites the input data. Also, a method for conveniently allocating scratch memory is provided.

These objects are made using the makeInplace method of a Factory.

To avoid needless repetition, only the single precision classes are documented below. Of course, float16, float32, and float64 are all similar.


CLASSES

class hpk.fft.InplaceCC_float32#
InplaceCC_float32.forward(self, arg0: ndarray[device='cpu'], arg1: ndarray[dtype=float32, device='cpu'] | None = None) None#

Computes an unscaled in-place forward FFT on complex data.

Parameters:
  • arg0 – The array to be transformed.

  • arg1 – An optional array to be used as scratch memory.

InplaceCC_float32.backward(self, arg0: ndarray[device='cpu'], arg1: ndarray[dtype=float32, device='cpu'] | None = None) None#

Computes an unscaled in-place backward FFT on complex data.

Parameters:
  • arg0 – The array to be transformed.

  • arg1 – An optional array to be used as scratch memory.

InplaceCC_float32.scaleForward(self, arg0: float, arg1: ndarray[device='cpu'], arg2: ndarray[dtype=float32, device='cpu'] | None = None) None#

Computes a scaled in-place forward FFT on complex data.

Parameters:
  • arg0 – A real-valued scaling factor.

  • arg1 – The array to be transformed.

  • arg2 – An optional array to be used as scratch memory.

InplaceCC_float32.scaleBackward(self, arg0: float, arg1: ndarray[device='cpu'], arg2: ndarray[dtype=float32, device='cpu'] | None = None) None#

Computes a scaled in-place backward FFT on complex data.

Parameters:
  • arg0 – A real-valued scaling factor.

  • arg1 – The array to be transformed.

  • arg2 – An optional array to be used as scratch memory.

InplaceCC_float32.maxThreads(self) int#

An upper bound on the number of threads that could be used.

InplaceCC_float32.scratchSize(self) int#

Returns the number of floats needed as scratch space.

InplaceCC_float32.allocateScratch(self) ArrayLike[dtype=float32, order='C', device='cpu'] | None#

Allocates scratch memory for this FFT compute object.


class hpk.fft.InplaceRC_float32#
InplaceRC_float32.forward(self, arg0: ndarray[dtype=float32, device='cpu'], arg1: ndarray[dtype=float32, device='cpu'] | None = None) None#

Computes an unscaled in-place forward FFT on real data.

Parameters:
  • arg0 – The array to be transformed.

  • arg1 – An optional array to be used as scratch memory.

InplaceRC_float32.backward(self, arg0: ndarray[dtype=float32, device='cpu'], arg1: ndarray[dtype=float32, device='cpu'] | None = None) None#

Computes an unscaled in-place backward FFT on complex Hermitian data that is represented as an array of real values.

Parameters:
  • arg0 – The array to be transformed.

  • arg1 – An optional array to be used as scratch memory.

InplaceRC_float32.scaleForward(self, arg0: float, arg1: ndarray[dtype=float32, device='cpu'], arg2: ndarray[dtype=float32, device='cpu'] | None = None) None#

Computes a scaled in-place forward FFT on real data.

Parameters:
  • arg0 – A real-valued scaling factor.

  • arg1 – The array to be transformed.

  • arg2 – An optional array to be used as scratch memory.

InplaceRC_float32.scaleBackward(self, arg0: float, arg1: ndarray[dtype=float32, device='cpu'], arg2: ndarray[dtype=float32, device='cpu'] | None = None) None#

Computes a scaled in-place backward FFT on complex Hermitian data that is represented as an array of real values.

Parameters:
  • arg0 – A real-valued scaling factor.

  • arg1 – The array to be transformed.

  • arg2 – An optional array to be used as scratch memory.

InplaceRC_float32.maxThreads(self) int#

An upper bound on the number of threads that could be used.

InplaceRC_float32.scratchSize(self) int#

Returns the number of floats needed as scratch space.

InplaceRC_float32.allocateScratch(self) ArrayLike[dtype=float32, order='C', device='cpu'] | None#

Allocates scratch memory for this FFT compute object.