#[non_exhaustive]#[repr(u32)]pub enum MemoryPoolAttribute {
ReuseFollowEventDependencies = 1,
ReuseAllowOpportunistic = 2,
ReuseAllowInternalDependencies = 3,
ReleaseThreshold = 4,
ReservedMemoryCurrent = 5,
ReservedMemoryHigh = 6,
UsedMemoryCurrent = 7,
UsedMemoryHigh = 8,
}Expand description
Attribute of a CUDA memory pool, read and written as a MemoryPoolAttributeValue.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ReuseFollowEventDependencies = 1
Allows stream-ordered allocations to reuse memory freed on another stream when the allocating stream depends on that free.
Events and default-stream interactions can create the dependency.
A MemoryPoolAttributeValue::Bool, enabled by default.
ReuseAllowOpportunistic = 2
Allows reuse of completed frees that the allocation does not depend on.
A MemoryPoolAttributeValue::Bool, enabled by default.
ReuseAllowInternalDependencies = 3
Allows stream-ordered allocations to insert stream dependencies so they can reuse memory from stream-ordered frees.
A MemoryPoolAttributeValue::Bool, enabled by default.
ReleaseThreshold = 4
Reserved bytes the pool holds before releasing memory back to the operating system.
Above the threshold, the allocator releases memory at the next stream, event, or context synchronization.
A MemoryPoolAttributeValue::Bytes, zero by default.
ReservedMemoryCurrent = 5
Backing memory currently allocated for the pool, as MemoryPoolAttributeValue::Bytes.
ReservedMemoryHigh = 6
High watermark of backing memory since the last reset, as MemoryPoolAttributeValue::Bytes.
It can only be reset to zero.
UsedMemoryCurrent = 7
Pool memory currently in use by the application, as MemoryPoolAttributeValue::Bytes.
UsedMemoryHigh = 8
High watermark of pool memory in use since the last reset, as MemoryPoolAttributeValue::Bytes.
It can only be reset to zero.
Trait Implementations§
Source§impl Clone for MemoryPoolAttribute
impl Clone for MemoryPoolAttribute
impl Copy for MemoryPoolAttribute
Source§impl Debug for MemoryPoolAttribute
impl Debug for MemoryPoolAttribute
Source§impl Display for MemoryPoolAttribute
impl Display for MemoryPoolAttribute
impl Eq for MemoryPoolAttribute
Source§impl From<MemoryPoolAttribute> for u32
impl From<MemoryPoolAttribute> for u32
Source§fn from(enum_value: MemoryPoolAttribute) -> Self
fn from(enum_value: MemoryPoolAttribute) -> Self
Source§impl From<MemoryPoolAttribute> for CUmemPool_attribute
impl From<MemoryPoolAttribute> for CUmemPool_attribute
Source§fn from(value: MemoryPoolAttribute) -> Self
fn from(value: MemoryPoolAttribute) -> Self
Source§impl Hash for MemoryPoolAttribute
impl Hash for MemoryPoolAttribute
Source§impl PartialEq for MemoryPoolAttribute
impl PartialEq for MemoryPoolAttribute
impl StructuralPartialEq for MemoryPoolAttribute
Source§impl TryFrom<CUmemPool_attribute_enum> for MemoryPoolAttribute
impl TryFrom<CUmemPool_attribute_enum> for MemoryPoolAttribute
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: CUmemPool_attribute) -> Result<Self, UnknownEnumValue>
fn try_from(value: CUmemPool_attribute) -> Result<Self, UnknownEnumValue>
Source§impl TryFrom<u32> for MemoryPoolAttribute
impl TryFrom<u32> for MemoryPoolAttribute
Source§type Error = TryFromPrimitiveError<MemoryPoolAttribute>
type Error = TryFromPrimitiveError<MemoryPoolAttribute>
Source§impl TryFromPrimitive for MemoryPoolAttribute
impl TryFromPrimitive for MemoryPoolAttribute
const NAME: &'static str = "MemoryPoolAttribute"
type Primitive = u32
type Error = TryFromPrimitiveError<MemoryPoolAttribute>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Forget for MemoryPoolAttribute
impl Freeze for MemoryPoolAttribute
impl Move for MemoryPoolAttribute
impl RefUnwindSafe for MemoryPoolAttribute
impl Send for MemoryPoolAttribute
impl Sync for MemoryPoolAttribute
impl Unpin for MemoryPoolAttribute
impl UnsafeUnpin for MemoryPoolAttribute
impl UnwindSafe for MemoryPoolAttribute
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.