82 const std::vector<size_t>& sequence_counts,
83 const std::span<Fq>& scratch_space);
118 const auto& x1 = point_1.x;
119 const auto& y1 = point_1.y;
120 const auto& x2 = point_2.x;
121 const auto& y2 = point_2.y;
123 const Fq lambda = denominator * (y2 - y1);
124 Fq x3 = lambda.sqr() - x2 - x1;
125 Fq y3 = lambda * (x1 - x3) - y1;
Class for handling fast batched affine addition of large sets of EC points.
static std::vector< G1 > add_in_place(const std::span< G1 > &points, const std::vector< size_t > &sequence_counts)
Given a set of points and sequence counts, peform addition to reduce each sequence to a single point.
static void batched_affine_add_in_place(AdditionSequences add_sequences)
Internal method for in-place summation of a single set of addition sequences.
static ThreadData construct_thread_data(const std::span< G1 > &points, const std::vector< size_t > &sequence_counts, const std::span< Fq > &scratch_space)
Construct the set of AdditionSequences to be handled by each thread.
typename Curve::ScalarField Fr
typename Curve::AffineElement G1
static G1 affine_add_with_denominator(const G1 &point_1, const G1 &point_2, const Fq &denominator)
Add two affine elements with the inverse in the slope term \lambda provided as input.
typename Curve::BaseField Fq
static std::span< Fq > batch_compute_point_addition_slope_inverses(const AdditionSequences &add_sequences)
Batch compute inverses needed for a set of affine point addition sequences.
typename Group::affine_element AffineElement
Entry point for Barretenberg command-line interface.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::vector< size_t > sequence_counts
std::span< Fq > scratch_space
std::vector< AdditionSequences > addition_sequences
std::vector< std::vector< size_t > > sequence_tags