pub struct HipStorage { /* private fields */ }Expand description
Buffer storage for HIP.
Implementations§
Source§impl HipStorage
impl HipStorage
Keeps actual HIP buffer references in a hashmap with ids as key.
Sourcepub fn new(stream: hipStream_t) -> Self
pub fn new(stream: hipStream_t) -> Self
Create a new storage on the given stream.
Sourcepub fn perform_deallocations(&mut self)
pub fn perform_deallocations(&mut self)
Actually deallocates buffers tagged to be deallocated.
pub fn flush(&mut self)
Trait Implementations§
Source§impl ComputeStorage for HipStorage
impl ComputeStorage for HipStorage
Source§type Resource = HipResource
type Resource = HipResource
The resource associated type determines the way data is implemented and how
it can be accessed by kernels.
Source§fn get(&mut self, handle: &StorageHandle) -> Self::Resource
fn get(&mut self, handle: &StorageHandle) -> Self::Resource
Returns the underlying resource for a specified storage handle
Source§fn alloc(&mut self, size: u64) -> StorageHandle
fn alloc(&mut self, size: u64) -> StorageHandle
Allocates
size units of memory and returns a handle to itSource§impl Debug for HipStorage
impl Debug for HipStorage
impl Send for HipStorage
Auto Trait Implementations§
impl Freeze for HipStorage
impl RefUnwindSafe for HipStorage
impl !Sync for HipStorage
impl Unpin for HipStorage
impl UnwindSafe for HipStorage
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