Skip to content

Commit

Permalink
another fuzzer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ledwards2225 committed Sep 21, 2023
1 parent c9968fe commit 3c0ce22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions barretenberg/cpp/src/barretenberg/common/fuzzer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,21 +680,21 @@ class ArithmeticFuzzHelper {
};

template <template <typename> class Fuzzer, typename Composer>
constexpr void RunWithComposer(const uint8_t* Data, const size_t Size, FastRandom& VarianceRNG)
constexpr void RunWithBuilder(const uint8_t* Data, const size_t Size, FastRandom& VarianceRNG)
{
VarianceRNG.reseed(0);
auto instructions = ArithmeticFuzzHelper<Fuzzer<Composer>>::parseDataIntoInstructions(Data, Size);
ArithmeticFuzzHelper<Fuzzer<Composer>>::template executeInstructions<Composer>(instructions);
}

template <template <typename> class Fuzzer, uint64_t Composers>
constexpr void RunWithComposers(const uint8_t* Data, const size_t Size, FastRandom& VarianceRNG)
constexpr void RunWithBuilders(const uint8_t* Data, const size_t Size, FastRandom& VarianceRNG)
{
if (Composers & 1) {
RunWithComposer<Fuzzer, proof_system::StandardCircuitBuilder>(Data, Size, VarianceRNG);
RunWithBuilder<Fuzzer, proof_system::StandardCircuitBuilder>(Data, Size, VarianceRNG);
}
if (Composers & 2) {
RunWithComposer<Fuzzer, proof_system::TurboCircuitBuilder>(Data, Size, VarianceRNG);
RunWithBuilder<Fuzzer, proof_system::TurboCircuitBuilder>(Data, Size, VarianceRNG);
}
}

Expand Down

0 comments on commit 3c0ce22

Please sign in to comment.