Skip to content

Commit

Permalink
clippy auto fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyong1997 committed Feb 25, 2025
1 parent c12cfbd commit ce2d439
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
10 changes: 5 additions & 5 deletions arith/polynomials/src/mle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,21 +285,21 @@ impl<C: GKRFieldConfig> MultiLinearPolyExpander<C> {
scratch_challenge_field,
);

let global_v = if mpi_config.is_root() {


if mpi_config.is_root() {
let mut claimed_v_gathering_buffer =
vec![C::ChallengeField::zero(); mpi_config.world_size()];
mpi_config.gather_vec(&vec![local_v], &mut claimed_v_gathering_buffer);
MultiLinearPoly::evaluate_with_buffer(
&claimed_v_gathering_buffer,
&x_mpi,
x_mpi,
scratch_challenge_field,
)
} else {
mpi_config.gather_vec(&vec![local_v], &mut vec![]);
C::ChallengeField::zero()
};

global_v
}
}

/// This assumes only a single core holds all the evals, and evaluate it locally
Expand Down
3 changes: 1 addition & 2 deletions gkr/src/prover/gkr.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
//! This module implements the core GKR IOP.
use arith::{Field, SimdField};
use circuit::Circuit;
use gkr_field_config::GKRFieldConfig;
use mpi_config::MPIConfig;
use polynomials::{MultiLinearPoly, MultiLinearPolyExpander};
use polynomials::MultiLinearPolyExpander;
use sumcheck::{sumcheck_prove_gkr_layer, ProverScratchPad};
use transcript::Transcript;
use utils::timer::Timer;
Expand Down
1 change: 0 additions & 1 deletion gkr/src/prover/gkr_square.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// an implementation of the GKR^2 protocol
//! This module implements the core GKR^2 IOP.
use arith::{Field, SimdField};
use ark_std::{end_timer, start_timer};
use circuit::Circuit;
use gkr_field_config::GKRFieldConfig;
Expand Down
2 changes: 1 addition & 1 deletion poly_commit/src/orion/simd_field_agg_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use transcript::{BytesHashTranscript, Keccak256hasher, Transcript};

use crate::{
orion::{simd_field_agg_impl::*, utils::*, *},
ExpanderGKRChallenge, RawExpanderGKR,
ExpanderGKRChallenge,
};

#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion poly_commit/src/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
ExpanderGKRChallenge, PCSEmptyType, PCSForExpanderGKR, PolynomialCommitmentScheme,
StructuredReferenceString,
};
use arith::{BN254Fr, ExtensionField, Field, FieldForECC, FieldSerde, FieldSerdeResult, SimdField};
use arith::{BN254Fr, ExtensionField, Field, FieldForECC, FieldSerde, FieldSerdeResult};
use ethnum::U256;
use gkr_field_config::GKRFieldConfig;
use mpi_config::MPIConfig;
Expand Down
1 change: 0 additions & 1 deletion poly_commit/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use arith::{ExtensionField, Field};
use ark_std::test_rng;
use gkr_field_config::GKRFieldConfig;
use mpi_config::MPIConfig;
use poly_commit::raw::RawExpanderGKR;
use poly_commit::{
ExpanderGKRChallenge, PCSForExpanderGKR, PolynomialCommitmentScheme, StructuredReferenceString,
};
Expand Down

0 comments on commit ce2d439

Please sign in to comment.