use div_ceil instead of manual logic

This commit is contained in:
Folkert de Vries 2025-07-05 08:36:27 +02:00
parent aaf8ff1f9e
commit 5a26848a5a

View file

@ -8,7 +8,7 @@ pub struct LaneCount<const N: usize>;
impl<const N: usize> LaneCount<N> {
/// The number of bytes in a bitmask with this many lanes.
pub const BITMASK_LEN: usize = (N + 7) / 8;
pub const BITMASK_LEN: usize = N.div_ceil(8);
}
/// Statically guarantees that a lane count is marked as supported.