Crate p3_util

Crate p3_util 

Source
Expand description

Various simple utilities.

Modules§

array_serialization
linear_map
transpose
zip_eq

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 of Base elements
as_base_slice_mut
Reinterpret a mutable slice of BaseArray elements as a slice of Base elements
assume
Allow the compiler to assume that the given predicate p is always true.
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 of Base elements without any reallocations.
gcd_inner
Inner loop of the deferred GCD algorithm.
gcd_inversion_prime_field_32
Inverts elements inside the prime field F_P with P < 2^FIELD_BITS.
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 of BaseArray 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.