pub fn boxed_ones(size: usize) -> Box<[u128]>
Expand description
Creates a boxed slice of u128
filled with binary ones, with the specified length in bits.
The function calculates the number of u128
elements needed to represent the given size
in bits, taking into account the bit width of u128
.
It uses a ceiling division to ensure all bits are accommodated.
Each element of the boxed slice is filled with ones, except for the last element, which is calculated to fit only the remaining bits required.
The resulting boxed slice represents a sequence of u128
values with all bits set to one up to the specified bit length.