mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-22 07:33:06 +00:00
32 lines
1.0 KiB
Rust
32 lines
1.0 KiB
Rust
|
|
use plonky2::field::extension_field::Extendable;
|
||
|
|
use plonky2::field::field_types::Field;
|
||
|
|
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;
|
||
|
|
|
||
|
|
pub(crate) fn generate_division<F: RichField>(values: &mut [F; NUM_COLUMNS]) {
|
||
|
|
// 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
|
||
|
|
}
|