Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
maramihali committed Nov 20, 2024
1 parent 8e25e2a commit 0467284
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# it is up to date with local master, and run the script.

# Specify the benchmark suite and the "baseline" branch against which to compare
BENCHMARK=${1:-client_ivc_bench}
BENCHMARK=${1:-goblin_bench}
FILTER=${2:-"*."}
PRESET=${3:-clang16}
BUILD_DIR=${4:-build}
Expand Down
3 changes: 1 addition & 2 deletions barretenberg/cpp/src/barretenberg/polynomials/polynomial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ template <typename Fr> Polynomial<Fr>::Polynomial(size_t size, size_t virtual_si
size_t leftovers = size - (range_per_thread * num_threads);
parallel_for(num_threads, [&](size_t j) {
size_t offset = j * range_per_thread;
size_t range = (j == num_threads - 1) ? range_per_thread + leftovers // Last thread processes extra elements
: range_per_thread;
size_t range = (j == num_threads - 1) ? range_per_thread + leftovers : range_per_thread;
ASSERT(offset < size);
ASSERT((offset + range) <= size);
memset(static_cast<void*>(coefficients_.backing_memory_.get() + offset), 0, sizeof(Fr) * range);
Expand Down
4 changes: 1 addition & 3 deletions barretenberg/cpp/src/barretenberg/polynomials/polynomial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ template <typename Fr> class Polynomial {
// Intended just for plonk, where size == virtual_size always
Polynomial(size_t size)
: Polynomial(size, size)
{
PROFILE_THIS_NAME("Polynomial allocation");
}
{}
// Constructor that does not initialize values, use with caution to save time.
Polynomial(size_t size, size_t virtual_size, size_t start_index, DontZeroMemory flag);
Polynomial(size_t size, size_t virtual_size, DontZeroMemory flag)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ class MegaFlavor {

void set_shifted()
{
PROFILE_THIS_NAME("set shifted");
for (auto [shifted, to_be_shifted] : zip_view(get_shifted(), get_to_be_shifted())) {
shifted = to_be_shifted.shifted();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,6 @@ class UltraFlavor {
// Set all shifted polynomials based on their to-be-shifted counterpart
void set_shifted()
{
PROFILE_THIS_NAME("set shifted");

for (auto [shifted, to_be_shifted] : zip_view(get_shifted(), get_to_be_shifted())) {
shifted = to_be_shifted.shifted();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ template <IsUltraFlavor Flavor> class DeciderProvingKey_ {
PROFILE_THIS_NAME("allocating proving key");

proving_key = ProvingKey(dyadic_circuit_size, circuit.public_inputs.size(), commitment_key);
info("dyadic circuit size: ", dyadic_circuit_size);
info("proving_key.circuit_size ", proving_key.circuit_size);
// If not using structured trace OR if using structured trace but overflow has occurred (overflow block in
// use), allocate full size polys
if ((IsMegaFlavor<Flavor> && !is_structured) || (is_structured && circuit.blocks.has_overflow)) {
Expand Down Expand Up @@ -138,6 +136,7 @@ template <IsUltraFlavor Flavor> class DeciderProvingKey_ {
}
{
PROFILE_THIS_NAME("allocating non-gate selectors");

// Set the other non-gate selector polynomials to full size
for (auto& selector : proving_key.polynomials.get_non_gate_selectors()) {
selector = Polynomial(proving_key.circuit_size);
Expand Down Expand Up @@ -262,7 +261,6 @@ template <IsUltraFlavor Flavor> class DeciderProvingKey_ {
/* size=*/dyadic_circuit_size, /*virtual size=*/dyadic_circuit_size, /*start_idx=*/0);
}
}

// We can finally set the shifted polynomials now that all of the to_be_shifted polynomials are
// defined.
proving_key.polynomials.set_shifted(); // Ensure shifted wires are set correctly
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/lib/openzeppelin-contracts

0 comments on commit 0467284

Please sign in to comment.