#[repr(C)]pub struct f16(pub u16);
Expand description
Type representation of the Float16 physical type
Tuple Fields
0: u16
Implementations
Trait Implementations
sourceimpl NativeType for f16
impl NativeType for f16
sourceconst PRIMITIVE: PrimitiveType = PrimitiveType::Float16
const PRIMITIVE: PrimitiveType = PrimitiveType::Float16
The corresponding variant of PrimitiveType
.
type Bytes = [u8; 2]
type Bytes = [u8; 2]
Type denoting its representation as bytes.
This is [u8; N]
where N = size_of::<T>
. Read more
sourcefn to_le_bytes(&self) -> Self::Bytes
fn to_le_bytes(&self) -> Self::Bytes
To bytes in little endian
sourcefn to_be_bytes(&self) -> Self::Bytes
fn to_be_bytes(&self) -> Self::Bytes
To bytes in big endian
sourcefn from_be_bytes(bytes: Self::Bytes) -> Self
fn from_be_bytes(bytes: Self::Bytes) -> Self
From bytes in big endian
sourcefn from_le_bytes(bytes: Self::Bytes) -> Self
fn from_le_bytes(bytes: Self::Bytes) -> Self
From bytes in little endian
sourceimpl PartialEq<f16> for f16
impl PartialEq<f16> for f16
sourceimpl Simd8Lanes<f16> for [f16; 8]
Available on crate feature compute_comparison
only.
impl Simd8Lanes<f16> for [f16; 8]
Available on crate feature
compute_comparison
only.sourcefn from_chunk(v: &[f16]) -> Self
fn from_chunk(v: &[f16]) -> Self
loads a complete chunk
sourcefn from_incomplete_chunk(v: &[f16], remaining: f16) -> Self
fn from_incomplete_chunk(v: &[f16], remaining: f16) -> Self
loads an incomplete chunk, filling the remaining items with remaining
.
impl Copy for f16
impl Pod for f16
Auto Trait Implementations
impl RefUnwindSafe for f16
impl Send for f16
impl Sync for f16
impl Unpin for f16
impl UnwindSafe for f16
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CheckedBitPattern for T where
T: AnyBitPattern,
impl<T> CheckedBitPattern for T where
T: AnyBitPattern,
type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
. Read more
fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret bits
as &Self
. Read more