Skip to content

Commit

Permalink
Change arrays to ref
Browse files Browse the repository at this point in the history
  • Loading branch information
TlatoaniHJ committed Nov 1, 2024
1 parent 05e047a commit bb3fca1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/recursion/src/fri/two_adic_pcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ pub fn verify_two_adic_pcs<C: Config>(
});*/

let fri_fold_result =
builder.fri_fold(alpha, cur_alpha_pow, mat_opening, ps_at_z);
builder.fri_fold(alpha, cur_alpha_pow, &mat_opening, &ps_at_z);
builder.assign(&cur_ro, cur_ro + (fri_fold_result / (z - x)));

builder.cycle_tracker_end("sp1-fri-fold");
Expand Down
8 changes: 4 additions & 4 deletions toolchain/native-compiler/src/ir/fri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ impl<C: Config> Builder<C> {
&mut self,
alpha: Ext<C::F, C::EF>,
curr_alpha_pow: Ext<C::F, C::EF>,
at_x_array: Array<C, Felt<C::F>>,
at_z_array: Array<C, Ext<C::F, C::EF>>,
at_x_array: &Array<C, Felt<C::F>>,
at_z_array: &Array<C, Ext<C::F, C::EF>>,
) -> Ext<C::F, C::EF> {
let result = self.uninit();
self.operations.push(crate::ir::DslIr::FriFold(
alpha,
curr_alpha_pow,
at_x_array,
at_z_array,
at_x_array.clone(),
at_z_array.clone(),
result,
));
result
Expand Down
2 changes: 1 addition & 1 deletion toolchain/native-compiler/tests/fri_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn test_fri_fold() {

let cur_alpha_pow: Ext<_, _> = builder.uninit();
builder.assign(&cur_alpha_pow, initial_alpha_pow);
let fri_fold_result = builder.fri_fold(alpha, cur_alpha_pow, mat_opening, ps_at_z);
let fri_fold_result = builder.fri_fold(alpha, cur_alpha_pow, &mat_opening, &ps_at_z);
let actual_final_alpha_pow = cur_alpha_pow;
let actual_result: Ext<_, _> = builder.uninit();
builder.assign(&actual_result, fri_fold_result / (z - x));
Expand Down

0 comments on commit bb3fca1

Please sign in to comment.