pub trait AdvancedMemoryManager: DeviceMemoryManager {
// Required methods
fn map_memory<'life0, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
access: MemoryAccess,
) -> Pin<Box<dyn Future<Output = Result<*mut u8>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unmap_memory<'life0, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_mapping<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src_device: &'life1 Device,
dst_device: &'life2 Device,
size: usize,
) -> Pin<Box<dyn Future<Output = Result<(MemoryHandle, MemoryHandle)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn prefetch<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
target_device: &'life1 Device,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn access_stats(&self, handle: MemoryHandle) -> Option<MemoryAccessStats>;
fn set_usage_hint<'life0, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
hint: MemoryUsageHint,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Advanced memory operations
Required Methods§
Sourcefn map_memory<'life0, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
access: MemoryAccess,
) -> Pin<Box<dyn Future<Output = Result<*mut u8>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn map_memory<'life0, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
access: MemoryAccess,
) -> Pin<Box<dyn Future<Output = Result<*mut u8>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Map memory for direct CPU access
Sourcefn unmap_memory<'life0, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unmap_memory<'life0, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unmap previously mapped memory
Sourcefn create_mapping<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src_device: &'life1 Device,
dst_device: &'life2 Device,
size: usize,
) -> Pin<Box<dyn Future<Output = Result<(MemoryHandle, MemoryHandle)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_mapping<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
src_device: &'life1 Device,
dst_device: &'life2 Device,
size: usize,
) -> Pin<Box<dyn Future<Output = Result<(MemoryHandle, MemoryHandle)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create memory mapping between devices
Sourcefn prefetch<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
target_device: &'life1 Device,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn prefetch<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
target_device: &'life1 Device,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Enable memory prefetching
Sourcefn access_stats(&self, handle: MemoryHandle) -> Option<MemoryAccessStats>
fn access_stats(&self, handle: MemoryHandle) -> Option<MemoryAccessStats>
Get memory access pattern statistics
Sourcefn set_usage_hint<'life0, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
hint: MemoryUsageHint,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_usage_hint<'life0, 'async_trait>(
&'life0 self,
handle: MemoryHandle,
hint: MemoryUsageHint,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set memory usage hints