Inplace#

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

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


CLASSES

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

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

InplaceCC_float32.scaleForward(self, scale: float, a: ndarray[device='cpu'], scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#

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

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

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

InplaceCC_float32.scaleBackward(self, scale: float, a: ndarray[device='cpu'], scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#

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

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) hpk.DlPack_float32 | None#

Allocates scratch memory for this FFT compute object.


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

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

InplaceRC_float32.scaleForward(self, scale: float, a: ndarray[dtype=float32, device='cpu'], scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#

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

InplaceRC_float32.backward(self, a: ndarray[dtype=float32, device='cpu'], scratch: 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 float32.

InplaceRC_float32.scaleBackward(self, scale: float, a: ndarray[dtype=float32, device='cpu'], scratch: 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 float32.

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) hpk.DlPack_float32 | None#

Allocates scratch memory for this FFT compute object.