Skip to content

Commit

Permalink
fix benches
Browse files Browse the repository at this point in the history
  • Loading branch information
rebenkoy committed Nov 21, 2023
1 parent 4d42ff4 commit 5b37c3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions benches/bench_ecmul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ pub fn homogenize<'a>(gate: Gatebb<'a, F>, mu: F) -> Gatebb<'a, F> {
ibuf.push(input[i] * mu_inv);
}

let mut obuf = gate.exec(&ibuf, &[]);
let mut obuf = gate.exec(&ibuf);
for i in 0..obuf.len() {
obuf[i] *= mu_d;
}

obuf
};

Gatebb::new(gate_d, gate_i, gate_o, Rc::new(f))
Gatebb::new(gate_d, gate_i, gate_o, Rc::new(f), vec![])
}

pub fn evaluate_on_random_linear_combinations<'c>(gate: &impl Gate<'c, F>, a: &Vec<F>, b: &Vec<F>, randomness: &Vec<F>) {
Expand All @@ -44,7 +44,7 @@ pub fn evaluate_on_random_linear_combinations<'c>(gate: &impl Gate<'c, F>, a: &V
for i in 0..gate.d() {
let fold: Vec<_> = a.iter().zip(b.iter()).map(|(&x, &y)| x + randomness[i] * y).collect();

let obuf = gate.exec(&fold, &[]);
let obuf = gate.exec(&fold);
interpolation_values.push(obuf);
}

Expand Down
6 changes: 3 additions & 3 deletions benches/bench_poseidons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ pub fn homogenize<'a>(gate: Gatebb<'a, F>, mu: F) -> Gatebb<'a, F> {
ibuf.push(input[i] * mu_inv);
}

let mut obuf = gate.exec(&ibuf, &[]);
let mut obuf = gate.exec(&ibuf);
for i in 0..obuf.len() {
obuf[i] *= mu_d;
}

obuf
};

Gatebb::new(gate_d, gate_i, gate_o, Rc::new(f))
Gatebb::new(gate_d, gate_i, gate_o, Rc::new(f), vec![])
}

pub fn evaluate_on_random_linear_combinations<'c>(gate: &impl Gate<'c, F>, a: &Vec<F>, b: &Vec<F>, randomness: &Vec<F>) {
Expand All @@ -42,7 +42,7 @@ pub fn evaluate_on_random_linear_combinations<'c>(gate: &impl Gate<'c, F>, a: &V
for i in 0..gate.d() {
let fold: Vec<_> = a.iter().zip(b.iter()).map(|(&x, &y)| x + randomness[i] * y).collect();

let obuf = gate.exec(&fold, &[]);
let obuf = gate.exec(&fold);
interpolation_values.push(obuf);
}

Expand Down

0 comments on commit 5b37c3f

Please sign in to comment.