pub struct PrecompiledNet<'c> { /* private fields */ }Expand description
Precompiled flat-array net representation for the super::precompiled_executor::PrecompiledNetExecutor.
Compiles the net topology into flat arrays and operation sequences that eliminate HashMap lookups and enum pattern matching from the hot path.
Implementations§
Source§impl<'c> PrecompiledNet<'c>
impl<'c> PrecompiledNet<'c>
Sourcepub fn from_compiled(compiled: &'c CompiledNet) -> Self
pub fn from_compiled(compiled: &'c CompiledNet) -> Self
Compiles using an existing CompiledNet to reuse its masks and indices.
Sourcepub fn compiled(&self) -> &'c CompiledNet
pub fn compiled(&self) -> &'c CompiledNet
Returns the underlying CompiledNet.
Sourcepub fn transition(&self, tid: usize) -> &Transition
pub fn transition(&self, tid: usize) -> &Transition
Returns the transition at the given compiled ID.
Sourcepub fn place_id(&self, name: &str) -> Option<usize>
pub fn place_id(&self, name: &str) -> Option<usize>
Returns the place ID for a given place name.
Sourcepub fn place_count(&self) -> usize
pub fn place_count(&self) -> usize
Returns the number of places.
Sourcepub fn transition_count(&self) -> usize
pub fn transition_count(&self) -> usize
Returns the number of transitions.
Sourcepub fn word_count(&self) -> usize
pub fn word_count(&self) -> usize
Returns the word count for bitmaps.
Sourcepub fn can_enable_bitmap(&self, tid: usize, marking_snapshot: &[u64]) -> bool
pub fn can_enable_bitmap(&self, tid: usize, marking_snapshot: &[u64]) -> bool
Sparse bitmap enablement check for a transition.
Trait Implementations§
Auto Trait Implementations§
impl<'c> Freeze for PrecompiledNet<'c>
impl<'c> !RefUnwindSafe for PrecompiledNet<'c>
impl<'c> Send for PrecompiledNet<'c>
impl<'c> Sync for PrecompiledNet<'c>
impl<'c> Unpin for PrecompiledNet<'c>
impl<'c> UnsafeUnpin for PrecompiledNet<'c>
impl<'c> !UnwindSafe for PrecompiledNet<'c>
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