Struct tvm::ir::module::IRModule [−][src]
pub struct IRModule(_);
Implementations
pub fn new<'a, F, T>(funcs: F, types: T) -> Result<IRModule> where
F: IntoIterator<Item = (&'a GlobalVar, &'a BaseFunc)>,
T: IntoIterator<Item = (&'a GlobalTypeVar, &'a TypeData)>,
pub fn parse<N, S>(file_name: N, source: S) -> Result<IRModule> where
N: Into<TVMString>,
S: Into<TVMString>,
pub fn add<F>(&mut self, var: GlobalVar, func: F) -> Result<IRModule> where
F: IsObjectRef,
F::Object: AsRef<<BaseFunc as IsObjectRef>::Object>,
pub fn add_def(
&mut self,
type_name: GlobalTypeVar,
type_data: TypeData,
update: bool
) -> Result<()>
pub fn from_expr<E>(expr: E) -> Result<IRModule> where
E: IsObjectRef,
E::Object: AsRef<<Expr as IsObjectRef>::Object>,
pub fn from_expr_with_items<'a, E, F, T>(
expr: E,
funcs: F,
types: T
) -> Result<IRModule> where
F: IntoIterator<Item = (&'a GlobalVar, &'a BaseFunc)>,
T: IntoIterator<Item = (&'a GlobalTypeVar, &'a TypeData)>,
E: IsObjectRef,
E::Object: AsRef<<Expr as IsObjectRef>::Object>,
Trait Implementations
type Target = IRModuleNode
type Target = IRModuleNode
The resulting type after dereferencing.
Performs the conversion.
Performs the conversion.
type Object = IRModuleNode
fn downcast<U>(self) -> Result<U, Error> where
U: IsObjectRef,
<U as IsObjectRef>::Object: AsRef<Self::Object>,
Auto Trait Implementations
impl RefUnwindSafe for IRModule
impl UnwindSafe for IRModule
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more