pub struct Dynamic;Expand description
Sealed marker for the runtime union of the host and group-backed payloads.
This is the default representation: one type for ordinary tensors that may be host-resident or backend-resident at runtime.
§Examples
use tenferro_tensor::{Dynamic, DynRank, Host, TypedTensor};
let host = TypedTensor::<i32, DynRank, Host>::from_host_vec_col_major(vec![2], vec![1, 2])?;
let dynamic: TypedTensor<i32, DynRank, Dynamic> = host.into_dynamic();
assert_eq!(dynamic.host_data()?, &[1, 2]);Trait Implementations§
Source§impl Representation for Dynamic
impl Representation for Dynamic
Source§fn default_placement() -> Placement
fn default_placement() -> Placement
Placement given to an owner of this representation built without one. Read more
Auto Trait Implementations§
impl Freeze for Dynamic
impl RefUnwindSafe for Dynamic
impl Send for Dynamic
impl Sync for Dynamic
impl Unpin for Dynamic
impl UnsafeUnpin for Dynamic
impl UnwindSafe for Dynamic
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