Skip to main content

RealFftPlan

Struct RealFftPlan 

Source
pub struct RealFftPlan<R: Runtime> { /* private fields */ }
Expand description

Reusable exact-length F32 FFT plan. The direction and N are fixed; batches may change, in which case the batched workspace is replaced, not grown without bound. Caller-owned output bindings must be non-overlapping. Raw bindings carry no dtype/device tag: pass F32 storage from this client.

Implementations§

Source§

impl<R: Runtime> RealFftPlan<R>

Source

pub fn new( client: ComputeClient<R>, n: usize, mode: FftMode, ) -> Result<Self, LaunchError>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn convolution_len(&self) -> Option<usize>

Source

pub fn retained_bytes(&self) -> usize

Bytes retained by this plan, excluding output tensors, driver metadata, compiled kernels and temporary initialization scratch.

Source

pub fn clear_workspace(&mut self)

Release scratch; chirp tables remain reusable. Runtime stream ordering handles deferred release. This is not a device-wide synchronization.

Source

pub fn forward( &mut self, signal: TensorBinding<R>, real: TensorBinding<R>, imag: TensorBinding<R>, dim: usize, used: usize, ) -> Result<(), LaunchError>

Unnormalized N-point RFFT. Samples at used..N are zero, without constructing a padded input tensor. used may be zero.

Source

pub fn inverse( &mut self, real: TensorBinding<R>, imag: TensorBinding<R>, signal: TensorBinding<R>, dim: usize, used: usize, ) -> Result<(), LaunchError>

N-point IRFFT normalized by 1/N. DC, and Nyquist for even N, are real-only. Bins at used..N/2+1 are treated as zero.

Auto Trait Implementations§

§

impl<R> !RefUnwindSafe for RealFftPlan<R>

§

impl<R> !UnwindSafe for RealFftPlan<R>

§

impl<R> Freeze for RealFftPlan<R>
where ComputeClient<R>: Freeze, Option<Tables<R>>: Freeze, Option<Workspace<R>>: Freeze,

§

impl<R> Send for RealFftPlan<R>
where ComputeClient<R>: Send, Option<Tables<R>>: Send, Option<Workspace<R>>: Send,

§

impl<R> Sync for RealFftPlan<R>
where ComputeClient<R>: Sync, Option<Tables<R>>: Sync, Option<Workspace<R>>: Sync,

§

impl<R> Unpin for RealFftPlan<R>
where ComputeClient<R>: Unpin, Option<Tables<R>>: Unpin, Option<Workspace<R>>: Unpin,

§

impl<R> UnsafeUnpin for RealFftPlan<R>
where ComputeClient<R>: UnsafeUnpin, Option<Tables<R>>: UnsafeUnpin, Option<Workspace<R>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoComptime for T

Source§

fn comptime(self) -> Self

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.