Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: compilation on homebrew clang 16.06 #1937

Merged
merged 1 commit into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ TEST(bitop, ClzUint640)
EXPECT_EQ(numeric::count_leading_zeros(a), 0U);
}

TEST(bitop, ClzSizeT)
{
size_t a = 0x80;
auto r = numeric::count_leading_zeros(a);
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
if (sizeof(a) == 4) {
EXPECT_EQ(r, 24U);
} else {
EXPECT_EQ(r, 56U);
}
}

TEST(bitop, ClzUint256255)
{
uint256_t a = 0x1;
Expand All @@ -42,4 +31,4 @@ TEST(bitop, ClzUint256248)
uint256_t a = 0x80;
auto r = numeric::count_leading_zeros(a);
EXPECT_EQ(r, 248U);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ std::array<typename Flavor::GroupElement, 2> UltraRecursiveVerifier_<Flavor>::ve
const auto pub_inputs_offset = transcript.template receive_from_prover<uint32_t>("pub_inputs_offset");

// For debugging purposes only
ASSERT(static_cast<size_t>(circuit_size.get_value()) == key->circuit_size);
ASSERT(static_cast<size_t>(public_input_size.get_value()) == key->num_public_inputs);
ASSERT(static_cast<uint32_t>(circuit_size.get_value()) == key->circuit_size);
ASSERT(static_cast<uint32_t>(public_input_size.get_value()) == key->num_public_inputs);

std::vector<FF> public_inputs;
for (size_t i = 0; i < static_cast<size_t>(public_input_size.get_value()); ++i) {
for (size_t i = 0; i < static_cast<uint32_t>(public_input_size.get_value()); ++i) {
auto public_input_i = transcript.template receive_from_prover<FF>("public_input_" + std::to_string(i));
public_inputs.emplace_back(public_input_i);
}
Expand Down Expand Up @@ -101,7 +101,7 @@ std::array<typename Flavor::GroupElement, 2> UltraRecursiveVerifier_<Flavor>::ve
auto [beta, gamma] = transcript.get_challenges("beta", "gamma");

const FF public_input_delta = proof_system::honk::compute_public_input_delta<Flavor>(
public_inputs, beta, gamma, circuit_size, static_cast<size_t>(pub_inputs_offset.get_value()));
public_inputs, beta, gamma, circuit_size, static_cast<uint32_t>(pub_inputs_offset.get_value()));
const FF lookup_grand_product_delta =
proof_system::honk::compute_lookup_grand_product_delta<FF>(beta, gamma, circuit_size);

Expand All @@ -115,7 +115,7 @@ std::array<typename Flavor::GroupElement, 2> UltraRecursiveVerifier_<Flavor>::ve
commitments.z_lookup = transcript.template receive_from_prover<Commitment>(commitment_labels.z_lookup);

// Execute Sumcheck Verifier
auto sumcheck = Sumcheck(static_cast<size_t>(circuit_size.get_value()));
auto sumcheck = Sumcheck(static_cast<uint32_t>(circuit_size.get_value()));

std::optional sumcheck_output = sumcheck.verify(relation_parameters, transcript);

Expand Down