#[repr(C)]pub struct cudaPointerAttributes {
pub type_: cudaMemoryType,
pub device: c_int,
pub devicePointer: *mut c_void,
pub hostPointer: *mut c_void,
pub reserved: [c_long; 8],
}Expand description
CUDA pointer attributes.
Fields§
§type_: cudaMemoryType§device: c_intThe device against which the memory was allocated or registered. If the memory type is cudaMemoryType::cudaMemoryTypeDevice then this identifies the device on which the memory referred physically resides. If the memory type is cudaMemoryType::cudaMemoryTypeHost then this identifies the device which was current when the memory was allocated or registered (and if that device is deinitialized
then this allocation will vanish with that device’s state).
devicePointer: *mut c_voidThe address which may be dereferenced on the current device to access the memory or NULL if no such address exists.
hostPointer: *mut c_voidThe address which may be dereferenced on the host to access the memory or NULL if no such address exists.
Note:
CUDA doesn't check if unregistered memory is allocated so this field may contain invalid pointer if an invalid pointer has
been passed to CUDA.reserved: [c_long; 8]Must be zero.
Trait Implementations§
Source§impl Clone for cudaPointerAttributes
impl Clone for cudaPointerAttributes
Source§fn clone(&self) -> cudaPointerAttributes
fn clone(&self) -> cudaPointerAttributes
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 cudaPointerAttributes
Source§impl Debug for cudaPointerAttributes
impl Debug for cudaPointerAttributes
Source§impl Default for cudaPointerAttributes
impl Default for cudaPointerAttributes
impl Eq for cudaPointerAttributes
Source§impl Hash for cudaPointerAttributes
impl Hash for cudaPointerAttributes
Source§impl Ord for cudaPointerAttributes
impl Ord for cudaPointerAttributes
Source§fn cmp(&self, other: &cudaPointerAttributes) -> Ordering
fn cmp(&self, other: &cudaPointerAttributes) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for cudaPointerAttributes
impl PartialEq for cudaPointerAttributes
Source§fn eq(&self, other: &cudaPointerAttributes) -> bool
fn eq(&self, other: &cudaPointerAttributes) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for cudaPointerAttributes
impl PartialOrd for cudaPointerAttributes
impl StructuralPartialEq for cudaPointerAttributes
Auto Trait Implementations§
impl !Send for cudaPointerAttributes
impl !Sync for cudaPointerAttributes
impl Freeze for cudaPointerAttributes
impl RefUnwindSafe for cudaPointerAttributes
impl Unpin for cudaPointerAttributes
impl UnsafeUnpin for cudaPointerAttributes
impl UnwindSafe for cudaPointerAttributes
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