pub struct DMApplyCache<M: Manager, O, H, const ARITY: usize = 2>(/* private fields */);Expand description
Fixed-size direct mapped apply cache
Implementations§
Source§impl<M, O, H, const ARITY: usize> DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> DMApplyCache<M, O, H, ARITY>
Sourcepub unsafe fn with_capacity(capacity: usize) -> Self
pub unsafe fn with_capacity(capacity: usize) -> Self
Create a new ApplyCache with the given capacity (entries).
§Safety
The apply cache must only be used inside a manager that guarantees all
node deletions to be wrapped inside an
ManagerEventSubscriber::pre_gc() /
ManagerEventSubscriber::post_gc() pair.
Trait Implementations§
Source§impl<M, O, H, const ARITY: usize> ApplyCache<M, O> for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> ApplyCache<M, O> for DMApplyCache<M, O, H, ARITY>
Source§fn get_with_numeric(
&self,
manager: &M,
operator: O,
operands: &[Borrowed<'_, M::Edge>],
numeric_operands: &[u32],
) -> Option<M::Edge>
fn get_with_numeric( &self, manager: &M, operator: O, operands: &[Borrowed<'_, M::Edge>], numeric_operands: &[u32], ) -> Option<M::Edge>
Get the result of
operation, if cachedSource§fn add_with_numeric(
&self,
manager: &M,
operator: O,
operands: &[Borrowed<'_, M::Edge>],
numeric_operands: &[u32],
value: Borrowed<'_, M::Edge>,
)
fn add_with_numeric( &self, manager: &M, operator: O, operands: &[Borrowed<'_, M::Edge>], numeric_operands: &[u32], value: Borrowed<'_, M::Edge>, )
Add the result of
operation to this cache Read moreSource§impl<M, O, H, const ARITY: usize> Debug for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> Debug for DMApplyCache<M, O, H, ARITY>
Source§impl<M: Manager, O, H, const ARITY: usize> DropWith<<M as Manager>::Edge> for DMApplyCache<M, O, H, ARITY>
impl<M: Manager, O, H, const ARITY: usize> DropWith<<M as Manager>::Edge> for DMApplyCache<M, O, H, ARITY>
Source§impl<M, O, H, const ARITY: usize> ManagerEventSubscriber<M> for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> ManagerEventSubscriber<M> for DMApplyCache<M, O, H, ARITY>
Source§fn pre_reorder(&self, manager: &M)
fn pre_reorder(&self, manager: &M)
Prepare a reordering operation (including any addition of levels) Read more
Source§fn pre_reorder_mut(manager: &mut M)
fn pre_reorder_mut(manager: &mut M)
Prepare a reordering operation (including any addition of levels) Read more
Source§fn post_reorder(&self, manager: &M)
fn post_reorder(&self, manager: &M)
Post-process a reordering operation Read more
Source§fn post_reorder_mut(manager: &mut M)
fn post_reorder_mut(manager: &mut M)
Post-process a reordering operation Read more
Source§impl<M, O, H, const ARITY: usize> StatisticsGenerator for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> StatisticsGenerator for DMApplyCache<M, O, H, ARITY>
Source§fn print_stats(&self)
fn print_stats(&self)
Print statistics to stdout
Auto Trait Implementations§
impl<M, O, H, const ARITY: usize> Freeze for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize = 2> !RefUnwindSafe for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> Send for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> Sync for DMApplyCache<M, O, H, ARITY>
impl<M, O, H, const ARITY: usize> Unpin for DMApplyCache<M, O, H, ARITY>where
H: Unpin,
impl<M, O, H, const ARITY: usize> UnwindSafe for DMApplyCache<M, O, H, ARITY>
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