Skip to content

Commit

Permalink
fix: use loop var
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-sun committed Jan 6, 2025
1 parent 81bfec1 commit f91b56e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/native/compiler/src/ir/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use super::{
Array, Config, DslIr, Ext, Felt, FromConstant, MemIndex, MemVariable, RVar, SymbolicExt,
SymbolicFelt, SymbolicVar, Usize, Var, Variable,
};
use crate::ir::Ptr;

/// TracedVec is a Vec wrapper that records a trace whenever an element is pushed. When extending
/// from another TracedVec, the traces are copied over.
Expand Down Expand Up @@ -942,7 +943,9 @@ impl<'a, C: Config, V: MemVariable<C>> IteratorBuilder<'a, C, V> {
let val: V = self.builder.uninit();
self.builder.load(
val.clone(),
self.array.ptr(),
Ptr {
address: loop_variable,
},
MemIndex {
index: 0.into(),
offset: 0,
Expand Down

0 comments on commit f91b56e

Please sign in to comment.