pub struct f16(/* private fields */);Expand description
A 16-bit floating point number, stored in IEEE 754 half-precision format.
Implementations§
Trait Implementations§
Source§impl BitOps<f16> for Avx2Isa
impl BitOps<f16> for Avx2Isa
Source§fn prefetch(self, ptr: *const <F16x16 as Simd>::Elem)
fn prefetch(self, ptr: *const <F16x16 as Simd>::Elem)
Pre-fetch the cache line containing
ptr for reading.Source§fn prefetch_write(self, ptr: *mut <F16x16 as Simd>::Elem)
fn prefetch_write(self, ptr: *mut <F16x16 as Simd>::Elem)
Pre-fetch the cache line containing
ptr for writing.Source§fn first_n_mask(self, n: usize) -> M16
fn first_n_mask(self, n: usize) -> M16
Return a mask with the first
n lanes set to true.Source§unsafe fn load_ptr(self, ptr: *const f16) -> F16x16
unsafe fn load_ptr(self, ptr: *const f16) -> F16x16
Load vector of elements from
ptr. Read moreSource§unsafe fn store_ptr(self, x: F16x16, ptr: *mut f16)
unsafe fn store_ptr(self, x: F16x16, ptr: *mut f16)
Store the values in this vector to a memory location. Read more
Source§unsafe fn load_ptr_mask(self, ptr: *const f16, mask: M16) -> F16x16
unsafe fn load_ptr_mask(self, ptr: *const f16, mask: M16) -> F16x16
Load vector elements from
ptr using a mask. Read moreSource§unsafe fn store_ptr_mask(self, x: F16x16, ptr: *mut f16, mask: M16)
unsafe fn store_ptr_mask(self, x: F16x16, ptr: *mut f16, mask: M16)
Store the values in this vector to a memory location, where the
corresponding mask element is set. Read more
Source§fn from_bits(self, x: <<Self::Simd as Simd>::Isa as Isa>::Bits) -> Self::Simd
fn from_bits(self, x: <<Self::Simd as Simd>::Isa as Isa>::Bits) -> Self::Simd
Convert
x to an untyped vector of the same width.Source§fn broadcast_lane<const LANE: i32>(self, x: Self::Simd) -> Self::Simd
fn broadcast_lane<const LANE: i32>(self, x: Self::Simd) -> Self::Simd
Broadcast the element from one lane of a vector to all lanes of a new
vector.
Source§fn fold_splat<F: Fn(T, T) -> T>(
self,
x: Self::Simd,
accum: T,
f: F,
) -> Self::Simd
fn fold_splat<F: Fn(T, T) -> T>( self, x: Self::Simd, accum: T, f: F, ) -> Self::Simd
Reduce the elements in
x to a single value using f, then
return a new vector with the accumulated value broadcast to each lane.Source§fn load(self, xs: &[T]) -> Self::Simd
fn load(self, xs: &[T]) -> Self::Simd
Load the first
self.len() elements from a slice into a vector. Read moreSource§fn load_pad(self, xs: &[T]) -> (Self::Simd, <Self::Simd as Simd>::Mask)
fn load_pad(self, xs: &[T]) -> (Self::Simd, <Self::Simd as Simd>::Mask)
Load elements from
xs into a vector. Read moreSource§fn store_uninit(self, x: Self::Simd, xs: &mut [MaybeUninit<T>]) -> &mut [T]
fn store_uninit(self, x: Self::Simd, xs: &mut [MaybeUninit<T>]) -> &mut [T]
Source§fn store_many_uninit<const N: usize>(
self,
vecs: [Self::Simd; N],
xs: &mut [MaybeUninit<T>],
) -> &mut [T]
fn store_many_uninit<const N: usize>( self, vecs: [Self::Simd; N], xs: &mut [MaybeUninit<T>], ) -> &mut [T]
Source§impl BitOps<f16> for Avx512Isa
impl BitOps<f16> for Avx512Isa
Source§fn first_n_mask(self, n: usize) -> __mmask32
fn first_n_mask(self, n: usize) -> __mmask32
Return a mask with the first
n lanes set to true.Source§fn prefetch(self, ptr: *const <F16x32 as Simd>::Elem)
fn prefetch(self, ptr: *const <F16x32 as Simd>::Elem)
Pre-fetch the cache line containing
ptr for reading.Source§fn prefetch_write(self, ptr: *mut <F16x32 as Simd>::Elem)
fn prefetch_write(self, ptr: *mut <F16x32 as Simd>::Elem)
Pre-fetch the cache line containing
ptr for writing.Source§unsafe fn load_ptr(self, ptr: *const f16) -> F16x32
unsafe fn load_ptr(self, ptr: *const f16) -> F16x32
Load vector of elements from
ptr. Read moreSource§unsafe fn store_ptr(self, x: F16x32, ptr: *mut f16)
unsafe fn store_ptr(self, x: F16x32, ptr: *mut f16)
Store the values in this vector to a memory location. Read more
Source§unsafe fn load_ptr_mask(self, ptr: *const f16, mask: __mmask32) -> F16x32
unsafe fn load_ptr_mask(self, ptr: *const f16, mask: __mmask32) -> F16x32
Load vector elements from
ptr using a mask. Read moreSource§unsafe fn store_ptr_mask(self, x: F16x32, ptr: *mut f16, mask: __mmask32)
unsafe fn store_ptr_mask(self, x: F16x32, ptr: *mut f16, mask: __mmask32)
Store the values in this vector to a memory location, where the
corresponding mask element is set. Read more
Source§fn from_bits(self, x: <<Self::Simd as Simd>::Isa as Isa>::Bits) -> Self::Simd
fn from_bits(self, x: <<Self::Simd as Simd>::Isa as Isa>::Bits) -> Self::Simd
Convert
x to an untyped vector of the same width.Source§fn broadcast_lane<const LANE: i32>(self, x: Self::Simd) -> Self::Simd
fn broadcast_lane<const LANE: i32>(self, x: Self::Simd) -> Self::Simd
Broadcast the element from one lane of a vector to all lanes of a new
vector.
Source§fn fold_splat<F: Fn(T, T) -> T>(
self,
x: Self::Simd,
accum: T,
f: F,
) -> Self::Simd
fn fold_splat<F: Fn(T, T) -> T>( self, x: Self::Simd, accum: T, f: F, ) -> Self::Simd
Reduce the elements in
x to a single value using f, then
return a new vector with the accumulated value broadcast to each lane.Source§fn load(self, xs: &[T]) -> Self::Simd
fn load(self, xs: &[T]) -> Self::Simd
Load the first
self.len() elements from a slice into a vector. Read moreSource§fn load_pad(self, xs: &[T]) -> (Self::Simd, <Self::Simd as Simd>::Mask)
fn load_pad(self, xs: &[T]) -> (Self::Simd, <Self::Simd as Simd>::Mask)
Load elements from
xs into a vector. Read moreSource§fn store_uninit(self, x: Self::Simd, xs: &mut [MaybeUninit<T>]) -> &mut [T]
fn store_uninit(self, x: Self::Simd, xs: &mut [MaybeUninit<T>]) -> &mut [T]
Source§fn store_many_uninit<const N: usize>(
self,
vecs: [Self::Simd; N],
xs: &mut [MaybeUninit<T>],
) -> &mut [T]
fn store_many_uninit<const N: usize>( self, vecs: [Self::Simd; N], xs: &mut [MaybeUninit<T>], ) -> &mut [T]
Source§impl BitOps<f16> for GenericIsa
impl BitOps<f16> for GenericIsa
Source§fn first_n_mask(self, n: usize) -> M16
fn first_n_mask(self, n: usize) -> M16
Return a mask with the first
n lanes set to true.Source§unsafe fn load_ptr_mask(
self,
ptr: *const <F16x8 as Simd>::Elem,
mask: <F16x8 as Simd>::Mask,
) -> F16x8
unsafe fn load_ptr_mask( self, ptr: *const <F16x8 as Simd>::Elem, mask: <F16x8 as Simd>::Mask, ) -> F16x8
Load vector elements from
ptr using a mask. Read moreSource§unsafe fn store_ptr_mask(
self,
x: F16x8,
ptr: *mut <F16x8 as Simd>::Elem,
mask: <F16x8 as Simd>::Mask,
)
unsafe fn store_ptr_mask( self, x: F16x8, ptr: *mut <F16x8 as Simd>::Elem, mask: <F16x8 as Simd>::Mask, )
Store the values in this vector to a memory location, where the
corresponding mask element is set. Read more
Source§unsafe fn load_ptr(self, ptr: *const f16) -> F16x8
unsafe fn load_ptr(self, ptr: *const f16) -> F16x8
Load vector of elements from
ptr. Read moreSource§unsafe fn store_ptr(self, x: F16x8, ptr: *mut f16)
unsafe fn store_ptr(self, x: F16x8, ptr: *mut f16)
Store the values in this vector to a memory location. Read more
Source§fn from_bits(self, x: <<Self::Simd as Simd>::Isa as Isa>::Bits) -> Self::Simd
fn from_bits(self, x: <<Self::Simd as Simd>::Isa as Isa>::Bits) -> Self::Simd
Convert
x to an untyped vector of the same width.Source§fn broadcast_lane<const LANE: i32>(self, x: Self::Simd) -> Self::Simd
fn broadcast_lane<const LANE: i32>(self, x: Self::Simd) -> Self::Simd
Broadcast the element from one lane of a vector to all lanes of a new
vector.
Source§fn fold_splat<F: Fn(T, T) -> T>(
self,
x: Self::Simd,
accum: T,
f: F,
) -> Self::Simd
fn fold_splat<F: Fn(T, T) -> T>( self, x: Self::Simd, accum: T, f: F, ) -> Self::Simd
Reduce the elements in
x to a single value using f, then
return a new vector with the accumulated value broadcast to each lane.Source§fn load(self, xs: &[T]) -> Self::Simd
fn load(self, xs: &[T]) -> Self::Simd
Load the first
self.len() elements from a slice into a vector. Read moreSource§fn load_pad(self, xs: &[T]) -> (Self::Simd, <Self::Simd as Simd>::Mask)
fn load_pad(self, xs: &[T]) -> (Self::Simd, <Self::Simd as Simd>::Mask)
Load elements from
xs into a vector. Read moreSource§fn store_uninit(self, x: Self::Simd, xs: &mut [MaybeUninit<T>]) -> &mut [T]
fn store_uninit(self, x: Self::Simd, xs: &mut [MaybeUninit<T>]) -> &mut [T]
Source§fn store_many_uninit<const N: usize>(
self,
vecs: [Self::Simd; N],
xs: &mut [MaybeUninit<T>],
) -> &mut [T]
fn store_many_uninit<const N: usize>( self, vecs: [Self::Simd; N], xs: &mut [MaybeUninit<T>], ) -> &mut [T]
Source§fn prefetch_write(self, ptr: *mut T)
fn prefetch_write(self, ptr: *mut T)
Pre-fetch the cache line containing
ptr for writing.impl Copy for f16
Source§impl Extend<f16> for Avx2Isa
impl Extend<f16> for Avx2Isa
Source§type Output = F32x8
type Output = F32x8
SIMD vector type with elements that have twice the bit-width of
those in
Self::SIMD.Source§fn extend_low(self, x: F16x16) -> F32x8
fn extend_low(self, x: F16x16) -> F32x8
Extend each lane in the low half of the input to a type with twice the
width.
Source§fn extend_high(self, x: F16x16) -> F32x8
fn extend_high(self, x: F16x16) -> F32x8
Extend each lane in the high half of the input to a type with twice the
width.
Source§impl Extend<f16> for Avx512Isa
impl Extend<f16> for Avx512Isa
Source§type Output = F32x16
type Output = F32x16
SIMD vector type with elements that have twice the bit-width of
those in
Self::SIMD.Source§fn extend_low(self, x: F16x32) -> F32x16
fn extend_low(self, x: F16x32) -> F32x16
Extend each lane in the low half of the input to a type with twice the
width.
Source§fn extend_high(self, x: F16x32) -> F32x16
fn extend_high(self, x: F16x32) -> F32x16
Extend each lane in the high half of the input to a type with twice the
width.
Source§impl Extend<f16> for GenericIsa
impl Extend<f16> for GenericIsa
Source§type Output = F32x4
type Output = F32x4
SIMD vector type with elements that have twice the bit-width of
those in
Self::SIMD.Source§fn extend_low(self, x: F16x8) -> F32x4
fn extend_low(self, x: F16x8) -> F32x4
Extend each lane in the low half of the input to a type with twice the
width.
Source§fn extend_high(self, x: F16x8) -> F32x4
fn extend_high(self, x: F16x8) -> F32x4
Extend each lane in the high half of the input to a type with twice the
width.
Source§impl NarrowSaturate<f32, f16> for GenericIsa
impl NarrowSaturate<f32, f16> for GenericIsa
impl StructuralPartialEq for f16
Auto Trait Implementations§
impl Freeze for f16
impl RefUnwindSafe for f16
impl Send for f16
impl Sync for f16
impl Unpin for f16
impl UnsafeUnpin for f16
impl UnwindSafe for f16
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