pub struct GraphCompiler { /* private fields */ }Expand description
Graph compiler that applies optimization passes.
Implementations§
Source§impl GraphCompiler
impl GraphCompiler
Sourcepub fn new(config: CompilationConfig) -> Self
pub fn new(config: CompilationConfig) -> Self
Create a new graph compiler with the given configuration.
Sourcepub fn with_default_config() -> Self
pub fn with_default_config() -> Self
Create a compiler with default configuration.
Sourcepub fn compile(
&mut self,
graph: &EinsumGraph,
) -> Result<CompiledGraph, ExecutorError>
pub fn compile( &mut self, graph: &EinsumGraph, ) -> Result<CompiledGraph, ExecutorError>
Compile a graph with the configured optimization passes.
Sourcepub fn set_config(&mut self, config: CompilationConfig)
pub fn set_config(&mut self, config: CompilationConfig)
Update the compilation configuration.
Sourcepub fn config(&self) -> &CompilationConfig
pub fn config(&self) -> &CompilationConfig
Get the current configuration.
Auto Trait Implementations§
impl Freeze for GraphCompiler
impl RefUnwindSafe for GraphCompiler
impl Send for GraphCompiler
impl Sync for GraphCompiler
impl Unpin for GraphCompiler
impl UnwindSafe for GraphCompiler
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