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
20pub type GhashMulX1x<T> = super::arithmetic::ghash::GhashMulX<T>;
22
23impl Underlier128bLanes for M128 {
25 type U64 = u64;
26
27 #[inline(always)]
28 fn split_hi_lo_64(self) -> (u64, u64) {
29 u128::from(self).split_hi_lo_64()
30 }
31
32 #[inline(always)]
33 fn join_u64s(high: u64, low: u64) -> Self {
34 Self::from(u128::join_u64s(high, low))
35 }
36
37 #[inline(always)]
38 fn broadcast_64(val: u64) -> Self {
39 Self::from(u128::broadcast_64(val))
40 }
41
42 #[inline(always)]
43 fn spread_bits_128(self) -> (Self, Self) {
44 let (hi, lo) = self.split_hi_lo_64();
45 (Self::from(spread_bits_64(hi)), Self::from(spread_bits_64(lo)))
46 }
47}