pub struct PlanCache { /* private fields */ }
Expand description
FFT Plan Cache with configurable size limits and TTL
Implementations§
Source§impl PlanCache
impl PlanCache
Sourcepub fn with_config(max_entries: usize, max_age: Duration) -> Self
pub fn with_config(max_entries: usize, max_age: Duration) -> Self
Create a new plan cache with custom settings
Sourcepub fn set_enabled(&self, enabled: bool)
pub fn set_enabled(&self, enabled: bool)
Enable or disable the cache
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if the cache is enabled
Sourcepub fn get_stats(&self) -> CacheStats
pub fn get_stats(&self) -> CacheStats
Get statistics about cache usage
Sourcepub fn get_or_create_plan(
&self,
size: usize,
forward: bool,
planner: &mut FftPlanner<f64>,
) -> Arc<dyn Fft<f64>>
pub fn get_or_create_plan( &self, size: usize, forward: bool, planner: &mut FftPlanner<f64>, ) -> Arc<dyn Fft<f64>>
Get or create an FFT plan for the given size and direction
Sourcepub fn precompute_common_sizes(
&self,
sizes: &[usize],
planner: &mut FftPlanner<f64>,
)
pub fn precompute_common_sizes( &self, sizes: &[usize], planner: &mut FftPlanner<f64>, )
Pre-populate cache with common sizes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PlanCache
impl RefUnwindSafe for PlanCache
impl Send for PlanCache
impl Sync for PlanCache
impl Unpin for PlanCache
impl UnwindSafe for PlanCache
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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