Struct Lanes16Word16
#[repr(C, align(32))]pub struct Lanes16Word16(pub [u16; 16]);Expand description
Sixteen lanes of Word16 (one 256-bit SIMD register) — the NTT coefficient lane vector. Carries
[u16; 16]; the multiply-high is the SIGNED _mm256_mulhi_epi16 (the Montgomery butterfly’s
mulhi). Ops have an AVX2 fast path proven byte-identical to the scalar lanes.
Tuple Fields§
§0: [u16; 16]Implementations§
§impl Lanes16Word16
impl Lanes16Word16
pub const fn splat(x: u16) -> Lanes16Word16
pub const fn splat(x: u16) -> Lanes16Word16
Broadcast one value into all sixteen lanes.
pub fn from_words(s: &[Word16]) -> Lanes16Word16
pub fn from_words(s: &[Word16]) -> Lanes16Word16
Pack the first sixteen Word16s of a slice into a lane vector (shorter slices zero-fill).
pub fn add(self, o: Lanes16Word16) -> Lanes16Word16
pub fn add(self, o: Lanes16Word16) -> Lanes16Word16
Lane-wise wrapping add in ℤ/2¹⁶ (vpaddw).
pub fn sub(self, o: Lanes16Word16) -> Lanes16Word16
pub fn sub(self, o: Lanes16Word16) -> Lanes16Word16
Lane-wise wrapping subtract in ℤ/2¹⁶ (vpsubw).
pub fn mullo(self, o: Lanes16Word16) -> Lanes16Word16
pub fn mullo(self, o: Lanes16Word16) -> Lanes16Word16
Lane-wise low 16 bits of the product (vpmullw) — interpretation-independent.
pub fn mulhi(self, o: Lanes16Word16) -> Lanes16Word16
pub fn mulhi(self, o: Lanes16Word16) -> Lanes16Word16
Lane-wise high 16 bits of the SIGNED product (vpmulhw) — the Montgomery butterfly’s mulhi.
pub fn ntt_bcast_lo(self, h: usize) -> Lanes16Word16
pub fn ntt_bcast_lo(self, h: usize) -> Lanes16Word16
Broadcast each 2h-block’s low h lanes into both of its halves — the within-vector NTT
butterfly’s source-low duplication, at stride h ∈ {8,4,2}. h=8→vperm2i128(v,v,0x00);
h=4→vpshufd(v,0x44); h=2→vpshufd(v,0xA0) (all per-128-bit-lane, so the multiple
blocks packed in one register are handled at once).
pub fn ntt_bcast_hi(self, h: usize) -> Lanes16Word16
pub fn ntt_bcast_hi(self, h: usize) -> Lanes16Word16
Broadcast each 2h-block’s high h lanes into both of its halves — the source-high
duplication. h=8→vperm2i128(v,v,0x11); h=4→vpshufd(v,0xEE); h=2→vpshufd(v,0xF5).
pub fn ntt_blend(self, o: Lanes16Word16, h: usize) -> Lanes16Word16
pub fn ntt_blend(self, o: Lanes16Word16, h: usize) -> Lanes16Word16
Recombine the +/− halves of the within-vector butterfly: each 2h-block’s low h lanes
from self, high h from o. h=8→vperm2i128(a,b,0x30); h=4→vpblendd(a,b,0xCC);
h=2→vpblendd(a,b,0xAA).
Trait Implementations§
§impl Add for Lanes16Word16
impl Add for Lanes16Word16
§type Output = Lanes16Word16
type Output = Lanes16Word16
+ operator.§fn add(self, o: Lanes16Word16) -> Lanes16Word16
fn add(self, o: Lanes16Word16) -> Lanes16Word16
+ operation. Read more§impl Clone for Lanes16Word16
impl Clone for Lanes16Word16
§fn clone(&self) -> Lanes16Word16
fn clone(&self) -> Lanes16Word16
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for Lanes16Word16
impl Debug for Lanes16Word16
§impl Hash for Lanes16Word16
impl Hash for Lanes16Word16
§impl Mul for Lanes16Word16
impl Mul for Lanes16Word16
§type Output = Lanes16Word16
type Output = Lanes16Word16
* operator.§fn mul(self, o: Lanes16Word16) -> Lanes16Word16
fn mul(self, o: Lanes16Word16) -> Lanes16Word16
* operation. Read more§impl PartialEq for Lanes16Word16
impl PartialEq for Lanes16Word16
§impl Sub for Lanes16Word16
impl Sub for Lanes16Word16
§type Output = Lanes16Word16
type Output = Lanes16Word16
- operator.§fn sub(self, o: Lanes16Word16) -> Lanes16Word16
fn sub(self, o: Lanes16Word16) -> Lanes16Word16
- operation. Read moreimpl Copy for Lanes16Word16
impl Eq for Lanes16Word16
impl StructuralPartialEq for Lanes16Word16
Auto Trait Implementations§
impl Freeze for Lanes16Word16
impl RefUnwindSafe for Lanes16Word16
impl Send for Lanes16Word16
impl Sync for Lanes16Word16
impl Unpin for Lanes16Word16
impl UnsafeUnpin for Lanes16Word16
impl UnwindSafe for Lanes16Word16
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.