#[repr(C)]pub struct LaunchablePtr<T>(_);
Expand description
A pointer to immutable memory that can be dereferenced on the GPU.
LaunchablePtr
is intended to be passed as an argument to a CUDA kernel
function. For example, it can be passed to RUSTACuda’s launch!()
macro.
LaunchablePtr
must not be dereferenced on the CPU, as it may point to
device memory.
LaunchablePtr
is guaranteed to have an equivalent internal
representation to a raw pointer. Thus, it can be safely reinterpreted or
transmuted to *const T
.
Implementations
sourceimpl<T: DeviceCopy> LaunchablePtr<T>
impl<T: DeviceCopy> LaunchablePtr<T>
sourcepub fn as_void(&self) -> LaunchablePtr<c_void>
pub fn as_void(&self) -> LaunchablePtr<c_void>
Cast internal pointer to void pointer.
sourcepub unsafe fn offset(self, count: isize) -> LaunchablePtr<T>
pub unsafe fn offset(self, count: isize) -> LaunchablePtr<T>
Calculates the offset from a pointer
Trait Implementations
sourceimpl<T> Clone for LaunchablePtr<T>
impl<T> Clone for LaunchablePtr<T>
Implement Clone trait to support cloning std::ffi::c_void
pointers.
c_void
doesn’t implement Clone, thus can’t be derived automatically.
sourceimpl<T: Debug> Debug for LaunchablePtr<T>
impl<T: Debug> Debug for LaunchablePtr<T>
sourceimpl<T> From<DevicePointer<T>> for LaunchablePtr<T>
impl<T> From<DevicePointer<T>> for LaunchablePtr<T>
sourceimpl<T: DeviceCopy> From<UnifiedPointer<T>> for LaunchablePtr<T>
impl<T: DeviceCopy> From<UnifiedPointer<T>> for LaunchablePtr<T>
sourceimpl<T: Hash> Hash for LaunchablePtr<T>
impl<T: Hash> Hash for LaunchablePtr<T>
sourceimpl<T: PartialEq> PartialEq<LaunchablePtr<T>> for LaunchablePtr<T>
impl<T: PartialEq> PartialEq<LaunchablePtr<T>> for LaunchablePtr<T>
sourcefn eq(&self, other: &LaunchablePtr<T>) -> bool
fn eq(&self, other: &LaunchablePtr<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LaunchablePtr<T>) -> bool
fn ne(&self, other: &LaunchablePtr<T>) -> bool
This method tests for !=
.
impl<T: Copy> Copy for LaunchablePtr<T>
impl<T: DeviceCopy> DeviceCopy for LaunchablePtr<T>
impl<T: Eq> Eq for LaunchablePtr<T>
impl<T> StructuralEq for LaunchablePtr<T>
impl<T> StructuralPartialEq for LaunchablePtr<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for LaunchablePtr<T> where
T: RefUnwindSafe,
impl<T> !Send for LaunchablePtr<T>
impl<T> !Sync for LaunchablePtr<T>
impl<T> Unpin for LaunchablePtr<T>
impl<T> UnwindSafe for LaunchablePtr<T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more