|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Shared chunk scheduler for dynamic work-stealing in the sumcheck prover's main loop. More...
#include <sumcheck_round.hpp>
Public Member Functions | |
| ChunkStealer (size_t start, size_t end, size_t rpc) | |
| size_t | num_slots () const |
| std::optional< std::pair< size_t, size_t > > | pop () |
Public Attributes | |
| const size_t | start_edge_idx |
| const size_t | end_edge_idx |
| const size_t | rows_per_chunk |
| const size_t | total_chunks |
| std::atomic< size_t > | next_chunk { 0 } |
Shared chunk scheduler for dynamic work-stealing in the sumcheck prover's main loop.
Splits the edge range [start_edge_idx, end_edge_idx) into fixed-size chunks and hands them out via an atomic counter. Workers call pop() in a loop; each call returns the next chunk to process (or nullopt when the range is exhausted). Spawns at most as many threads as there are chunks. Designed to balance thread-work by accounting for the non-uniform cost of relation algebra execution across different rows of the trace.
Definition at line 201 of file sumcheck_round.hpp.
|
inline |
Definition at line 208 of file sumcheck_round.hpp.
|
inline |
Definition at line 220 of file sumcheck_round.hpp.
|
inline |
Definition at line 222 of file sumcheck_round.hpp.
| const size_t bb::SumcheckProverRound< Flavor >::ChunkStealer::end_edge_idx |
Definition at line 203 of file sumcheck_round.hpp.
| std::atomic<size_t> bb::SumcheckProverRound< Flavor >::ChunkStealer::next_chunk { 0 } |
Definition at line 206 of file sumcheck_round.hpp.
| const size_t bb::SumcheckProverRound< Flavor >::ChunkStealer::rows_per_chunk |
Definition at line 204 of file sumcheck_round.hpp.
| const size_t bb::SumcheckProverRound< Flavor >::ChunkStealer::start_edge_idx |
Definition at line 202 of file sumcheck_round.hpp.
| const size_t bb::SumcheckProverRound< Flavor >::ChunkStealer::total_chunks |
Definition at line 205 of file sumcheck_round.hpp.