79 for (
const auto& u_k : challenge) {
144 const size_t log_num_monomials)
147 size_t pow_size = 1 << log_num_monomials;
155 size_t min_iterations_per_thread = 1 << 6;
156 size_t desired_num_threads = pow_size / min_iterations_per_thread;
157 size_t num_threads = std::min(desired_num_threads, max_num_threads);
158 num_threads = num_threads > 0 ? num_threads : 1;
159 size_t iterations_per_thread = pow_size / num_threads;
166 size_t start = thread_idx * iterations_per_thread;
167 size_t end = (thread_idx + 1) * iterations_per_thread;
168 for (
size_t i = start; i < end; i++) {
170 for (
size_t j = i, beta_idx = 0; j > 0; j >>= 1, beta_idx++) {
172 res *=
betas[beta_idx];
Entry point for Barretenberg command-line interface.
size_t get_num_cpus_pow2()
void parallel_for(size_t num_iterations, const std::function< void(size_t)> &func)
Implementation of the methods for the -polynomials used in Protogalaxy and -polynomials used in Sumch...
std::vector< FF > beta_products
The consecutive evaluations for identified with the integers .
GateSeparatorPolynomial(const std::vector< FF > &betas)
Construct a new GateSeparatorPolynomial object without expanding to a vector of monomials.
static BB_PROFILE std::vector< FF > compute_beta_products(const std::vector< FF > &betas, const size_t log_num_monomials)
Given compute for .
size_t periodicity
In Round of Sumcheck, the periodicity equals to and represents the fixed interval at which elements...
GateSeparatorPolynomial(const std::vector< FF > &betas, const size_t log_num_monomials)
Construct a new GateSeparatorPolynomial.
std::vector< FF > betas
The challenges .
FF current_element() const
Computes the component at index current_element_idx in betas.
FF const & operator[](size_t idx) const
Retruns the element in beta_products at place #idx.
void partially_evaluate(FF challenge)
Partially evaluate the -polynomial at the new challenge and update .
FF univariate_eval(FF challenge) const
Evaluate at the challenge point .
GateSeparatorPolynomial(const std::vector< FF > &betas, const std::vector< FF > &challenge)
Constructs a virtual GateSeparator used by the prover in rounds k > d - 1, and computes its partial e...
FF partial_evaluation_result
The value obtained by partially evaluating one variable in the power polynomial at each round....
void partially_evaluate(const FF &challenge, const FF &indicator)
Partially evaluate the -polynomial at the new challenge and update .
size_t current_element_idx
In Round of Sumcheck, it points to the -th element in .