Struct gpu_alloc_ash::AshMemoryDevice
source · [−]#[repr(transparent)]pub struct AshMemoryDevice { /* private fields */ }
Implementations
Trait Implementations
unsafe fn allocate_memory(
&self,
size: u64,
memory_type: u32,
flags: AllocationFlags
) -> Result<DeviceMemory, OutOfMemory>
unsafe fn allocate_memory(
&self,
size: u64,
memory_type: u32,
flags: AllocationFlags
) -> Result<DeviceMemory, OutOfMemory>
Allocates new memory object from device. This function may be expensive and even limit maximum number of memory objects allocated. Which is the reason for sub-allocation this crate provides. Read more
Deallocate memory object. Read more
unsafe fn map_memory(
&self,
memory: &mut DeviceMemory,
offset: u64,
size: u64
) -> Result<NonNull<u8>, DeviceMapError>
unsafe fn map_memory(
&self,
memory: &mut DeviceMemory,
offset: u64,
size: u64
) -> Result<NonNull<u8>, DeviceMapError>
Map region of device memory to host memory space. Read more
Unmap previously mapped memory region. Read more
unsafe fn invalidate_memory_ranges(
&self,
ranges: &[MappedMemoryRange<'_, DeviceMemory>]
) -> Result<(), OutOfMemory>
unsafe fn invalidate_memory_ranges(
&self,
ranges: &[MappedMemoryRange<'_, DeviceMemory>]
) -> Result<(), OutOfMemory>
Invalidates ranges of memory mapped regions. Read more
unsafe fn flush_memory_ranges(
&self,
ranges: &[MappedMemoryRange<'_, DeviceMemory>]
) -> Result<(), OutOfMemory>
unsafe fn flush_memory_ranges(
&self,
ranges: &[MappedMemoryRange<'_, DeviceMemory>]
) -> Result<(), OutOfMemory>
Flushes ranges of memory mapped regions. Read more