pub struct FftPlanSpec { /* private fields */ }Expand description
Validated, backend-neutral description of one FFT request over one or more axes.
Backends receive this value only after the public FFT surface has validated dtype, rank, axes, requested lengths, and inverse-spectrum shape. The layout requirement is explicit so a backend can reject unsupported storage without silently materializing or transferring the input.
A spec carries one or more axes. The n-dimensional executor splits a
multi-axis request into one single-axis spec per axis, so every spec a
backend actually executes names exactly one axis; Self::axes stays
useful for tests and diagnostics. Axis order is significant only for the
mixed real transforms, whose real transform is the last declared axis.
§Examples
use tenferro_fft::{FftOperation, FftPlanSpec};
fn inspect(spec: &FftPlanSpec) {
let operation: FftOperation = spec.operation();
assert_eq!(operation, spec.operation());
assert!(spec.requires_compact_column_major());
assert!(!spec.axes().is_empty());
}Implementations§
Source§impl FftPlanSpec
impl FftPlanSpec
Sourcepub const fn operation(&self) -> FftOperation
pub const fn operation(&self) -> FftOperation
Return the transform operation of the last declared axis.
Sourcepub fn lengths(&self) -> Option<&[usize]>
pub fn lengths(&self) -> Option<&[usize]>
Return the caller-requested transform length of every axis, if supplied.
Sourcepub fn normalized_axis(&self) -> usize
pub fn normalized_axis(&self) -> usize
Return the non-negative, validated axis executed by a backend.
Multi-axis requests are expanded into one single-axis spec per axis before a backend sees them, so this is the axis of the step to run now.
Sourcepub fn requested_len(&self) -> Option<usize>
pub fn requested_len(&self) -> Option<usize>
Return the caller-requested transform length of the executed step.
Sourcepub const fn input_dtype(&self) -> DType
pub const fn input_dtype(&self) -> DType
Return the validated input dtype.
Sourcepub fn input_shape(&self) -> &[usize]
pub fn input_shape(&self) -> &[usize]
Return the validated input shape.
Sourcepub const fn requires_compact_column_major(&self) -> bool
pub const fn requires_compact_column_major(&self) -> bool
Return whether execution requires compact column-major storage.
Trait Implementations§
Source§impl Clone for FftPlanSpec
impl Clone for FftPlanSpec
Source§impl Debug for FftPlanSpec
impl Debug for FftPlanSpec
impl Eq for FftPlanSpec
Source§impl PartialEq for FftPlanSpec
impl PartialEq for FftPlanSpec
impl StructuralPartialEq for FftPlanSpec
Auto Trait Implementations§
impl Freeze for FftPlanSpec
impl RefUnwindSafe for FftPlanSpec
impl Send for FftPlanSpec
impl Sync for FftPlanSpec
impl Unpin for FftPlanSpec
impl UnsafeUnpin for FftPlanSpec
impl UnwindSafe for FftPlanSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more