#[non_exhaustive]#[repr(u32)]pub enum SharedMemoryMode {
Default = 0,
RequirePortable = 1,
AllowNonPortable = 2,
AllowOversizedSharedMemory = 3,
PreferOversizedSharedMemory = 4,
}Expand description
Shared memory configuration for a kernel.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Default = 0
Uses the function’s FunctionAttribute::MaxDynamicSharedSizeBytes for shared memory on launch.
RequirePortable = 1
Requires the requested dynamic shared memory size to be portable, within DeviceAttribute::MaxSharedMemoryPerBlock.
AllowNonPortable = 2
Allows a non-portable dynamic shared memory size, within DeviceAttribute::MaxSharedMemoryPerBlockOptin.
Specifies that oversized shared memory configurations may be used (with the limitation of only 8kB L1 cache).
Specifies that oversized shared memory configurations may be used (with the limitation of only 8kB L1 cache), and prefer an oversized shared memory configuration.
Trait Implementations§
Source§fn from(enum_value: SharedMemoryMode) -> Self
fn from(enum_value: SharedMemoryMode) -> Self
Converts to this type from the input type.
Source§fn from(value: SharedMemoryMode) -> Self
fn from(value: SharedMemoryMode) -> Self
Converts to this type from the input type.
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: CUsharedMemoryMode_enum) -> Result<Self, UnknownEnumValue>
fn try_from(value: CUsharedMemoryMode_enum) -> Result<Self, UnknownEnumValue>
Performs the conversion.
Source§type Error = TryFromPrimitiveError<SharedMemoryMode>
type Error = TryFromPrimitiveError<SharedMemoryMode>
The type returned in the event of a conversion error.
const NAME: &'static str = "SharedMemoryMode"
type Primitive = u32
type Error = TryFromPrimitiveError<SharedMemoryMode>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
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
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
Compare self to
key and return true if they are equal.