#[non_exhaustive]#[repr(u32)]pub enum MemoryCopyKind {
HostToHost = 0,
HostToDevice = 1,
DeviceToHost = 2,
DeviceToDevice = 3,
Default = 4,
}Expand description
Direction of a CUDA memory copy.
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.
HostToHost = 0
Copies from host memory to host memory.
HostToDevice = 1
Copies from host memory to device memory.
DeviceToHost = 2
Copies from device memory to host memory.
DeviceToDevice = 3
Copies from device memory to device memory.
Default = 4
Direction of the transfer is inferred from the pointer values. Requires unified virtual addressing.
Trait Implementations§
Source§impl Clone for MemoryCopyKind
impl Clone for MemoryCopyKind
impl Copy for MemoryCopyKind
Source§impl Debug for MemoryCopyKind
impl Debug for MemoryCopyKind
Source§impl Display for MemoryCopyKind
impl Display for MemoryCopyKind
impl Eq for MemoryCopyKind
Source§impl From<MemoryCopyKind> for u32
impl From<MemoryCopyKind> for u32
Source§fn from(enum_value: MemoryCopyKind) -> Self
fn from(enum_value: MemoryCopyKind) -> Self
Converts to this type from the input type.
Source§impl From<MemoryCopyKind> for cudaMemcpyKind
impl From<MemoryCopyKind> for cudaMemcpyKind
Source§fn from(value: MemoryCopyKind) -> Self
fn from(value: MemoryCopyKind) -> Self
Converts to this type from the input type.
Source§impl Hash for MemoryCopyKind
impl Hash for MemoryCopyKind
Source§impl PartialEq for MemoryCopyKind
impl PartialEq for MemoryCopyKind
impl StructuralPartialEq for MemoryCopyKind
Source§impl TryFrom<cudaMemcpyKind> for MemoryCopyKind
impl TryFrom<cudaMemcpyKind> for MemoryCopyKind
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: cudaMemcpyKind) -> Result<Self, UnknownEnumValue>
fn try_from(value: cudaMemcpyKind) -> Result<Self, UnknownEnumValue>
Performs the conversion.
Source§impl TryFrom<u32> for MemoryCopyKind
impl TryFrom<u32> for MemoryCopyKind
Source§type Error = TryFromPrimitiveError<MemoryCopyKind>
type Error = TryFromPrimitiveError<MemoryCopyKind>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for MemoryCopyKind
impl TryFromPrimitive for MemoryCopyKind
const NAME: &'static str = "MemoryCopyKind"
type Primitive = u32
type Error = TryFromPrimitiveError<MemoryCopyKind>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Forget for MemoryCopyKind
impl Freeze for MemoryCopyKind
impl Move for MemoryCopyKind
impl RefUnwindSafe for MemoryCopyKind
impl Send for MemoryCopyKind
impl Sync for MemoryCopyKind
impl Unpin for MemoryCopyKind
impl UnsafeUnpin for MemoryCopyKind
impl UnwindSafe for MemoryCopyKind
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.