Get number of values for the u64 array from the bits_per_entry and num_entries.
(bits_per_entry: u8, num_entries: usize)
| 58 | |
| 59 | /// Get number of values for the u64 array from the bits_per_entry and num_entries. |
| 60 | pub const fn packed_size(bits_per_entry: u8, num_entries: usize) -> usize { |
| 61 | u64::div_ceil( |
| 62 | num_entries as u64, |
| 63 | (u64::BITS / bits_per_entry as u32) as u64, |
| 64 | ) as usize |
| 65 | } |
| 66 | |
| 67 | /// New empty PackedArray |
| 68 | pub fn new(bits_per_entry: u8, num_entries: usize) -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected