pub use p3_air;
pub use p3_challenger;
pub use p3_field;
pub use p3_matrix;
pub use p3_maybe_rayon;
pub use p3_symmetric;
pub use p3_util;
use p3_util::log2_ceil_u64;
pub mod air_builders;
pub mod codec;
pub mod dft;
pub mod hasher;
pub mod interaction;
pub mod keygen;
pub mod memory_metering;
pub mod poly_common;
pub mod proof;
pub mod prover;
pub mod soundness;
pub mod utils;
pub mod verifier;
#[cfg(feature = "lean")]
pub mod lean;
#[cfg(any(test, feature = "test-utils"))]
pub mod test_utils;
pub mod transcript;
mod any_air;
mod config;
mod engine;
#[cfg(feature = "multi-field-transcript")]
pub mod multi_field_packing;
pub use any_air::*;
pub use config::*;
pub use engine::*;
pub use transcript::*;
#[cfg(all(feature = "jemalloc", unix, not(test)))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
#[cfg(all(feature = "mimalloc", not(test)))]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
pub fn calculate_n_logup(l_skip: usize, total_interactions: u64) -> usize {
if total_interactions != 0 {
let n_logup = (u64::BITS - total_interactions.leading_zeros()) as usize - l_skip;
debug_assert_eq!(
n_logup + l_skip,
log2_ceil_u64(total_interactions + 1) as usize
);
n_logup
} else {
0
}
}