mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-12 10:43:07 +00:00
23 lines
681 B
Rust
23 lines
681 B
Rust
|
|
use log::error;
|
||
|
|
|
||
|
|
/// Emit an error message regarding unchecked range assumptions.
|
||
|
|
/// Assumes the values in `cols` are `[cols[0], cols[0] + 1, ...,
|
||
|
|
/// cols[0] + cols.len() - 1]`.
|
||
|
|
pub(crate) fn _range_check_error<const RC_BITS: u32>(file: &str, line: u32, cols: &[usize]) {
|
||
|
|
error!(
|
||
|
|
"{}:{}: arithmetic unit skipped {}-bit range-checks on columns {}--{}: not yet implemented",
|
||
|
|
line,
|
||
|
|
file,
|
||
|
|
RC_BITS,
|
||
|
|
cols[0],
|
||
|
|
cols[0] + cols.len() - 1
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
#[macro_export]
|
||
|
|
macro_rules! range_check_error {
|
||
|
|
($cols:ident, $rc_bits:expr) => {
|
||
|
|
$crate::arithmetic::utils::_range_check_error::<$rc_bits>(file!(), line!(), &$cols);
|
||
|
|
};
|
||
|
|
}
|