Expand description
Various simple utilities.
Modules§
Functions§
- apply_
to_ chunks - Split an iterator into small arrays and apply
func
to each. - as_
base_ ⚠slice - Reinterpret a slice of
BaseArray
elements as a slice ofBase
elements - as_
base_ ⚠slice_ mut - Reinterpret a mutable slice of
BaseArray
elements as a slice ofBase
elements - assume
- assume_
init_ ⚠ref - Gets a shared reference to the contained value.
- branch_
hint - Try to force Rust to emit a branch. Example:
- flatten_
to_ ⚠base - Convert a vector of
BaseArray
elements to a vector ofBase
elements without any reallocations. - indices_
arr - Returns
[0, ..., N - 1]
. - iter_
array_ chunks_ padded - Returns an iterator over
N
elements of the iterator at a time. - log2_
ceil_ u64 - log2_
ceil_ usize - Computes
ceil(log_2(n))
. - log2_
strict_ usize - Computes
log_2(n)
- pretty_
name - Return a String containing the name of T but with all the crate and module prefixes removed.
- reconstitute_
from_ ⚠base - Convert a vector of
Base
elements to a vector ofBaseArray
elements ideally without any reallocations. - relatively_
prime_ u64 - reverse_
bits - reverse_
bits_ len - reverse_
slice_ index_ bits - Permutes
arr
such that each index is mapped to its reverse in binary.