Expand description
Various simple utilities.
Modules§
Traits§
- VecExt
- Convenience methods for Vec.
Functions§
- apply_
to_ chunks - Split an iterator into small arrays and apply
func
to each. - assume
- branch_
hint - Try to force Rust to emit a branch. Example:
- convert_
vec ⚠ - Converts a vector of one type to one of another type.
- indices_
arr - Returns
[0, ..., N - 1]
. - 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.
- reverse_
bits - reverse_
bits_ len - reverse_
slice_ index_ bits - Permutes
arr
such that each index is mapped to its reverse in binary. If the whole array fits in fast cache, then the trivial algorithm is cache friendly. Also, ifT
is really big, then the trivial algorithm is cache-friendly, no matter the size of the array. - transpose_
vec