Skip to content

Commit

Permalink
Fix shadowing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubarov committed Jan 24, 2024
1 parent 27bf713 commit fd6c848
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ impl CpuChip {
let word_1 = CPU_COL_MAP.mem_channels[0]
.value
.into_iter()
.map(|i| rows[i][i])
.map(|j| rows[i][j])
.collect::<Vec<_>>();
let word_2 = CPU_COL_MAP.mem_channels[1]
.value
.into_iter()
.map(|i| rows[i][i])
.map(|j| rows[i][j])
.collect::<Vec<_>>();
for (a, b) in word_1.into_iter().zip(word_2) {
diff[i] += (a - b).square();
Expand Down
2 changes: 1 addition & 1 deletion cpu/src/stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ impl CpuChip {
.read_value_1()
.into_iter()
.zip(local.read_value_2())
.map(|(a, b)| (a - b) * (a - b))
.map(|(a, b)| (a - b).square())
.sum::<AB::Expr>(),
);
builder.assert_bool(local.not_equal);
Expand Down

0 comments on commit fd6c848

Please sign in to comment.