#[repr(i32)]pub enum ExecutionContextAllocationStrategy {
kSTATIC = 0,
kON_PROFILE_CHANGE = 1,
kUSER_MANAGED = 2,
}Expand description
! ! \enum ExecutionContextAllocationStrategy ! ! \brief Different memory allocation behaviors for IExecutionContext. ! ! IExecutionContext requires a block of device memory for internal activation tensors during inference. The user can ! either let the execution context manage the memory in various ways or allocate the memory themselves. ! ! \see ICudaEngine::createExecutionContext() ! \see IExecutionContext::setDeviceMemory() !
Variants§
kSTATIC = 0
!< Default static allocation with the maximum size across all profiles.
kON_PROFILE_CHANGE = 1
!< Reallocate for a profile when it’s selected.
kUSER_MANAGED = 2
!< The user supplies custom allocation to the execution context.
Trait Implementations§
Source§impl Clone for ExecutionContextAllocationStrategy
impl Clone for ExecutionContextAllocationStrategy
Source§fn clone(&self) -> ExecutionContextAllocationStrategy
fn clone(&self) -> ExecutionContextAllocationStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<ExecutionContextAllocationStrategy> for ExecutionContextAllocationStrategy
impl From<ExecutionContextAllocationStrategy> for ExecutionContextAllocationStrategy
Source§fn from(value: ExecutionContextAllocationStrategy) -> Self
fn from(value: ExecutionContextAllocationStrategy) -> Self
Converts to this type from the input type.
Source§impl Into<ExecutionContextAllocationStrategy> for ExecutionContextAllocationStrategy
impl Into<ExecutionContextAllocationStrategy> for ExecutionContextAllocationStrategy
Source§fn into(self) -> ExecutionContextAllocationStrategy
fn into(self) -> ExecutionContextAllocationStrategy
Converts this type into the (usually inferred) input type.
Source§impl Ord for ExecutionContextAllocationStrategy
impl Ord for ExecutionContextAllocationStrategy
Source§fn cmp(&self, other: &ExecutionContextAllocationStrategy) -> Ordering
fn cmp(&self, other: &ExecutionContextAllocationStrategy) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ExecutionContextAllocationStrategy
impl PartialEq for ExecutionContextAllocationStrategy
Source§fn eq(&self, other: &ExecutionContextAllocationStrategy) -> bool
fn eq(&self, other: &ExecutionContextAllocationStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ExecutionContextAllocationStrategy
impl PartialOrd for ExecutionContextAllocationStrategy
impl Copy for ExecutionContextAllocationStrategy
impl Eq for ExecutionContextAllocationStrategy
impl StructuralPartialEq for ExecutionContextAllocationStrategy
Auto Trait Implementations§
impl Freeze for ExecutionContextAllocationStrategy
impl RefUnwindSafe for ExecutionContextAllocationStrategy
impl Send for ExecutionContextAllocationStrategy
impl Sync for ExecutionContextAllocationStrategy
impl Unpin for ExecutionContextAllocationStrategy
impl UnsafeUnpin for ExecutionContextAllocationStrategy
impl UnwindSafe for ExecutionContextAllocationStrategy
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