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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.