pub struct ExecutionContext<'e> { /* private fields */ }Implementations§
Source§impl ExecutionContext<'_>
impl ExecutionContext<'_>
pub fn as_raw(&self) -> trtIExecutionContext_t
pub fn set_input_shape(&self, name: &str, dims: Dims) -> Result<()>
pub fn set_tensor_address(&self, name: &str, addr: *mut c_void) -> Result<()>
pub fn tensor_shape(&self, name: &str) -> Result<Dims>
Sourcepub fn tensor_address(&self, name: &str) -> Result<*mut c_void>
pub fn tensor_address(&self, name: &str) -> Result<*mut c_void>
Read the current bound device address for a tensor (null if unset).
Sourcepub unsafe fn enqueue_v3(&self, stream: cudaStream_t) -> Result<()>
pub unsafe fn enqueue_v3(&self, stream: cudaStream_t) -> Result<()>
Enqueue the inference on the given CUDA stream. Returns Ok if TRT reports success; the stream is still responsible for ordering, and the caller must ensure all tensor addresses have been set.
§Safety
stream must be a valid cudaStream_t that outlives the enqueue.
Trait Implementations§
Source§impl<'e> Debug for ExecutionContext<'e>
impl<'e> Debug for ExecutionContext<'e>
Auto Trait Implementations§
impl<'e> Freeze for ExecutionContext<'e>
impl<'e> RefUnwindSafe for ExecutionContext<'e>
impl<'e> !Send for ExecutionContext<'e>
impl<'e> !Sync for ExecutionContext<'e>
impl<'e> Unpin for ExecutionContext<'e>
impl<'e> UnsafeUnpin for ExecutionContext<'e>
impl<'e> UnwindSafe for ExecutionContext<'e>
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