pub struct PinnedRegistration<'a, T: DeviceRepr> { /* private fields */ }Expand description
Pin an existing Rust slice for the lifetime of this guard. Unpin on drop.
Use this when the host buffer already exists (e.g. from a Vec<T>) and
you want cuMemcpy*Async to fast-path on it.
Implementations§
Source§impl<'a, T: DeviceRepr> PinnedRegistration<'a, T>
impl<'a, T: DeviceRepr> PinnedRegistration<'a, T>
pub fn register_with_flags(slice: &'a mut [T], flags: u32) -> Result<Self>
Sourcepub fn device_ptr(&self) -> Result<CUdeviceptr>
pub fn device_ptr(&self) -> Result<CUdeviceptr>
Device-side pointer aliasing this pinned region (requires DEVICEMAP).
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<T: DeviceRepr> Debug for PinnedRegistration<'_, T>
impl<T: DeviceRepr> Debug for PinnedRegistration<'_, T>
Source§impl<T: DeviceRepr> Drop for PinnedRegistration<'_, T>
impl<T: DeviceRepr> Drop for PinnedRegistration<'_, T>
impl<T: DeviceRepr + Send> Send for PinnedRegistration<'_, T>
impl<T: DeviceRepr + Sync> Sync for PinnedRegistration<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for PinnedRegistration<'a, T>
impl<'a, T> RefUnwindSafe for PinnedRegistration<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Unpin for PinnedRegistration<'a, T>
impl<'a, T> UnsafeUnpin for PinnedRegistration<'a, T>
impl<'a, T> !UnwindSafe for PinnedRegistration<'a, T>
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