pub struct DevicePtr(/* private fields */);Implementations§
Source§impl DevicePtr
impl DevicePtr
pub const fn null() -> Self
Sourcepub const unsafe fn new(raw: *mut ()) -> Self
pub const unsafe fn new(raw: *mut ()) -> Self
Wraps a raw CUDA device pointer value.
§Safety
raw must be either null or a pointer value that is valid for the CUDA
operation it is passed to. This wrapper does not prove allocation
ownership, size, lifetime, context association, or access permissions.
Sourcepub const unsafe fn from_raw(raw: *mut ()) -> Self
pub const unsafe fn from_raw(raw: *mut ()) -> Self
Wraps a raw CUDA device pointer value.
§Safety
raw must be either null or a pointer value that is valid for the CUDA
operation it is passed to. This wrapper does not prove allocation
ownership, size, lifetime, context association, or access permissions.
pub const fn as_raw(self) -> *mut ()
pub const fn as_ptr(self) -> *mut ()
pub const fn as_const_ptr(self) -> *const ()
pub const fn is_null(self) -> bool
pub const fn cast<T>(self) -> *mut T
Trait Implementations§
impl Copy for DevicePtr
impl Eq for DevicePtr
impl StructuralPartialEq for DevicePtr
Auto Trait Implementations§
impl !Send for DevicePtr
impl !Sync for DevicePtr
impl Freeze for DevicePtr
impl RefUnwindSafe for DevicePtr
impl Unpin for DevicePtr
impl UnsafeUnpin for DevicePtr
impl UnwindSafe for DevicePtr
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