pub struct ExchangeWrapperOnHost<T: RustToCuda<CudaAllocation: EmptyCudaAlloc>> { /* private fields */ }
Available on crate feature
host
only.Implementations§
source§impl<T: RustToCuda<CudaAllocation: EmptyCudaAlloc>> ExchangeWrapperOnHost<T>
impl<T: RustToCuda<CudaAllocation: EmptyCudaAlloc>> ExchangeWrapperOnHost<T>
sourcepub fn new(value: T) -> CudaResult<Self>
pub fn new(value: T) -> CudaResult<Self>
§Errors
Returns a rustacuda::error::CudaError
iff an error occurs inside
CUDA
sourcepub fn move_to_device(self) -> CudaResult<ExchangeWrapperOnDevice<T>>
pub fn move_to_device(self) -> CudaResult<ExchangeWrapperOnDevice<T>>
Moves the data synchronously to the CUDA device, where it can then be
lent out immutably via ExchangeWrapperOnDevice::as_ref
, or mutably
via ExchangeWrapperOnDevice::as_mut_async
.
§Errors
Returns a rustacuda::error::CudaError
iff an error occurs inside
CUDA
source§impl<T: RustToCudaAsync<CudaAllocationAsync: EmptyCudaAlloc, CudaAllocation: EmptyCudaAlloc>> ExchangeWrapperOnHost<T>
impl<T: RustToCudaAsync<CudaAllocationAsync: EmptyCudaAlloc, CudaAllocation: EmptyCudaAlloc>> ExchangeWrapperOnHost<T>
sourcepub fn move_to_device_async<'stream>(
self,
stream: Stream<'stream>,
) -> CudaResult<Async<'static, 'stream, ExchangeWrapperOnDevice<T>, NoCompletion>>
pub fn move_to_device_async<'stream>( self, stream: Stream<'stream>, ) -> CudaResult<Async<'static, 'stream, ExchangeWrapperOnDevice<T>, NoCompletion>>
Moves the data asynchronously to the CUDA device.
§Errors
Returns a rustacuda::error::CudaError
iff an error occurs inside
CUDA
Trait Implementations§
source§impl<T: RustToCuda<CudaAllocation: EmptyCudaAlloc>> Deref for ExchangeWrapperOnHost<T>
impl<T: RustToCuda<CudaAllocation: EmptyCudaAlloc>> Deref for ExchangeWrapperOnHost<T>
source§impl<T: RustToCuda<CudaAllocation: EmptyCudaAlloc>> DerefMut for ExchangeWrapperOnHost<T>
impl<T: RustToCuda<CudaAllocation: EmptyCudaAlloc>> DerefMut for ExchangeWrapperOnHost<T>
Auto Trait Implementations§
impl<T> Freeze for ExchangeWrapperOnHost<T>
impl<T> !PortableBitSemantics for ExchangeWrapperOnHost<T>
impl<T> RefUnwindSafe for ExchangeWrapperOnHost<T>where
<T as RustToCuda>::CudaAllocation: Sized,
T: RefUnwindSafe,
<T as RustToCuda>::CudaRepresentation: RefUnwindSafe,
impl<T> !Send for ExchangeWrapperOnHost<T>
impl<T> !StackOnly for ExchangeWrapperOnHost<T>
impl<T> !Sync for ExchangeWrapperOnHost<T>
impl<T> Unpin for ExchangeWrapperOnHost<T>
impl<T> UnwindSafe for ExchangeWrapperOnHost<T>where
<T as RustToCuda>::CudaAllocation: Sized,
T: UnwindSafe,
<T as RustToCuda>::CudaRepresentation: 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> ExtractDiscriminant for T
impl<T> ExtractDiscriminant for T
§type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
The type of the discriminant, which must satisfy the trait bounds
required by
core::mem::Discriminant
. Read more