pub struct MappedAllocation { /* private fields */ }Expand description
Retains a native mapping, its imported memory object, and the actual CUDA context.
Raw addresses and regions grant neither initialized access nor permission to enqueue conflicting work.
Implementations§
Source§impl MappedAllocation
impl MappedAllocation
Sourcepub const fn id(&self) -> AllocationId
pub const fn id(&self) -> AllocationId
Returns the stable allocation identity shared by views and casts of this mapping.
Sourcepub fn context(&self) -> &Arc<Context> ⓘ
pub fn context(&self) -> &Arc<Context> ⓘ
Returns the CUDA context retained by the imported-memory owner.
Sourcepub const fn as_ptr(&self) -> *mut u8
pub const fn as_ptr(&self) -> *mut u8
Returns the device mapping’s raw byte address without granting initialized access or host accessibility.
Sourcepub const fn external_offset_bytes(&self) -> usize
pub const fn external_offset_bytes(&self) -> usize
Returns the offset of this native mapping in the original external object.
Sourcepub fn external_memory(&self) -> &ExternalMemory
pub fn external_memory(&self) -> &ExternalMemory
Borrows the imported-memory owner retained until after the native mapping is freed.
Trait Implementations§
Source§impl Debug for MappedAllocation
impl Debug for MappedAllocation
Source§impl DeviceRegionProvider for MappedAllocation
impl DeviceRegionProvider for MappedAllocation
Source§fn region(&self) -> DeviceRegion<'_>
fn region(&self) -> DeviceRegion<'_>
Borrows the exact allocation range described by this provider’s pointers.
Source§impl Drop for MappedAllocation
impl Drop for MappedAllocation
impl Send for MappedAllocation
impl Sync for MappedAllocation
Auto Trait Implementations§
impl !RefUnwindSafe for MappedAllocation
impl !UnwindSafe for MappedAllocation
impl Forget for MappedAllocation
impl Freeze for MappedAllocation
impl Move for MappedAllocation
impl Unpin for MappedAllocation
impl UnsafeUnpin for MappedAllocation
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