pub struct PinnedMemoryStorage { /* private fields */ }Expand description
Manages pinned host memory for HIP operations.
This storage handles allocation and deallocation of pinned (page-locked) host memory, which is optimized for fast data transfers between host and GPU in HIP applications.
Implementations§
Source§impl PinnedMemoryStorage
impl PinnedMemoryStorage
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new PinnedMemoryStorage instance.
Initializes the storage with the default pinned memory alignment defined by PINNED_MEMORY_ALIGNMENT.
Trait Implementations§
Source§impl ComputeStorage for PinnedMemoryStorage
impl ComputeStorage for PinnedMemoryStorage
Source§type Resource = PinnedMemoryResource
type Resource = PinnedMemoryResource
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) -> Result<StorageHandle, IoError>
fn alloc(&mut self, size: u64) -> Result<StorageHandle, IoError>
Allocates
size units of memory and returns a handle to itSource§impl Default for PinnedMemoryStorage
impl Default for PinnedMemoryStorage
impl Send for PinnedMemoryStorage
Auto Trait Implementations§
impl Freeze for PinnedMemoryStorage
impl RefUnwindSafe for PinnedMemoryStorage
impl !Sync for PinnedMemoryStorage
impl Unpin for PinnedMemoryStorage
impl UnwindSafe for PinnedMemoryStorage
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more