Struct gpu_alloc_ash::AshMemoryDevice
source · [−]#[repr(transparent)]pub struct AshMemoryDevice { /* private fields */ }
Implementations
Trait Implementations
sourceimpl MemoryDevice<DeviceMemory> for AshMemoryDevice
impl MemoryDevice<DeviceMemory> for AshMemoryDevice
sourceunsafe 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
sourceunsafe fn deallocate_memory(&self, memory: DeviceMemory)
unsafe fn deallocate_memory(&self, memory: DeviceMemory)
Deallocate memory object. Read more
sourceunsafe 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
sourceunsafe fn unmap_memory(&self, memory: &mut DeviceMemory)
unsafe fn unmap_memory(&self, memory: &mut DeviceMemory)
Unmap previously mapped memory region. Read more
sourceunsafe 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
sourceunsafe 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
Auto Trait Implementations
impl RefUnwindSafe for AshMemoryDevice
impl Send for AshMemoryDevice
impl Sync for AshMemoryDevice
impl Unpin for AshMemoryDevice
impl UnwindSafe for AshMemoryDevice
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more