Skip to content

Commit

Permalink
woops, fix gcc build
Browse files Browse the repository at this point in the history
  • Loading branch information
ledwards2225 committed Mar 21, 2023
1 parent cc1366b commit f0338fa
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions cpp/src/barretenberg/honk/pcs/gemini/gemini.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ template <typename Params> class MultilinearReductionScheme {
using Commitment = typename Params::Commitment;
using CommitmentAffine = typename Params::C;
using Polynomial = barretenberg::Polynomial<Fr>;
using OpeningPair = OpeningPair<Params>;
using OpeningClaim = OpeningClaim<Params>;

public:
/**
Expand Down Expand Up @@ -171,16 +169,17 @@ template <typename Params> class MultilinearReductionScheme {
// A₀₋(X) = F(X) - G(X)/r, s.t. A₀₋(-r) = A₀(-r)
A_0_neg -= tmp;

std::vector<OpeningPair> fold_poly_opening_pairs;
std::vector<OpeningPair<Params>> fold_poly_opening_pairs;
fold_poly_opening_pairs.reserve(num_variables + 1);

// Compute first opening pair {r, A₀(r)}
fold_poly_opening_pairs.emplace_back(OpeningPair{ r_challenge, fold_polynomials[0].evaluate(r_challenge) });
fold_poly_opening_pairs.emplace_back(
OpeningPair<Params>{ r_challenge, fold_polynomials[0].evaluate(r_challenge) });

// Compute the remaining m opening pairs {−r^{2ˡ}, Aₗ(−r^{2ˡ})}, l = 0, ..., m-1.
for (size_t l = 0; l < num_variables; ++l) {
fold_poly_opening_pairs.emplace_back(
OpeningPair{ -r_squares[l], fold_polynomials[l + 1].evaluate(-r_squares[l]) });
OpeningPair<Params>{ -r_squares[l], fold_polynomials[l + 1].evaluate(-r_squares[l]) });
}

return { fold_poly_opening_pairs, std::move(fold_polynomials) };
Expand All @@ -199,11 +198,11 @@ template <typename Params> class MultilinearReductionScheme {
* @return Fold polynomial opening claims: (r, A₀(r), C₀₊), (-r, A₀(-r), C₀₋), and
* (Cⱼ, Aⱼ(-r^{2ʲ}), -r^{2}), j = [1, ..., m-1]
*/
static std::vector<OpeningClaim> reduce_verify(std::span<const Fr> mle_opening_point, /* u */
const Fr batched_evaluation, /* all */
Commitment& batched_f, /* unshifted */
Commitment& batched_g, /* to-be-shifted */
VerifierTranscript<Fr>& transcript)
static std::vector<OpeningClaim<Params>> reduce_verify(std::span<const Fr> mle_opening_point, /* u */
const Fr batched_evaluation, /* all */
Commitment& batched_f, /* unshifted */
Commitment& batched_g, /* to-be-shifted */
VerifierTranscript<Fr>& transcript)
{
const size_t num_variables = mle_opening_point.size();

Expand Down Expand Up @@ -235,17 +234,17 @@ template <typename Params> class MultilinearReductionScheme {
// C₀_r_pos = ∑ⱼ ρʲ⋅[fⱼ] - r⁻¹⋅∑ⱼ ρᵏ⁺ʲ [gⱼ]
auto [c0_r_pos, c0_r_neg] = compute_simulated_commitments(batched_f, batched_g, r);

std::vector<OpeningClaim> fold_polynomial_opening_claims;
std::vector<OpeningClaim<Params>> fold_polynomial_opening_claims;
fold_polynomial_opening_claims.reserve(num_variables + 1);

// ( [A₀₊], r, A₀(r) )
fold_polynomial_opening_claims.emplace_back(OpeningClaim{ { r, a_0_pos }, c0_r_pos });
fold_polynomial_opening_claims.emplace_back(OpeningClaim<Params>{ { r, a_0_pos }, c0_r_pos });
// ( [A₀₋], -r, A₀(-r) )
fold_polynomial_opening_claims.emplace_back(OpeningClaim{ { -r, evaluations[0] }, c0_r_neg });
fold_polynomial_opening_claims.emplace_back(OpeningClaim<Params>{ { -r, evaluations[0] }, c0_r_neg });
for (size_t l = 0; l < num_variables - 1; ++l) {
// ([A₀₋], −r^{2ˡ}, Aₗ(−r^{2ˡ}) )
fold_polynomial_opening_claims.emplace_back(
OpeningClaim{ { -r_squares[l + 1], evaluations[l + 1] }, commitments[l] });
OpeningClaim<Params>{ { -r_squares[l + 1], evaluations[l + 1] }, commitments[l] });
}

return fold_polynomial_opening_claims;
Expand Down

0 comments on commit f0338fa

Please sign in to comment.