2022-02-10 12:05:04 -08:00
|
|
|
use plonky2::field::extension_field::Extendable;
|
2022-02-14 13:47:33 -08:00
|
|
|
use plonky2::field::field_types::{Field, PrimeField64};
|
2022-02-10 12:05:04 -08:00
|
|
|
use plonky2::field::packed_field::PackedField;
|
|
|
|
|
use plonky2::hash::hash_types::RichField;
|
|
|
|
|
use plonky2::iop::ext_target::ExtensionTarget;
|
|
|
|
|
use plonky2::plonk::circuit_builder::CircuitBuilder;
|
|
|
|
|
use starky::constraint_consumer::{ConstraintConsumer, RecursiveConstraintConsumer};
|
|
|
|
|
|
|
|
|
|
use crate::registers::arithmetic::*;
|
|
|
|
|
use crate::registers::NUM_COLUMNS;
|
|
|
|
|
|
2022-02-14 13:47:33 -08:00
|
|
|
pub(crate) fn generate_division<F: PrimeField64>(values: &mut [F; NUM_COLUMNS]) {
|
2022-02-10 12:05:04 -08:00
|
|
|
// TODO
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub(crate) fn eval_division<F: Field, P: PackedField<Scalar = F>>(
|
|
|
|
|
local_values: &[P; NUM_COLUMNS],
|
|
|
|
|
yield_constr: &mut ConstraintConsumer<P>,
|
|
|
|
|
) {
|
|
|
|
|
let is_div = local_values[IS_DIV];
|
|
|
|
|
// TODO
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub(crate) fn eval_division_recursively<F: RichField + Extendable<D>, const D: usize>(
|
|
|
|
|
builder: &mut CircuitBuilder<F, D>,
|
|
|
|
|
local_values: &[ExtensionTarget<D>; NUM_COLUMNS],
|
|
|
|
|
yield_constr: &mut RecursiveConstraintConsumer<F, D>,
|
|
|
|
|
) {
|
|
|
|
|
let is_div = local_values[IS_DIV];
|
|
|
|
|
// TODO
|
|
|
|
|
}
|