pub enum Bf16Set {
F32(TypedTensor<f32, DynRank, Host>),
Bf16(TypedTensor<Bf16, DynRank, Host>),
}Expand description
Value enum for the set that carries bfloat16 beside f32.
§Examples
use tenferro_bf16_proof::{Bf16, Bf16Set, Bf16Tag};
use tenferro_tensor::{DynRank, Host, ScalarSet, TypedTensor};
let value = Bf16Set::Bf16(TypedTensor::<_, DynRank, Host>::from_host_vec_col_major(vec![1], vec![Bf16::from_f32(2.0)])?);
assert_eq!(value.tag(), Bf16Tag::Bf16);Variants§
F32(TypedTensor<f32, DynRank, Host>)
Standard single precision.
Bf16(TypedTensor<Bf16, DynRank, Host>)
Bfloat16, ranked below single precision.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Bf16Set
impl !UnwindSafe for Bf16Set
impl Freeze for Bf16Set
impl Send for Bf16Set
impl Sync for Bf16Set
impl Unpin for Bf16Set
impl UnsafeUnpin for Bf16Set
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
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