Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: debug build #3283

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,19 @@ template MultiTable table::get_fixed_base_table<1, table::BITS_PER_HI_SCALAR>(Mu
template MultiTable table::get_fixed_base_table<2, table::BITS_PER_LO_SCALAR>(MultiTableId);
template MultiTable table::get_fixed_base_table<3, table::BITS_PER_HI_SCALAR>(MultiTableId);

const table::all_multi_tables table::fixed_base_tables = {
table::generate_tables<BITS_PER_LO_SCALAR>(lhs_base_point_lo),
table::generate_tables<BITS_PER_HI_SCALAR>(lhs_base_point_hi),
table::generate_tables<BITS_PER_LO_SCALAR>(rhs_base_point_lo),
table::generate_tables<BITS_PER_HI_SCALAR>(rhs_base_point_hi),
};

const std::array<table::affine_element, table::NUM_FIXED_BASE_MULTI_TABLES>
table::fixed_base_table_offset_generators = {
table::generate_generator_offset<BITS_PER_LO_SCALAR>(lhs_base_point_lo),
table::generate_generator_offset<BITS_PER_HI_SCALAR>(lhs_base_point_hi),
table::generate_generator_offset<BITS_PER_LO_SCALAR>(rhs_base_point_lo),
table::generate_generator_offset<BITS_PER_HI_SCALAR>(rhs_base_point_hi),
};

} // namespace plookup::fixed_base
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@ class table : public FixedBaseParams {
// fixed_base_tables = lookup tables of precomputed base points required for our lookup arguments.
// N.B. these "tables" are not plookup tables, just regular ol' software lookup tables.
// Used to build the proper plookup table and in the `BasicTable::get_values_from_key` method
inline static const all_multi_tables fixed_base_tables = {
table::generate_tables<BITS_PER_LO_SCALAR>(lhs_base_point_lo),
table::generate_tables<BITS_PER_HI_SCALAR>(lhs_base_point_hi),
table::generate_tables<BITS_PER_LO_SCALAR>(rhs_base_point_lo),
table::generate_tables<BITS_PER_HI_SCALAR>(rhs_base_point_hi),
};
static const all_multi_tables fixed_base_tables;

/**
* @brief offset generators!
Expand All @@ -68,13 +63,7 @@ class table : public FixedBaseParams {
* The final scalar multiplication output will have a precisely-known contribution from the offset generators,
* which can then be subtracted off with a single point subtraction.
**/
inline static const std::array<affine_element, table::NUM_FIXED_BASE_MULTI_TABLES>
fixed_base_table_offset_generators = {
table::generate_generator_offset<BITS_PER_LO_SCALAR>(lhs_base_point_lo),
table::generate_generator_offset<BITS_PER_HI_SCALAR>(lhs_base_point_hi),
table::generate_generator_offset<BITS_PER_LO_SCALAR>(rhs_base_point_lo),
table::generate_generator_offset<BITS_PER_HI_SCALAR>(rhs_base_point_hi),
};
static const std::array<affine_element, table::NUM_FIXED_BASE_MULTI_TABLES> fixed_base_table_offset_generators;

static bool lookup_table_exists_for_point(const affine_element& input);
static std::optional<std::array<MultiTableId, 2>> get_lookup_table_ids_for_point(const affine_element& input);
Expand Down