Skip to content

Commit

Permalink
more compiler fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevjue committed Apr 24, 2024
1 parent 364f6e5 commit a9c5f8f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions recursion/core/src/range_check/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ pub struct RangeCheckEvent {
/// The val to range check.
pub val: u16,
}

impl RangeCheckEvent {
/// Creates a new `RangeCheckEvent`.
pub fn new(opcode: RangeCheckOpcode, val: u16) -> Self {
Self { opcode, val }
}
}
2 changes: 1 addition & 1 deletion recursion/core/src/range_check/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl<F: PrimeField32> MachineAir<F> for RangeCheckChip<F> {
NUM_RANGE_CHECK_MULT_COLS,
);

for (lookup, mult) in input.range_check_lookups.iter() {
for (lookup, mult) in input.range_check_events.iter() {
let (row, index) = event_map[lookup];
let cols: &mut RangeCheckMultCols<F> = trace.row_mut(row).borrow_mut();

Expand Down
3 changes: 3 additions & 0 deletions recursion/core/src/runtime/record.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::collections::BTreeMap;
use std::sync::Arc;

use p3_field::{AbstractField, PrimeField32};
Expand All @@ -9,13 +10,15 @@ use crate::air::Block;
use crate::cpu::CpuEvent;
use crate::fri_fold::FriFoldEvent;
use crate::poseidon2::Poseidon2Event;
use crate::range_check::RangeCheckEvent;

#[derive(Default, Debug, Clone)]
pub struct ExecutionRecord<F: Default> {
pub program: Arc<RecursionProgram<F>>,
pub cpu_events: Vec<CpuEvent<F>>,
pub poseidon2_events: Vec<Poseidon2Event<F>>,
pub fri_fold_events: Vec<FriFoldEvent<F>>,
pub range_check_events: BTreeMap<RangeCheckEvent, usize>,

// (address)
pub first_memory_record: Vec<F>,
Expand Down

0 comments on commit a9c5f8f

Please sign in to comment.