pub struct FftExecutor { /* private fields */ }Expand description
Reusable concrete FFT executor with an explicitly owned backend-neutral cache.
Use this executor for repeated concrete FFT calls that should reuse backend
plans. The immediate TensorFftExt and TensorReadFftExt methods stay
one-shot and do not retain hidden process-global, thread-local, or
backend-owned plan state between calls.
Implementations§
Source§impl FftExecutor
impl FftExecutor
Sourcepub fn new(plans: FftPlanCache) -> Self
pub fn new(plans: FftPlanCache) -> Self
Create an executor from a caller-configured FFT execution cache.
Sourcepub const fn plan_cache(&self) -> &FftPlanCache
pub const fn plan_cache(&self) -> &FftPlanCache
Inspect the owned backend-neutral FFT cache.
Sourcepub fn plan_cache_mut(&mut self) -> &mut FftPlanCache
pub fn plan_cache_mut(&mut self) -> &mut FftPlanCache
Mutably inspect or configure the owned backend-neutral FFT cache.
Sourcepub fn cache_stats(&self) -> CacheStats
pub fn cache_stats(&self) -> CacheStats
Snapshot aggregate statistics for every backend cache namespace.
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Remove every retained backend plan or workspace from this executor.
Sourcepub fn fft<B: FftBackend>(
&mut self,
input: &Tensor,
n: Option<usize>,
axis: isize,
norm: FftNorm,
backend: &mut B,
) -> Result<Tensor>
pub fn fft<B: FftBackend>( &mut self, input: &Tensor, n: Option<usize>, axis: isize, norm: FftNorm, backend: &mut B, ) -> Result<Tensor>
Execute a complex or full-spectrum real FFT while reusing owned plans.
§Errors
Returns tenferro_tensor::Error::Validation with AxisOutOfBounds or
InvalidArgument for invalid axis/n,
tenferro_tensor::Error::Extension with ErrorKind::Unsupported
for unsupported dtypes, or a typed backend source for execution.
Sourcepub fn ifft<B: FftBackend>(
&mut self,
input: &Tensor,
n: Option<usize>,
axis: isize,
norm: FftNorm,
backend: &mut B,
) -> Result<Tensor>
pub fn ifft<B: FftBackend>( &mut self, input: &Tensor, n: Option<usize>, axis: isize, norm: FftNorm, backend: &mut B, ) -> Result<Tensor>
Execute an inverse complex FFT while reusing owned plans.
§Errors
Returns tenferro_tensor::Error::Validation with AxisOutOfBounds or
InvalidArgument for invalid axis/n,
tenferro_tensor::Error::Extension with ErrorKind::Unsupported
for a non-complex input, or a typed backend source for execution.
Sourcepub fn rfft<B: FftBackend>(
&mut self,
input: &Tensor,
n: Option<usize>,
axis: isize,
norm: FftNorm,
backend: &mut B,
) -> Result<Tensor>
pub fn rfft<B: FftBackend>( &mut self, input: &Tensor, n: Option<usize>, axis: isize, norm: FftNorm, backend: &mut B, ) -> Result<Tensor>
Execute a real FFT while reusing owned plans.
§Errors
Returns tenferro_tensor::Error::Validation with AxisOutOfBounds or
InvalidArgument for invalid axis/n,
tenferro_tensor::Error::Extension with ErrorKind::Unsupported
for a non-real input, or a typed backend source for execution.
Sourcepub fn irfft<B: FftBackend>(
&mut self,
input: &Tensor,
n: Option<usize>,
axis: isize,
norm: FftNorm,
backend: &mut B,
) -> Result<Tensor>
pub fn irfft<B: FftBackend>( &mut self, input: &Tensor, n: Option<usize>, axis: isize, norm: FftNorm, backend: &mut B, ) -> Result<Tensor>
Execute an inverse real FFT while reusing owned plans.
§Errors
Returns tenferro_tensor::Error::Validation with AxisOutOfBounds,
InvalidArgument, or spectrum-length details,
tenferro_tensor::Error::Extension with ErrorKind::Unsupported
for a non-complex input, or a typed backend source for execution.
Trait Implementations§
Source§impl Default for FftExecutor
impl Default for FftExecutor
Source§fn default() -> FftExecutor
fn default() -> FftExecutor
Auto Trait Implementations§
impl Freeze for FftExecutor
impl !RefUnwindSafe for FftExecutor
impl Send for FftExecutor
impl Sync for FftExecutor
impl Unpin for FftExecutor
impl UnsafeUnpin for FftExecutor
impl !UnwindSafe for FftExecutor
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> 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