#[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
Source§fn clone(&self) -> ComputeMode
fn clone(&self) -> ComputeMode
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 moreimpl Copy for ComputeMode
Source§impl Debug for ComputeMode
impl Debug 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 From<cudaComputeMode> for ComputeMode
impl From<cudaComputeMode> for ComputeMode
Source§fn from(value: cudaComputeMode) -> Self
fn from(value: cudaComputeMode) -> 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
Source§fn eq(&self, other: &ComputeMode) -> bool
fn eq(&self, other: &ComputeMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ComputeMode
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 Freeze 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