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 track_plan_usage(&self, size: usize, forward: bool)
pub fn track_plan_usage(&self, size: usize, forward: bool)
Track FFT plan usage in the cache (OxiFFT backend)
Note: OxiFFT plans are managed globally via oxifft_plan_cache. This method provides tracking and statistics for plan usage.
Sourcepub fn precompute_common_sizes(&self, sizes: &[usize])
pub fn precompute_common_sizes(&self, sizes: &[usize])
Pre-populate cache with common sizes (OxiFFT backend)
Note: With OxiFFT, plans are created lazily and cached globally. This method tracks sizes for statistics purposes.
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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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