pub struct IncrementalCompiler { /* private fields */ }Expand description
Incremental compiler that reuses previously compiled expressions.
Implementations§
Source§impl IncrementalCompiler
impl IncrementalCompiler
Sourcepub fn new(context: CompilerContext) -> Self
pub fn new(context: CompilerContext) -> Self
Create a new incremental compiler with the given context.
Sourcepub fn context(&self) -> &CompilerContext
pub fn context(&self) -> &CompilerContext
Get the compilation context.
Sourcepub fn context_mut(&mut self) -> &mut CompilerContext
pub fn context_mut(&mut self) -> &mut CompilerContext
Get a mutable reference to the compilation context.
Sourcepub fn compile(&mut self, expr: &TLExpr) -> Result<EinsumGraph, IrError>
pub fn compile(&mut self, expr: &TLExpr) -> Result<EinsumGraph, IrError>
Compile an expression incrementally.
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the cache.
Sourcepub fn stats(&self) -> IncrementalStats
pub fn stats(&self) -> IncrementalStats
Get incremental compilation statistics.
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset statistics.
Auto Trait Implementations§
impl Freeze for IncrementalCompiler
impl RefUnwindSafe for IncrementalCompiler
impl Send for IncrementalCompiler
impl Sync for IncrementalCompiler
impl Unpin for IncrementalCompiler
impl UnwindSafe for IncrementalCompiler
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