pub struct Runtime { /* private fields */ }Expand description
Owned TensorRT runtime. Created around a user-supplied logger (the logger pointer is passed verbatim; safety responsibility is on the caller).
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub unsafe fn new(logger: trtILogger_t) -> Result<Self>
pub unsafe fn new(logger: trtILogger_t) -> Result<Self>
§Safety
logger must be a valid nvinfer1::ILogger* (typically obtained from
C++ or passed through a thin shim). Use Runtime::with_null_logger
if no logging is desired (TRT allows nullptr in recent versions).
Sourcepub fn with_null_logger() -> Result<Self>
pub fn with_null_logger() -> Result<Self>
Construct without a logger. Supported on recent TensorRT; older versions may refuse and return null.
pub fn deserialize(&self, blob: &[u8]) -> Result<Engine<'_>>
pub fn as_raw(&self) -> trtIRuntime_t
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl RefUnwindSafe for Runtime
impl !Send for Runtime
impl !Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl UnwindSafe for Runtime
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