mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Change Lanes::ALL to Lanes::ABCD for consistency
This commit is contained in:
parent
794ed5c8e3
commit
28f10bc183
2 changed files with 4 additions and 4 deletions
|
|
@ -215,7 +215,7 @@ impl<'a, 'b> Add<&'b CachedPoint> for &'a ExtendedPoint {
|
||||||
tmp.swap_CD();
|
tmp.swap_CD();
|
||||||
|
|
||||||
// tmp = (S9-S8 S9+S8 S10-S11 S10+S11) = (S12 S13 S14 S15)
|
// tmp = (S9-S8 S9+S8 S10-S11 S10+S11) = (S12 S13 S14 S15)
|
||||||
tmp.diff_sum(Lanes::ALL);
|
tmp.diff_sum(Lanes::ABCD);
|
||||||
|
|
||||||
// set t0 = (S12 S15 S15 S12)
|
// set t0 = (S12 S15 S15 S12)
|
||||||
let t0 = tmp.shuffle(Shuffle::ADDA);
|
let t0 = tmp.shuffle(Shuffle::ADDA);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ pub enum Lanes {
|
||||||
CD,
|
CD,
|
||||||
AD,
|
AD,
|
||||||
BC,
|
BC,
|
||||||
ALL,
|
ABCD,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
|
@ -67,7 +67,7 @@ fn blend_lanes(x: u32x8, y: u32x8, control: Lanes) -> u32x8 {
|
||||||
_mm256_blend_epi32(x.into_bits(), y.into_bits(), (B_LANES | C_LANES) as i32)
|
_mm256_blend_epi32(x.into_bits(), y.into_bits(), (B_LANES | C_LANES) as i32)
|
||||||
.into_bits()
|
.into_bits()
|
||||||
}
|
}
|
||||||
Lanes::ALL => _mm256_blend_epi32(
|
Lanes::ABCD => _mm256_blend_epi32(
|
||||||
x.into_bits(),
|
x.into_bits(),
|
||||||
y.into_bits(),
|
y.into_bits(),
|
||||||
(A_LANES | B_LANES | C_LANES | D_LANES) as i32,
|
(A_LANES | B_LANES | C_LANES | D_LANES) as i32,
|
||||||
|
|
@ -719,7 +719,7 @@ mod test {
|
||||||
let x3 = FieldElement64([10300, 10301, 10302, 10303, 10304]);
|
let x3 = FieldElement64([10300, 10301, 10302, 10303, 10304]);
|
||||||
|
|
||||||
let mut vec = FieldElement32x4::new(&x0, &x1, &x2, &x3);
|
let mut vec = FieldElement32x4::new(&x0, &x1, &x2, &x3);
|
||||||
vec.diff_sum(Lanes::ALL);
|
vec.diff_sum(Lanes::ABCD);
|
||||||
|
|
||||||
let result = vec.split();
|
let result = vec.split();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue