pub struct Gpu;Expand description
Sealed marker for the group-backed payload of a TypedTensor.
TypedTensor<T, R, Gpu> carries provider allocation authority, identity
and retirement state through its allocation group, so host access stays
fallible and must be prepared or mapped explicitly. The marker is not proof
of a particular device ordinal or provider.
§Examples
use tenferro_tensor::{DynRank, Gpu, Host, TypedTensor};
let host = TypedTensor::<f64, DynRank, Host>::from_host_vec_col_major(vec![2], vec![1.0, 2.0])?;
let gpu: TypedTensor<f64, DynRank, Gpu> = host.promote()?;
assert_eq!(gpu.host_data()?, &[1.0, 2.0]);Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gpu
impl RefUnwindSafe for Gpu
impl Send for Gpu
impl Sync for Gpu
impl Unpin for Gpu
impl UnsafeUnpin for Gpu
impl UnwindSafe for Gpu
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