Struct async_tensorrt::ffi::parser::Parser
source · pub struct Parser(/* private fields */);
Expand description
For parsing an ONNX model into a TensorRT network definition (crate::NetworkDefinition
).
Implementations§
source§impl Parser
impl Parser
sourcepub fn parse_network_definition_from_file(
network_definition: NetworkDefinition,
path: &impl AsRef<Path>
) -> Result<NetworkDefinition, Error>
pub fn parse_network_definition_from_file( network_definition: NetworkDefinition, path: &impl AsRef<Path> ) -> Result<NetworkDefinition, Error>
Create new parser, parse ONNX file and return a crate::NetworkDefinition
.
Note that this function is CPU-intensive. Callers should not use it in async context or spawn a blocking task for it.
Arguments
network_definition
- Network definition to use.path
- Path to file to parse.
Return value
Parsed network definition.
sourcepub fn as_mut_ptr(&mut self) -> *mut c_void
pub fn as_mut_ptr(&mut self) -> *mut c_void
Get internal mutable pointer.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Parser
impl !Send for Parser
impl !Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
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