Struct softfloat_wrapper::BF16
source · pub struct BF16(_);
Expand description
bfloat16
Implementations§
Trait Implementations§
source§impl Float for BF16
impl Float for BF16
type Payload = u16
const EXPONENT_BIT: Self::Payload = {transmute(0x00ff): <bf16::BF16 as Float>::Payload}
const FRACTION_BIT: Self::Payload = {transmute(0x007f): <bf16::BF16 as Float>::Payload}
const SIGN_POS: usize = 15usize
const EXPONENT_POS: usize = 7usize
fn set_payload(&mut self, x: Self::Payload)
fn from_bits(v: Self::Payload) -> Self
fn to_bits(&self) -> Self::Payload
fn add<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
fn sub<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
fn mul<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
fn fused_mul_add<T: Borrow<Self>>(&self, x: T, y: T, rnd: RoundingMode) -> Self
fn div<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
fn rem<T: Borrow<Self>>(&self, x: T, rnd: RoundingMode) -> Self
fn sqrt(&self, rnd: RoundingMode) -> Self
fn eq<T: Borrow<Self>>(&self, x: T) -> bool
fn lt<T: Borrow<Self>>(&self, x: T) -> bool
fn le<T: Borrow<Self>>(&self, x: T) -> bool
fn lt_quiet<T: Borrow<Self>>(&self, x: T) -> bool
fn le_quiet<T: Borrow<Self>>(&self, x: T) -> bool
fn eq_signaling<T: Borrow<Self>>(&self, x: T) -> bool
fn is_signaling_nan(&self) -> bool
fn from_u32(x: u32, rnd: RoundingMode) -> Self
fn from_u64(x: u64, rnd: RoundingMode) -> Self
fn from_i32(x: i32, rnd: RoundingMode) -> Self
fn from_i64(x: i64, rnd: RoundingMode) -> Self
fn to_u32(&self, rnd: RoundingMode, exact: bool) -> u32
fn to_u64(&self, rnd: RoundingMode, exact: bool) -> u64
fn to_i32(&self, rnd: RoundingMode, exact: bool) -> i32
fn to_i64(&self, rnd: RoundingMode, exact: bool) -> i64
fn to_f16(&self, rnd: RoundingMode) -> F16
fn to_bf16(&self, _rnd: RoundingMode) -> BF16
fn to_f32(&self, _rnd: RoundingMode) -> F32
fn to_f64(&self, rnd: RoundingMode) -> F64
fn to_f128(&self, rnd: RoundingMode) -> F128
fn round_to_integral(&self, rnd: RoundingMode) -> Self
fn compare<T: Borrow<Self>>(&self, x: T) -> Option<Ordering>
fn from_u8(x: u8, rnd: RoundingMode) -> Selfwhere Self: Sized,
fn from_u16(x: u16, rnd: RoundingMode) -> Selfwhere Self: Sized,
fn from_i8(x: i8, rnd: RoundingMode) -> Selfwhere Self: Sized,
fn from_i16(x: i16, rnd: RoundingMode) -> Selfwhere Self: Sized,
fn neg(&self) -> Selfwhere Self: Sized,
fn abs(&self) -> Selfwhere Self: Sized,
fn sign(&self) -> Self::Payload
fn exponent(&self) -> Self::Payload
fn fraction(&self) -> Self::Payload
fn is_positive(&self) -> bool
fn is_positive_zero(&self) -> bool
fn is_positive_subnormal(&self) -> bool
fn is_positive_normal(&self) -> bool
fn is_positive_infinity(&self) -> bool
fn is_negative(&self) -> bool
fn is_negative_zero(&self) -> bool
fn is_negative_subnormal(&self) -> bool
fn is_negative_normal(&self) -> bool
fn is_negative_infinity(&self) -> bool
fn is_nan(&self) -> bool
fn is_zero(&self) -> bool
fn is_subnormal(&self) -> bool
fn set_sign(&mut self, x: Self::Payload)
fn set_exponent(&mut self, x: Self::Payload)
fn set_fraction(&mut self, x: Self::Payload)
fn positive_infinity() -> Selfwhere Self: Sized,
fn positive_zero() -> Selfwhere Self: Sized,
fn negative_infinity() -> Selfwhere Self: Sized,
fn negative_zero() -> Selfwhere Self: Sized,
fn quiet_nan() -> Selfwhere Self: Sized,
impl Copy for BF16
Auto Trait Implementations§
impl RefUnwindSafe for BF16
impl Send for BF16
impl Sync for BF16
impl Unpin for BF16
impl UnwindSafe for BF16
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