Crate p3_util

Source
Expand description

Various simple utilities.

Modules§

array_serialization
linear_map
transpose
zip_eq

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, if T is really big, then the trivial algorithm is cache-friendly, no matter the size of the array.
transpose_vec