binius_field/arch/portable/
packed_ghash_128.rs1use super::{
7 m128::M128,
8 univariate_mul_utils_128::{Underlier128bLanes, spread_bits_64},
9};
10
11pub type GhashWideMul1x<T> = super::arithmetic::ghash::GhashWideMul<T>;
13
14pub type GhashSquare1x<T> = super::arithmetic::ghash::GhashSoftMul<T>;
16
17pub type GhashInvert1x<T> = super::arithmetic::itoh_tsujii::GhashItohTsujii<T>;
19
20impl Underlier128bLanes for M128 {
22 type U64 = u64;
23
24 #[inline(always)]
25 fn split_hi_lo_64(self) -> (u64, u64) {
26 u128::from(self).split_hi_lo_64()
27 }
28
29 #[inline(always)]
30 fn join_u64s(high: u64, low: u64) -> Self {
31 Self::from(u128::join_u64s(high, low))
32 }
33
34 #[inline(always)]
35 fn broadcast_64(val: u64) -> Self {
36 Self::from(u128::broadcast_64(val))
37 }
38
39 #[inline(always)]
40 fn spread_bits_128(self) -> (Self, Self) {
41 let (hi, lo) = self.split_hi_lo_64();
42 (Self::from(spread_bits_64(hi)), Self::from(spread_bits_64(lo)))
43 }
44}