1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-26 15:56:02 +02:00

fix a bad assert

This would fire (incorrectly) on platforms where MAX_SIMD_DEGREE=1.
This commit is contained in:
Jack O'Connor 2019-12-07 22:23:58 -05:00
parent bcb99ba087
commit 0cb4f6dd2c

View File

@ -450,7 +450,7 @@ fn compress_parents_parallel(
debug_assert_eq!(child_chaining_values.len() % OUT_LEN, 0, "wacky hash bytes");
let num_children = child_chaining_values.len() / OUT_LEN;
debug_assert!(num_children >= 2, "not enough children");
debug_assert!(num_children <= 2 * MAX_SIMD_DEGREE, "too many");
debug_assert!(num_children <= 2 * MAX_SIMD_DEGREE_OR_2, "too many");
let mut parents_exact = child_chaining_values.chunks_exact(BLOCK_LEN);
// Use MAX_SIMD_DEGREE_OR_2 rather than MAX_SIMD_DEGREE here, because of