Ooplace#

Objects for computing Fast Fourier Transforms out of place, i.e., the input data is treated as read-only and the output data is written to a distinct, non-overlapping array. A method for conveniently allocating scratch memory is also provided.

To avoid needless repetition, only the single precision classes for NumPy are documented below. Of course, float16, float32, float64 and numpy, torch, jax, tensorflow, and dlpack are all similar.


CLASSES

class hpk.fft.OoplaceCC_float32_numpy#
OoplaceCC_float32_numpy.forward(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=complex64, device='cpu', order='C', ]#
OoplaceCC_float32_numpy.forward(self, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Overloaded function.

  1. forward(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=complex64, device='cpu', order='C', ]

Computes an unscaled out-of-place forward FFT on complex data.

  1. forward(self, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Computes an unscaled out-of-place forward FFT on complex data that is represented as an array of float32.

OoplaceCC_float32_numpy.forwardCopy(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#
OoplaceCC_float32_numpy.forwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None

Overloaded function.

  1. forwardCopy(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes an unscaled out-of-place forward FFT on complex data.

  1. forwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes an unscaled out-of-place forward FFT on complex data that is represented as an array of float32.

OoplaceCC_float32_numpy.scaleForward(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=complex64, device='cpu', order='C', ]#
OoplaceCC_float32_numpy.scaleForward(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Overloaded function.

  1. scaleForward(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=complex64, device='cpu', order='C', ]

Computes a scaled out-of-place forward FFT on complex data.

  1. scaleForward(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Computes a scaled out-of-place forward FFT on complex data that is represented as an array of float32.

OoplaceCC_float32_numpy.scaleForwardCopy(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#
OoplaceCC_float32_numpy.scaleForwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None

Overloaded function.

  1. scaleForwardCopy(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes a scaled out-of-place forward FFT on complex data.

  1. scaleForwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes a scaled out-of-place forward FFT on complex data that is represented as an array of float32.

OoplaceCC_float32_numpy.backward(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=complex64, device='cpu', order='C', ]#
OoplaceCC_float32_numpy.backward(self, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Overloaded function.

  1. backward(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=complex64, device='cpu', order='C', ]

Computes an unscaled out-of-place backward FFT on complex data.

  1. backward(self, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Computes an unscaled out-of-place backward FFT on complex data that is represented as an array of float32.

OoplaceCC_float32_numpy.backwardCopy(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#
OoplaceCC_float32_numpy.backwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None

Overloaded function.

  1. backwardCopy(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes an unscaled out-of-place backward FFT on complex data.

  1. backwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes an unscaled out-of-place backward FFT on complex data that is represented as an array of float32.

OoplaceCC_float32_numpy.scaleBackward(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=complex64, device='cpu', order='C', ]#
OoplaceCC_float32_numpy.scaleBackward(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Overloaded function.

  1. scaleBackward(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=complex64, device='cpu', order='C', ]

Computes a scaled out-of-place backward FFT on complex data.

  1. scaleBackward(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Computes a scaled out-of-place backward FFT on complex data that is represented as an array of float32.

OoplaceCC_float32_numpy.scaleBackwardCopy(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#
OoplaceCC_float32_numpy.scaleBackwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None

Overloaded function.

  1. scaleBackwardCopy(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes a scaled out-of-place backward FFT on complex data.

  1. scaleBackwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes a scaled out-of-place backward FFT on complex data that is represented as an array of float32.

OoplaceCC_float32_numpy.maxThreads(self) int#

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

OoplaceCC_float32_numpy.scratchSize(self) int#

Returns the number of floats needed as scratch space.

OoplaceCC_float32_numpy.allocateScratch(self) hpk.DlPack_float32 | None#

Allocates scratch memory for this FFT compute object.


class hpk.fft.OoplaceRC_float32_numpy#
OoplaceRC_float32_numpy.forward(self, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]#

Computes an unscaled out-of-place forward FFT on real data.

OoplaceRC_float32_numpy.forwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#
OoplaceRC_float32_numpy.forwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None

Overloaded function.

  1. forwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes an unscaled out-of-place forward FFT on real data.

  1. forwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes an unscaled out-of-place forward FFT on real data.

OoplaceRC_float32_numpy.scaleForward(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]#

Computes a scaled out-of-place forward FFT on real data.

OoplaceRC_float32_numpy.scaleForwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#
OoplaceRC_float32_numpy.scaleForwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None

Overloaded function.

  1. scaleForwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=complex64, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes a scaled out-of-place forward FFT on real data.

  1. scaleForwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes a scaled out-of-place forward FFT on real data.

OoplaceRC_float32_numpy.backward(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]#
OoplaceRC_float32_numpy.backward(self, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Overloaded function.

  1. backward(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Computes an unscaled out-of-place backward FFT on complex hermitian data.

  1. backward(self, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Computes an unscaled out-of-place backward FFT on complex hermitian data that is represented as an array of float32.

OoplaceRC_float32_numpy.backwardCopy(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#
OoplaceRC_float32_numpy.backwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None

Overloaded function.

  1. backwardCopy(self, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes an unscaled out-of-place backward FFT on complex hermitian data.

  1. backwardCopy(self, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes an unscaled out-of-place backward FFT on complex hermitian data that is represented as an array of float32.

OoplaceRC_float32_numpy.scaleBackward(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]#
OoplaceRC_float32_numpy.scaleBackward(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Overloaded function.

  1. scaleBackward(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Computes a scaled out-of-place backward FFT on complex hermitian data.

  1. scaleBackward(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> numpy.ndarray[dtype=float32, device='cpu', order='C', ]

Computes a scaled out-of-place backward FFT on complex hermitian data that is represented as an array of float32.

OoplaceRC_float32_numpy.scaleBackwardCopy(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None#
OoplaceRC_float32_numpy.scaleBackwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) None

Overloaded function.

  1. scaleBackwardCopy(self, scale: float, a: ndarray[dtype=complex64, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes a scaled out-of-place backward FFT on complex hermitian data.

  1. scaleBackwardCopy(self, scale: float, a: ndarray[dtype=float32, writable=False, device='cpu'], out: ndarray[dtype=float32, device='cpu'], *, scratch: ndarray[dtype=float32, device='cpu'] | None = None) -> None

Computes a scaled out-of-place backward FFT on complex hermitian data that is represented as an array of float32.

OoplaceRC_float32_numpy.maxThreads(self) int#

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

OoplaceRC_float32_numpy.scratchSize(self) int#

Returns the number of floats needed as scratch space.

OoplaceRC_float32_numpy.allocateScratch(self) hpk.DlPack_float32 | None#

Allocates scratch memory for this FFT compute object.