#[repr(transparent)]pub struct Half(pub u16);Expand description
IEEE 754 binary16 (“half-precision”, __half in CUDA).
Layout: 1 sign bit, 5 exponent bits (bias 15), 10 mantissa bits.
Tuple Fields§
§0: u16Implementations§
Source§impl Half
impl Half
pub const ZERO: Self
pub const NEG_ZERO: Self
pub const ONE: Self
pub const NEG_ONE: Self
pub const INFINITY: Self
pub const NEG_INFINITY: Self
pub const NAN: Self
pub const MIN_POSITIVE: Self
pub const MAX: Self
pub const MIN: Self
pub const EPSILON: Self
pub const fn from_bits(bits: u16) -> Self
pub const fn to_bits(self) -> u16
pub const fn is_nan(self) -> bool
pub const fn is_infinite(self) -> bool
pub const fn is_finite(self) -> bool
pub const fn is_sign_negative(self) -> bool
Trait Implementations§
Source§impl PartialOrd for Half
impl PartialOrd for Half
impl Copy for Half
impl DeviceRepr for Half
impl Eq for Half
impl StructuralPartialEq for Half
impl ValidAsZeroBits for Half
Auto Trait Implementations§
impl Freeze for Half
impl RefUnwindSafe for Half
impl Send for Half
impl Sync for Half
impl Unpin for Half
impl UnsafeUnpin for Half
impl UnwindSafe for Half
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