Skip to content

Commit 6eaf13e

Browse files
committed
Merge branch 'main' into implement-vpclmulqdq-512-bits
2 parents 41b7600 + eb307ee commit 6eaf13e

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

src/algorithm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ where
327327
unsafe fn fold_and_xor<T: ArchOps, W: EnhancedCrcWidth>(
328328
current: T::Vector,
329329
coefficient: T::Vector,
330-
new_data: T::Vector,
330+
data_to_xor: T::Vector,
331331
reflected: bool,
332332
ops: &T,
333333
) -> T::Vector
@@ -341,7 +341,7 @@ where
341341
};
342342

343343
// Fold 16 bytes using width-specific method
344-
W::fold_16(&mut temp_state, coefficient, new_data, ops);
344+
W::fold_16(&mut temp_state, coefficient, data_to_xor, ops);
345345

346346
temp_state.value
347347
}

src/arch/x86.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ impl ArchOps for X86Ops {
244244
) -> Self::Vector {
245245
#[cfg(any(feature = "vpclmulqdq", feature = "avx512"))]
246246
if is_x86_feature_detected!("avx512f") && is_x86_feature_detected!("avx512vl") {
247-
return _mm_ternarylogic_epi64(a, b, c, 0x96);
247+
return _mm_ternarylogic_epi64(
248+
a, b, c, 0x96, // XOR3
249+
);
248250
}
249251

250252
// x86 doesn't have native XOR3 in SSE, use two XORs

src/crc32/algorithm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl EnhancedCrcWidth for crate::structs::Width32 {
7979
unsafe fn fold_16<T: ArchOps>(
8080
state: &mut CrcState<T::Vector>,
8181
coeff: T::Vector,
82-
new_data: T::Vector,
82+
data_to_xor: T::Vector,
8383
ops: &T,
8484
) where
8585
T::Vector: Copy,
@@ -99,7 +99,7 @@ impl EnhancedCrcWidth for crate::structs::Width32 {
9999
)
100100
};
101101

102-
state.value = ops.xor3_vectors(h, l, new_data);
102+
state.value = ops.xor3_vectors(h, l, data_to_xor);
103103
}
104104

105105
/// CRC-32 specific implementation for folding 8 bytes to 4 bytes

src/crc64/algorithm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl EnhancedCrcWidth for crate::structs::Width64 {
6060
unsafe fn fold_16<T: ArchOps>(
6161
state: &mut CrcState<T::Vector>,
6262
coeff: T::Vector,
63-
new_data: T::Vector,
63+
data_to_xor: T::Vector,
6464
ops: &T,
6565
) where
6666
T::Vector: Copy,
@@ -70,7 +70,7 @@ impl EnhancedCrcWidth for crate::structs::Width64 {
7070
ops.xor3_vectors(
7171
ops.carryless_mul_00(state.value, coeff),
7272
ops.carryless_mul_11(state.value, coeff),
73-
new_data,
73+
data_to_xor,
7474
)
7575
};
7676
}

src/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ pub trait EnhancedCrcWidth: CrcWidth {
260260
unsafe fn fold_16<T: ArchOps>(
261261
state: &mut CrcState<T::Vector>,
262262
coefficient: T::Vector,
263-
new_data: T::Vector,
263+
data_to_xor: T::Vector,
264264
ops: &T,
265265
) where
266266
T::Vector: Copy;

0 commit comments

Comments
 (0)