pub struct OpenedIpcMemory<T> { /* private fields */ }Implementations§
Source§impl<T> OpenedIpcMemory<T>
impl<T> OpenedIpcMemory<T>
pub const fn as_ptr(&self) -> *mut T
Sourcepub fn close(self) -> Result<()>
pub fn close(self) -> Result<()>
Decrements the reference count of the memory returned by IpcMemoryHandle::create_mapping by 1.
When the reference count reaches 0, this unmaps the memory.
The original allocation in the exporting process and imported mappings
in other processes are unaffected.
Resources used to enable peer access are freed if this is the last mapping using them.
IPC is restricted to devices with support for unified addressing on Linux and Windows operating systems.
IPC on Windows is supported for compatibility, but is not recommended
because it has a performance cost.
Check device IPC support through the device properties exposed by this crate, for example DeviceProperties::ipc_event_supported.
Additional CUDA diagnostics:
- This call may also return
crate::error::Status::NotInitialized,crate::error::Status::CallRequiresNewerDriver, orcrate::error::Status::NoDeviceif it initializes internal CUDA runtime state. - Callbacks must not call CUDA functions; see
Stream::add_callback.crate::error::Status::NotPermittedmay, but is not guaranteed to, be returned as a diagnostic in that case.
§Errors
Returns an error if CUDA Runtime cannot close the imported mapping.