pub struct UnifiedMemoryBuffer<T> { /* private fields */ }Expand description
Unified memory buffer for CUDA
Implementations§
Source§impl<T> UnifiedMemoryBuffer<T>
impl<T> UnifiedMemoryBuffer<T>
Sourcepub fn new(size: usize, device_id: u32) -> Result<Self, SimdError>
pub fn new(size: usize, device_id: u32) -> Result<Self, SimdError>
Create a new unified memory buffer
Sourcepub fn as_mut_slice(&mut self) -> &mut [T]
pub fn as_mut_slice(&mut self) -> &mut [T]
Get mutable slice to the data
Sourcepub fn prefetch_to_gpu(&self) -> Result<(), SimdError>
pub fn prefetch_to_gpu(&self) -> Result<(), SimdError>
Prefetch to GPU
Sourcepub fn prefetch_to_cpu(&self) -> Result<(), SimdError>
pub fn prefetch_to_cpu(&self) -> Result<(), SimdError>
Prefetch to CPU
Trait Implementations§
Source§impl<T: Debug> Debug for UnifiedMemoryBuffer<T>
impl<T: Debug> Debug for UnifiedMemoryBuffer<T>
Source§impl<T> Drop for UnifiedMemoryBuffer<T>
impl<T> Drop for UnifiedMemoryBuffer<T>
impl<T: Send> Send for UnifiedMemoryBuffer<T>
impl<T: Sync> Sync for UnifiedMemoryBuffer<T>
Auto Trait Implementations§
impl<T> Freeze for UnifiedMemoryBuffer<T>
impl<T> RefUnwindSafe for UnifiedMemoryBuffer<T>where
T: RefUnwindSafe,
impl<T> Unpin for UnifiedMemoryBuffer<T>
impl<T> UnsafeUnpin for UnifiedMemoryBuffer<T>
impl<T> UnwindSafe for UnifiedMemoryBuffer<T>where
T: RefUnwindSafe,
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