#[non_exhaustive]#[repr(u32)]pub enum ComputeMode {
Default = 0,
Exclusive = 1,
Prohibited = 2,
ExclusiveProcess = 3,
}Expand description
CUDA device compute modes.
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
Default compute mode; multiple threads can use Device::set_current with this device.
Exclusive = 1
Compute-exclusive-thread mode; only one thread in one process can use Device::set_current with this device.
Prohibited = 2
Compute-prohibited mode; no threads can use Device::set_current with this device.
ExclusiveProcess = 3
Compute-exclusive-process mode; many threads in one process can use Device::set_current with this device.
Trait Implementations§
Source§impl Clone for ComputeMode
impl Clone for ComputeMode
impl Copy for ComputeMode
Source§impl Debug for ComputeMode
impl Debug for ComputeMode
Source§impl Display for ComputeMode
impl Display for ComputeMode
impl Eq for ComputeMode
Source§impl From<ComputeMode> for u32
impl From<ComputeMode> for u32
Source§fn from(enum_value: ComputeMode) -> Self
fn from(enum_value: ComputeMode) -> Self
Converts to this type from the input type.
Source§impl From<ComputeMode> for cudaComputeMode
impl From<ComputeMode> for cudaComputeMode
Source§fn from(value: ComputeMode) -> Self
fn from(value: ComputeMode) -> Self
Converts to this type from the input type.
Source§impl Hash for ComputeMode
impl Hash for ComputeMode
Source§impl PartialEq for ComputeMode
impl PartialEq for ComputeMode
impl StructuralPartialEq for ComputeMode
Source§impl TryFrom<cudaComputeMode> for ComputeMode
impl TryFrom<cudaComputeMode> for ComputeMode
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: cudaComputeMode) -> Result<Self, UnknownEnumValue>
fn try_from(value: cudaComputeMode) -> Result<Self, UnknownEnumValue>
Performs the conversion.
Source§impl TryFrom<u32> for ComputeMode
impl TryFrom<u32> for ComputeMode
Source§type Error = TryFromPrimitiveError<ComputeMode>
type Error = TryFromPrimitiveError<ComputeMode>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for ComputeMode
impl TryFromPrimitive for ComputeMode
const NAME: &'static str = "ComputeMode"
type Primitive = u32
type Error = TryFromPrimitiveError<ComputeMode>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Forget for ComputeMode
impl Freeze for ComputeMode
impl Move for ComputeMode
impl RefUnwindSafe for ComputeMode
impl Send for ComputeMode
impl Sync for ComputeMode
impl Unpin for ComputeMode
impl UnsafeUnpin for ComputeMode
impl UnwindSafe for ComputeMode
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.