diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/incl_main_tag_err.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/incl_main_tag_err.hpp index c9caae3a4fb..6504fe11f26 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/incl_main_tag_err.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/incl_main_tag_err.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class incl_main_tag_err_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.mem_tag_err == 1 || in.main_tag_err == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class incl_main_tag_err_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.incl_main_tag_err, in.incl_main_tag_err_counts, in.mem_tag_err, @@ -141,16 +56,8 @@ class incl_main_tag_err_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.incl_main_tag_err, in.incl_main_tag_err_counts, in.mem_tag_err, @@ -164,4 +71,4 @@ template using incl_main_tag_err_relation = GenericLookupRelation; template using incl_main_tag_err = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/incl_mem_tag_err.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/incl_mem_tag_err.hpp index abbdf261766..b790c7ec113 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/incl_mem_tag_err.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/incl_mem_tag_err.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class incl_mem_tag_err_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_tag_err == 1 || in.mem_tag_err == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,44 +46,14 @@ class incl_mem_tag_err_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple( in.incl_mem_tag_err, in.incl_mem_tag_err_counts, in.main_tag_err, in.mem_tag_err, in.main_clk, in.mem_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple( in.incl_mem_tag_err, in.incl_mem_tag_err_counts, in.main_tag_err, in.mem_tag_err, in.main_clk, in.mem_clk); } @@ -155,4 +62,4 @@ class incl_mem_tag_err_lookup_settings { template using incl_mem_tag_err_relation = GenericLookupRelation; template using incl_mem_tag_err = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/kernel_output_lookup.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/kernel_output_lookup.hpp index d2eda9e27dd..5d41006a5c4 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/kernel_output_lookup.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/kernel_output_lookup.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class kernel_output_lookup_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 4; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_q_kernel_output_lookup == 1 || in.kernel_q_public_input_kernel_out_add_to_table == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class kernel_output_lookup_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.kernel_output_lookup, in.kernel_output_lookup_counts, in.main_sel_q_kernel_output_lookup, @@ -147,16 +62,8 @@ class kernel_output_lookup_lookup_settings { in.kernel_kernel_metadata_out); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.kernel_output_lookup, in.kernel_output_lookup_counts, in.main_sel_q_kernel_output_lookup, @@ -176,4 +83,4 @@ template using kernel_output_lookup_relation = GenericLookupRelation; template using kernel_output_lookup = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_byte_lengths.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_byte_lengths.hpp index bf8caeffe83..7dbde65e4e8 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_byte_lengths.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_byte_lengths.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_byte_lengths_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 2; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.binary_start == 1 || in.byte_lookup_sel_bin == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_byte_lengths_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_byte_lengths, in.lookup_byte_lengths_counts, in.binary_start, @@ -143,16 +58,8 @@ class lookup_byte_lengths_lookup_settings { in.byte_lookup_table_byte_lengths); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_byte_lengths, in.lookup_byte_lengths_counts, in.binary_start, @@ -168,4 +75,4 @@ template using lookup_byte_lengths_relation = GenericLookupRelation; template using lookup_byte_lengths = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_byte_operations.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_byte_operations.hpp index 94b514151e5..7e3b35390f2 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_byte_operations.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_byte_operations.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_byte_operations_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 4; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.binary_sel_bin == 1 || in.byte_lookup_sel_bin == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_byte_operations_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_byte_operations, in.lookup_byte_operations_counts, in.binary_sel_bin, @@ -147,16 +62,8 @@ class lookup_byte_operations_lookup_settings { in.byte_lookup_table_output); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_byte_operations, in.lookup_byte_operations_counts, in.binary_sel_bin, @@ -176,4 +83,4 @@ template using lookup_byte_operations_relation = GenericLookupRelation; template using lookup_byte_operations = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_0.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_0.hpp index 405c7068df5..722ae7e4486 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_0.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_0.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_div_u16_0_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_div_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_div_u16_0_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_0, in.lookup_div_u16_0_counts, in.alu_sel_div_rng_chk, @@ -141,16 +56,8 @@ class lookup_div_u16_0_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_0, in.lookup_div_u16_0_counts, in.alu_sel_div_rng_chk, @@ -163,4 +70,4 @@ class lookup_div_u16_0_lookup_settings { template using lookup_div_u16_0_relation = GenericLookupRelation; template using lookup_div_u16_0 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_1.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_1.hpp index 2a66fac3525..8e47192dbe9 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_1.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_1.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_div_u16_1_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_div_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_div_u16_1_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_1, in.lookup_div_u16_1_counts, in.alu_sel_div_rng_chk, @@ -141,16 +56,8 @@ class lookup_div_u16_1_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_1, in.lookup_div_u16_1_counts, in.alu_sel_div_rng_chk, @@ -163,4 +70,4 @@ class lookup_div_u16_1_lookup_settings { template using lookup_div_u16_1_relation = GenericLookupRelation; template using lookup_div_u16_1 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_2.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_2.hpp index 02d12a78597..cf15ed785e0 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_2.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_2.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_div_u16_2_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_div_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_div_u16_2_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_2, in.lookup_div_u16_2_counts, in.alu_sel_div_rng_chk, @@ -141,16 +56,8 @@ class lookup_div_u16_2_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_2, in.lookup_div_u16_2_counts, in.alu_sel_div_rng_chk, @@ -163,4 +70,4 @@ class lookup_div_u16_2_lookup_settings { template using lookup_div_u16_2_relation = GenericLookupRelation; template using lookup_div_u16_2 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_3.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_3.hpp index 438d59d1d4a..cbd1af82710 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_3.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_3.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_div_u16_3_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_div_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_div_u16_3_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_3, in.lookup_div_u16_3_counts, in.alu_sel_div_rng_chk, @@ -141,16 +56,8 @@ class lookup_div_u16_3_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_3, in.lookup_div_u16_3_counts, in.alu_sel_div_rng_chk, @@ -163,4 +70,4 @@ class lookup_div_u16_3_lookup_settings { template using lookup_div_u16_3_relation = GenericLookupRelation; template using lookup_div_u16_3 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_4.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_4.hpp index 7dd1c7cac4f..7df49f05139 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_4.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_4.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_div_u16_4_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_div_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_div_u16_4_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_4, in.lookup_div_u16_4_counts, in.alu_sel_div_rng_chk, @@ -141,16 +56,8 @@ class lookup_div_u16_4_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_4, in.lookup_div_u16_4_counts, in.alu_sel_div_rng_chk, @@ -163,4 +70,4 @@ class lookup_div_u16_4_lookup_settings { template using lookup_div_u16_4_relation = GenericLookupRelation; template using lookup_div_u16_4 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_5.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_5.hpp index cf3b6d8c71f..a58751eb66f 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_5.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_5.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_div_u16_5_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_div_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_div_u16_5_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_5, in.lookup_div_u16_5_counts, in.alu_sel_div_rng_chk, @@ -141,16 +56,8 @@ class lookup_div_u16_5_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_5, in.lookup_div_u16_5_counts, in.alu_sel_div_rng_chk, @@ -163,4 +70,4 @@ class lookup_div_u16_5_lookup_settings { template using lookup_div_u16_5_relation = GenericLookupRelation; template using lookup_div_u16_5 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_6.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_6.hpp index d78115f533c..51e4c73a501 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_6.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_6.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_div_u16_6_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_div_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_div_u16_6_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_6, in.lookup_div_u16_6_counts, in.alu_sel_div_rng_chk, @@ -141,16 +56,8 @@ class lookup_div_u16_6_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_6, in.lookup_div_u16_6_counts, in.alu_sel_div_rng_chk, @@ -163,4 +70,4 @@ class lookup_div_u16_6_lookup_settings { template using lookup_div_u16_6_relation = GenericLookupRelation; template using lookup_div_u16_6 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_7.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_7.hpp index 3ddb1cc484d..657221da61e 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_7.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_div_u16_7.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_div_u16_7_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_div_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_div_u16_7_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_7, in.lookup_div_u16_7_counts, in.alu_sel_div_rng_chk, @@ -141,16 +56,8 @@ class lookup_div_u16_7_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_div_u16_7, in.lookup_div_u16_7_counts, in.alu_sel_div_rng_chk, @@ -163,4 +70,4 @@ class lookup_div_u16_7_lookup_settings { template using lookup_div_u16_7_relation = GenericLookupRelation; template using lookup_div_u16_7 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_into_kernel.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_into_kernel.hpp index 0dc497d421a..dbd8cc05603 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_into_kernel.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_into_kernel.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_into_kernel_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 2; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_q_kernel_lookup == 1 || in.kernel_q_public_input_kernel_add_to_table == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_into_kernel_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_into_kernel, in.lookup_into_kernel_counts, in.main_sel_q_kernel_lookup, @@ -143,16 +58,8 @@ class lookup_into_kernel_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_into_kernel, in.lookup_into_kernel_counts, in.main_sel_q_kernel_lookup, @@ -168,4 +75,4 @@ template using lookup_into_kernel_relation = GenericLookupRelation; template using lookup_into_kernel = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_hi.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_hi.hpp index 7557705c592..933d2272d27 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_hi.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_hi.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_mem_rng_chk_hi_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.mem_sel_rng_chk == 1 || in.main_sel_rng_8 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_mem_rng_chk_hi_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_mem_rng_chk_hi, in.lookup_mem_rng_chk_hi_counts, in.mem_sel_rng_chk, @@ -141,16 +56,8 @@ class lookup_mem_rng_chk_hi_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_mem_rng_chk_hi, in.lookup_mem_rng_chk_hi_counts, in.mem_sel_rng_chk, @@ -164,4 +71,4 @@ template using lookup_mem_rng_chk_hi_relation = GenericLookupRelation; template using lookup_mem_rng_chk_hi = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_lo.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_lo.hpp index ebe9884b863..e61714cabb2 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_lo.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_lo.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_mem_rng_chk_lo_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.mem_sel_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_mem_rng_chk_lo_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_mem_rng_chk_lo, in.lookup_mem_rng_chk_lo_counts, in.mem_sel_rng_chk, @@ -141,16 +56,8 @@ class lookup_mem_rng_chk_lo_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_mem_rng_chk_lo, in.lookup_mem_rng_chk_lo_counts, in.mem_sel_rng_chk, @@ -164,4 +71,4 @@ template using lookup_mem_rng_chk_lo_relation = GenericLookupRelation; template using lookup_mem_rng_chk_lo = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_mid.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_mid.hpp index 45b8a5f03ff..6e0ce0b9803 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_mid.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_mem_rng_chk_mid.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_mem_rng_chk_mid_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.mem_sel_rng_chk == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_mem_rng_chk_mid_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_mem_rng_chk_mid, in.lookup_mem_rng_chk_mid_counts, in.mem_sel_rng_chk, @@ -141,16 +56,8 @@ class lookup_mem_rng_chk_mid_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_mem_rng_chk_mid, in.lookup_mem_rng_chk_mid_counts, in.mem_sel_rng_chk, @@ -164,4 +71,4 @@ template using lookup_mem_rng_chk_mid_relation = GenericLookupRelation; template using lookup_mem_rng_chk_mid = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_opcode_gas.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_opcode_gas.hpp index 1a164fc171a..64d11a5bdc3 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_opcode_gas.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_opcode_gas.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_opcode_gas_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 3; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_gas_accounting_active == 1 || in.gas_sel_gas_cost == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_opcode_gas_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_opcode_gas, in.lookup_opcode_gas_counts, in.main_sel_gas_accounting_active, @@ -145,16 +60,8 @@ class lookup_opcode_gas_lookup_settings { in.gas_da_gas_fixed_table); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_opcode_gas, in.lookup_opcode_gas_counts, in.main_sel_gas_accounting_active, @@ -172,4 +79,4 @@ template using lookup_opcode_gas_relation = GenericLookupRelation; template using lookup_opcode_gas = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_pow_2_0.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_pow_2_0.hpp index 7ec3d3283b1..1f1c342cd81 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_pow_2_0.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_pow_2_0.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_pow_2_0_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 2; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_shift_which == 1 || in.main_sel_rng_8 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_pow_2_0_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_pow_2_0, in.lookup_pow_2_0_counts, in.alu_sel_shift_which, @@ -143,16 +58,8 @@ class lookup_pow_2_0_lookup_settings { in.powers_power_of_2); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_pow_2_0, in.lookup_pow_2_0_counts, in.alu_sel_shift_which, @@ -167,4 +74,4 @@ class lookup_pow_2_0_lookup_settings { template using lookup_pow_2_0_relation = GenericLookupRelation; template using lookup_pow_2_0 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_pow_2_1.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_pow_2_1.hpp index 4101469c97f..b8949612dd7 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_pow_2_1.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_pow_2_1.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_pow_2_1_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 2; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_shift_which == 1 || in.main_sel_rng_8 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_pow_2_1_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_pow_2_1, in.lookup_pow_2_1_counts, in.alu_sel_shift_which, @@ -143,16 +58,8 @@ class lookup_pow_2_1_lookup_settings { in.powers_power_of_2); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_pow_2_1, in.lookup_pow_2_1_counts, in.alu_sel_shift_which, @@ -167,4 +74,4 @@ class lookup_pow_2_1_lookup_settings { template using lookup_pow_2_1_relation = GenericLookupRelation; template using lookup_pow_2_1 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_0.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_0.hpp index 9fd20ef02fe..c8486d70f07 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_0.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_0.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_0_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_0_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_0, in.lookup_u16_0_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_0_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_0, in.lookup_u16_0_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_0_lookup_settings { template using lookup_u16_0_relation = GenericLookupRelation; template using lookup_u16_0 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_1.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_1.hpp index 5ba1b374b8d..a7195014b59 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_1.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_1.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_1_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_1_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_1, in.lookup_u16_1_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_1_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_1, in.lookup_u16_1_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_1_lookup_settings { template using lookup_u16_1_relation = GenericLookupRelation; template using lookup_u16_1 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_10.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_10.hpp index 44de0ae6aa2..5d9340e18ad 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_10.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_10.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_10_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_10_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_10, in.lookup_u16_10_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_10_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_10, in.lookup_u16_10_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_10_lookup_settings { template using lookup_u16_10_relation = GenericLookupRelation; template using lookup_u16_10 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_11.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_11.hpp index d415ae20406..cf7473b5cfa 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_11.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_11.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_11_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_11_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_11, in.lookup_u16_11_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_11_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_11, in.lookup_u16_11_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_11_lookup_settings { template using lookup_u16_11_relation = GenericLookupRelation; template using lookup_u16_11 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_12.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_12.hpp index 2fc33c33fed..e0edca8a9ab 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_12.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_12.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_12_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_12_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_12, in.lookup_u16_12_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_12_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_12, in.lookup_u16_12_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_12_lookup_settings { template using lookup_u16_12_relation = GenericLookupRelation; template using lookup_u16_12 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_13.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_13.hpp index 1c9f92c36a8..8255f13cf85 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_13.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_13.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_13_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_13_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_13, in.lookup_u16_13_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_13_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_13, in.lookup_u16_13_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_13_lookup_settings { template using lookup_u16_13_relation = GenericLookupRelation; template using lookup_u16_13 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_14.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_14.hpp index 3907fb353c0..a4857ab021e 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_14.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_14.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_14_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_14_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_14, in.lookup_u16_14_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_14_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_14, in.lookup_u16_14_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_14_lookup_settings { template using lookup_u16_14_relation = GenericLookupRelation; template using lookup_u16_14 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_2.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_2.hpp index 7301b0fac92..aea3c986c9f 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_2.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_2.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_2_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_2_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_2, in.lookup_u16_2_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_2_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_2, in.lookup_u16_2_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_2_lookup_settings { template using lookup_u16_2_relation = GenericLookupRelation; template using lookup_u16_2 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_3.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_3.hpp index 86170a20a61..828351e0b5e 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_3.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_3.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_3_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_3_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_3, in.lookup_u16_3_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_3_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_3, in.lookup_u16_3_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_3_lookup_settings { template using lookup_u16_3_relation = GenericLookupRelation; template using lookup_u16_3 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_4.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_4.hpp index 877440f08f0..157c0225baa 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_4.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_4.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_4_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_4_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_4, in.lookup_u16_4_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_4_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_4, in.lookup_u16_4_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_4_lookup_settings { template using lookup_u16_4_relation = GenericLookupRelation; template using lookup_u16_4 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_5.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_5.hpp index 07bac6f53b7..930117b7e8b 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_5.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_5.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_5_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_5_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_5, in.lookup_u16_5_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_5_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_5, in.lookup_u16_5_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_5_lookup_settings { template using lookup_u16_5_relation = GenericLookupRelation; template using lookup_u16_5 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_6.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_6.hpp index a3db62cea1c..ec75af30931 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_6.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_6.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_6_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_6_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_6, in.lookup_u16_6_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_6_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_6, in.lookup_u16_6_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_6_lookup_settings { template using lookup_u16_6_relation = GenericLookupRelation; template using lookup_u16_6 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_7.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_7.hpp index 5630605508c..6aec3db35c2 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_7.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_7.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_7_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_7_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_7, in.lookup_u16_7_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_7_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_7, in.lookup_u16_7_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_7_lookup_settings { template using lookup_u16_7_relation = GenericLookupRelation; template using lookup_u16_7 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_8.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_8.hpp index f5191fcd342..46e991f15ee 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_8.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_8.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_8_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_8_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_8, in.lookup_u16_8_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_8_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_8, in.lookup_u16_8_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_8_lookup_settings { template using lookup_u16_8_relation = GenericLookupRelation; template using lookup_u16_8 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_9.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_9.hpp index d1337b15fd8..36a1ca2745b 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_9.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u16_9.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u16_9_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u16_9_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_9, in.lookup_u16_9_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u16_9_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u16_9, in.lookup_u16_9_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u16_9_lookup_settings { template using lookup_u16_9_relation = GenericLookupRelation; template using lookup_u16_9 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u8_0.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u8_0.hpp index c3548716078..3f1626db1bd 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u8_0.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u8_0.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u8_0_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_8 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u8_0_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u8_0, in.lookup_u8_0_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u8_0_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u8_0, in.lookup_u8_0_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u8_0_lookup_settings { template using lookup_u8_0_relation = GenericLookupRelation; template using lookup_u8_0 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u8_1.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u8_1.hpp index 41cf78b9945..a7ce90bc8bf 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u8_1.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/lookup_u8_1.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class lookup_u8_1_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.alu_sel_rng_chk_lookup == 1 || in.main_sel_rng_8 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class lookup_u8_1_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.lookup_u8_1, in.lookup_u8_1_counts, in.alu_sel_rng_chk_lookup, @@ -141,16 +56,8 @@ class lookup_u8_1_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.lookup_u8_1, in.lookup_u8_1_counts, in.alu_sel_rng_chk_lookup, @@ -163,4 +70,4 @@ class lookup_u8_1_lookup_settings { template using lookup_u8_1_relation = GenericLookupRelation; template using lookup_u8_1 = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_alu.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_alu.hpp index 1b1a70a81c5..3fd9226043b 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_alu.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_alu.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_alu_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 16; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_alu == 1 || in.alu_sel_alu == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_alu, in.main_sel_alu, in.main_sel_alu, @@ -84,26 +57,8 @@ class perm_main_alu_permutation_settings { in.alu_in_tag); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_alu, in.main_sel_alu, in.main_sel_alu, @@ -147,4 +102,4 @@ template using perm_main_alu_relation = GenericPermutationRelation; template using perm_main_alu = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_bin.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_bin.hpp index ebcd77a04ab..ed038c33a50 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_bin.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_bin.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_bin_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 6; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_bin == 1 || in.binary_start == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_bin, in.main_sel_bin, in.main_sel_bin, @@ -64,26 +37,8 @@ class perm_main_bin_permutation_settings { in.binary_in_tag); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_bin, in.main_sel_bin, in.main_sel_bin, @@ -107,4 +62,4 @@ template using perm_main_bin_relation = GenericPermutationRelation; template using perm_main_bin = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_conv.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_conv.hpp index 3890911bd5b..061fb8c398a 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_conv.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_conv.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_conv_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 4; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_op_radix_le == 1 || in.conversion_sel_to_radix_le == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_conv, in.main_sel_op_radix_le, in.main_sel_op_radix_le, @@ -60,26 +33,8 @@ class perm_main_conv_permutation_settings { in.conversion_num_limbs); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_conv, in.main_sel_op_radix_le, in.main_sel_op_radix_le, @@ -99,4 +54,4 @@ template using perm_main_conv_relation = GenericPermutationRelation; template using perm_main_conv = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_a.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_a.hpp index 867dd008f0a..fe1c96709ff 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_a.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_a.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_mem_a_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 9; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_mem_op_a == 1 || in.mem_sel_op_a == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_a, in.main_sel_mem_op_a, in.main_sel_mem_op_a, @@ -70,26 +43,8 @@ class perm_main_mem_a_permutation_settings { in.mem_sel_op_cmov); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_a, in.main_sel_mem_op_a, in.main_sel_mem_op_a, @@ -119,4 +74,4 @@ template using perm_main_mem_a_relation = GenericPermutationRelation; template using perm_main_mem_a = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_b.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_b.hpp index c724cbebb28..8899945f4fe 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_b.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_b.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_mem_b_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 9; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_mem_op_b == 1 || in.mem_sel_op_b == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_b, in.main_sel_mem_op_b, in.main_sel_mem_op_b, @@ -70,26 +43,8 @@ class perm_main_mem_b_permutation_settings { in.mem_sel_op_cmov); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_b, in.main_sel_mem_op_b, in.main_sel_mem_op_b, @@ -119,4 +74,4 @@ template using perm_main_mem_b_relation = GenericPermutationRelation; template using perm_main_mem_b = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_c.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_c.hpp index 532d2fbdd9e..69b3ca8ea89 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_c.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_c.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_mem_c_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 7; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_mem_op_c == 1 || in.mem_sel_op_c == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_c, in.main_sel_mem_op_c, in.main_sel_mem_op_c, @@ -66,26 +39,8 @@ class perm_main_mem_c_permutation_settings { in.mem_w_in_tag); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_c, in.main_sel_mem_op_c, in.main_sel_mem_op_c, @@ -111,4 +66,4 @@ template using perm_main_mem_c_relation = GenericPermutationRelation; template using perm_main_mem_c = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_d.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_d.hpp index 3112f97cd87..081ae644bfb 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_d.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_d.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_mem_d_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 8; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_mem_op_d == 1 || in.mem_sel_op_d == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_d, in.main_sel_mem_op_d, in.main_sel_mem_op_d, @@ -68,26 +41,8 @@ class perm_main_mem_d_permutation_settings { in.mem_sel_op_cmov); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_d, in.main_sel_mem_op_d, in.main_sel_mem_op_d, @@ -115,4 +70,4 @@ template using perm_main_mem_d_relation = GenericPermutationRelation; template using perm_main_mem_d = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_a.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_a.hpp index 3d0de9cf392..5f8b6ae9705 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_a.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_a.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_mem_ind_addr_a_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 4; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_resolve_ind_addr_a == 1 || in.mem_sel_resolve_ind_addr_a == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_ind_addr_a, in.main_sel_resolve_ind_addr_a, in.main_sel_resolve_ind_addr_a, @@ -60,26 +33,8 @@ class perm_main_mem_ind_addr_a_permutation_settings { in.mem_val); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_ind_addr_a, in.main_sel_resolve_ind_addr_a, in.main_sel_resolve_ind_addr_a, @@ -101,4 +56,4 @@ using perm_main_mem_ind_addr_a_relation = template using perm_main_mem_ind_addr_a = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_b.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_b.hpp index eec199f39f7..c79bc802aa5 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_b.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_b.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_mem_ind_addr_b_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 4; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_resolve_ind_addr_b == 1 || in.mem_sel_resolve_ind_addr_b == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_ind_addr_b, in.main_sel_resolve_ind_addr_b, in.main_sel_resolve_ind_addr_b, @@ -60,26 +33,8 @@ class perm_main_mem_ind_addr_b_permutation_settings { in.mem_val); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_ind_addr_b, in.main_sel_resolve_ind_addr_b, in.main_sel_resolve_ind_addr_b, @@ -101,4 +56,4 @@ using perm_main_mem_ind_addr_b_relation = template using perm_main_mem_ind_addr_b = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_c.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_c.hpp index 7367fc905f8..3be1b96d43a 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_c.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_c.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_mem_ind_addr_c_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 4; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_resolve_ind_addr_c == 1 || in.mem_sel_resolve_ind_addr_c == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_ind_addr_c, in.main_sel_resolve_ind_addr_c, in.main_sel_resolve_ind_addr_c, @@ -60,26 +33,8 @@ class perm_main_mem_ind_addr_c_permutation_settings { in.mem_val); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_ind_addr_c, in.main_sel_resolve_ind_addr_c, in.main_sel_resolve_ind_addr_c, @@ -101,4 +56,4 @@ using perm_main_mem_ind_addr_c_relation = template using perm_main_mem_ind_addr_c = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_d.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_d.hpp index 6515b55c4bd..310c85078ec 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_d.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_mem_ind_addr_d.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_mem_ind_addr_d_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 4; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_resolve_ind_addr_d == 1 || in.mem_sel_resolve_ind_addr_d == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_ind_addr_d, in.main_sel_resolve_ind_addr_d, in.main_sel_resolve_ind_addr_d, @@ -60,26 +33,8 @@ class perm_main_mem_ind_addr_d_permutation_settings { in.mem_val); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_mem_ind_addr_d, in.main_sel_resolve_ind_addr_d, in.main_sel_resolve_ind_addr_d, @@ -101,4 +56,4 @@ using perm_main_mem_ind_addr_d_relation = template using perm_main_mem_ind_addr_d = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_pedersen.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_pedersen.hpp index f59fdd920fa..0b94b48c597 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_pedersen.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_pedersen.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_pedersen_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 2; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_op_pedersen == 1 || in.pedersen_sel_pedersen == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_pedersen, in.main_sel_op_pedersen, in.main_sel_op_pedersen, @@ -56,26 +29,8 @@ class perm_main_pedersen_permutation_settings { in.pedersen_input); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_pedersen, in.main_sel_op_pedersen, in.main_sel_op_pedersen, @@ -91,4 +46,4 @@ template using perm_main_pedersen_relation = GenericPermutationRelation; template using perm_main_pedersen = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_pos2_perm.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_pos2_perm.hpp index dab9abe744f..2a4f91d6811 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_pos2_perm.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/perm_main_pos2_perm.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" @@ -14,38 +12,13 @@ class perm_main_pos2_perm_permutation_settings { // This constant defines how many columns are bundled together to form each set. constexpr static size_t COLUMNS_PER_SET = 3; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_op_poseidon2 == 1 || in.poseidon2_sel_poseidon_perm == 1); } - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.perm_main_pos2_perm, in.main_sel_op_poseidon2, in.main_sel_op_poseidon2, @@ -58,26 +31,8 @@ class perm_main_pos2_perm_permutation_settings { in.poseidon2_output); } - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.perm_main_pos2_perm, in.main_sel_op_poseidon2, in.main_sel_op_poseidon2, @@ -95,4 +50,4 @@ template using perm_main_pos2_perm_relation = GenericPermutationRelation; template using perm_main_pos2_perm = GenericPermutation; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_da_gas_hi.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_da_gas_hi.hpp index b3c732c4e59..c0ec53d582e 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_da_gas_hi.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_da_gas_hi.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class range_check_da_gas_hi_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_gas_accounting_active == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class range_check_da_gas_hi_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.range_check_da_gas_hi, in.range_check_da_gas_hi_counts, in.main_sel_gas_accounting_active, @@ -141,16 +56,8 @@ class range_check_da_gas_hi_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.range_check_da_gas_hi, in.range_check_da_gas_hi_counts, in.main_sel_gas_accounting_active, @@ -164,4 +71,4 @@ template using range_check_da_gas_hi_relation = GenericLookupRelation; template using range_check_da_gas_hi = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_da_gas_lo.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_da_gas_lo.hpp index 0167a2e4ee3..2847c57513a 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_da_gas_lo.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_da_gas_lo.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class range_check_da_gas_lo_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_gas_accounting_active == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class range_check_da_gas_lo_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.range_check_da_gas_lo, in.range_check_da_gas_lo_counts, in.main_sel_gas_accounting_active, @@ -141,16 +56,8 @@ class range_check_da_gas_lo_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.range_check_da_gas_lo, in.range_check_da_gas_lo_counts, in.main_sel_gas_accounting_active, @@ -164,4 +71,4 @@ template using range_check_da_gas_lo_relation = GenericLookupRelation; template using range_check_da_gas_lo = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_l2_gas_hi.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_l2_gas_hi.hpp index 81a3f1e0b97..5e0bda1a605 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_l2_gas_hi.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_l2_gas_hi.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class range_check_l2_gas_hi_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_gas_accounting_active == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class range_check_l2_gas_hi_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.range_check_l2_gas_hi, in.range_check_l2_gas_hi_counts, in.main_sel_gas_accounting_active, @@ -141,16 +56,8 @@ class range_check_l2_gas_hi_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.range_check_l2_gas_hi, in.range_check_l2_gas_hi_counts, in.main_sel_gas_accounting_active, @@ -164,4 +71,4 @@ template using range_check_l2_gas_hi_relation = GenericLookupRelation; template using range_check_l2_gas_hi = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_l2_gas_lo.hpp b/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_l2_gas_lo.hpp index ca2165657a2..f32e8958047 100644 --- a/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_l2_gas_lo.hpp +++ b/barretenberg/cpp/src/barretenberg/relations/generated/avm/range_check_l2_gas_lo.hpp @@ -1,5 +1,3 @@ - - #pragma once #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" @@ -25,81 +23,20 @@ namespace bb { */ class range_check_l2_gas_lo_lookup_settings { public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ static constexpr size_t READ_TERMS = 1; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ static constexpr size_t WRITE_TERMS = 1; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ static constexpr size_t READ_TERM_TYPES[READ_TERMS] = { 0 }; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = { 0 }; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ static constexpr size_t LOOKUP_TUPLE_SIZE = 1; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = 4; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ static constexpr size_t READ_TERM_DEGREE = 0; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - static constexpr size_t WRITE_TERM_DEGREE = 0; - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) { return (in.main_sel_gas_accounting_active == 1 || in.main_sel_rng_16 == 1); } - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - template static inline auto compute_inverse_exists(const AllEntities& in) { @@ -109,30 +46,8 @@ class range_check_l2_gas_lo_lookup_settings { return (is_operation + is_table_entry - is_operation * is_table_entry); } - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - template static inline auto get_const_entities(const AllEntities& in) { - return std::forward_as_tuple(in.range_check_l2_gas_lo, in.range_check_l2_gas_lo_counts, in.main_sel_gas_accounting_active, @@ -141,16 +56,8 @@ class range_check_l2_gas_lo_lookup_settings { in.main_clk); } - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - template static inline auto get_nonconst_entities(AllEntities& in) { - return std::forward_as_tuple(in.range_check_l2_gas_lo, in.range_check_l2_gas_lo_counts, in.main_sel_gas_accounting_active, @@ -164,4 +71,4 @@ template using range_check_l2_gas_lo_relation = GenericLookupRelation; template using range_check_l2_gas_lo = GenericLookup; -} // namespace bb +} // namespace bb \ No newline at end of file diff --git a/bb-pilcom/bb-pil-backend/src/lookup_builder.rs b/bb-pilcom/bb-pil-backend/src/lookup_builder.rs index 50016404a3f..bb49ec66260 100644 --- a/bb-pilcom/bb-pil-backend/src/lookup_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/lookup_builder.rs @@ -1,14 +1,14 @@ -use crate::{ - file_writer::BBFiles, - utils::{create_get_const_entities, create_get_nonconst_entities, snake_case}, -}; +use crate::{file_writer::BBFiles, utils::snake_case}; use itertools::Itertools; use powdr_ast::{ - analyzed::{AlgebraicExpression, Analyzed, Identity, IdentityKind}, + analyzed::{AlgebraicExpression, Analyzed, IdentityKind}, parsed::SelectedExpressions, }; use powdr_number::FieldElement; +use handlebars::Handlebars; +use serde_json::{json, Value as Json}; + use crate::utils::sanitize_name; #[derive(Debug)] @@ -55,13 +55,10 @@ impl LookupBuilder for BBFiles { project_name: &str, analyzed: &Analyzed, ) -> Vec { - let lookups: Vec<&Identity>> = analyzed + let lookups = analyzed .identities .iter() .filter(|identity| matches!(identity.kind, IdentityKind::Plookup)) - .collect(); - let new_lookups = lookups - .iter() .map(|lookup| Lookup { attribute: lookup.attribute.clone().map(|att| att.to_lowercase()), counts_poly: format!( @@ -73,8 +70,29 @@ impl LookupBuilder for BBFiles { }) .collect_vec(); - create_lookups(self, project_name, &new_lookups); - new_lookups + let mut handlebars = Handlebars::new(); + + handlebars + .register_template_string( + "lookup.hpp", + std::str::from_utf8(include_bytes!("../templates/lookup.hpp.hbs")).unwrap(), + ) + .unwrap(); + + for lookup in lookups.iter() { + let data = create_lookup_settings_data(lookup); + let lookup_settings = handlebars.render("lookup.hpp", &data).unwrap(); + + let folder = format!("{}/{}", self.rel, &snake_case(project_name)); + let file_name = format!( + "{}{}", + lookup.attribute.clone().unwrap_or("NONAME".to_owned()), + ".hpp".to_owned() + ); + self.write_file(&folder, &file_name, &lookup_settings); + } + + lookups } } @@ -93,50 +111,7 @@ pub fn get_counts_from_lookups(lookups: &[Lookup]) -> Vec { .collect() } -/// Write the lookup settings files to disk -fn create_lookups(bb_files: &BBFiles, project_name: &str, lookups: &Vec) { - for lookup in lookups { - let lookup_settings = create_lookup_settings_file(lookup); - - let folder = format!("{}/{}", bb_files.rel, &snake_case(project_name)); - let file_name = format!( - "{}{}", - lookup.attribute.clone().unwrap_or("NONAME".to_owned()), - ".hpp".to_owned() - ); - bb_files.write_file(&folder, &file_name, &lookup_settings); - } -} - -/// All relation types eventually get wrapped in the relation type -/// This function creates the export for the relation type so that it can be added to the flavor -fn create_relation_exporter(lookup_name: &str) -> String { - let settings_name = format!("{}_lookup_settings", lookup_name); - let lookup_export = format!("template using {lookup_name}_relation = GenericLookupRelation<{settings_name}, FF_>;"); - let relation_export = format!( - "template using {lookup_name} = GenericLookup<{settings_name}, FF_>;" - ); - - format!( - " - {lookup_export} - {relation_export} - " - ) -} - -fn lookup_settings_includes() -> &'static str { - r#" - #pragma once - - #include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" - - #include - #include - "# -} - -fn create_lookup_settings_file(lookup: &Lookup) -> String { +fn create_lookup_settings_data(lookup: &Lookup) -> Json { let columns_per_set = lookup.left.cols.len(); let lookup_name = lookup .attribute @@ -146,7 +121,6 @@ fn create_lookup_settings_file(lookup: &Lookup) -> String { // NOTE: https://github.com/AztecProtocol/aztec-packages/issues/3879 // Settings are not flexible enough to combine inverses - let lhs_selector = lookup .left .selector @@ -191,167 +165,23 @@ fn create_lookup_settings_file(lookup: &Lookup) -> String { let inverse_degree = 4; let read_term_degree = 0; let write_term_degree = 0; - let read_term_types = "{0}"; - let write_term_types = "{0}"; - - let lookup_settings_includes = lookup_settings_includes(); - let inverse_polynomial_is_computed_at_row = - create_inverse_computed_at(&lhs_selector, &rhs_selector); - let compute_inverse_exists = create_compute_inverse_exist(&lhs_selector, &rhs_selector); - let const_entities = create_get_const_entities(&lookup_entities); - let nonconst_entities = create_get_nonconst_entities(&lookup_entities); - let relation_exporter = create_relation_exporter(&lookup_name); - - format!( - " - {lookup_settings_includes} - - namespace bb {{ - - /** - * @brief This class contains an example of how to set LookupSettings classes used by the - * GenericLookupRelationImpl class to specify a scaled lookup - * - * @details To create your own lookup: - * 1) Create a copy of this class and rename it - * 2) Update all the values with the ones needed for your lookup - * 3) Update \"DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS\" and \"DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS\" to - * include the new settings - * 4) Add the relation with the chosen settings to Relations in the flavor (for example,\"` - * using Relations = std::tuple>;)` - * - */ - class {lookup_name}_lookup_settings {{ - public: - /** - * @brief The number of read terms (how many lookups we perform) in each row - * - */ - static constexpr size_t READ_TERMS = {read_terms}; - /** - * @brief The number of write terms (how many additions to the lookup table we make) in each row - * - */ - static constexpr size_t WRITE_TERMS = {write_terms}; - - /** - * @brief The type of READ_TERM used for each read index (basic and scaled) - * - */ - static constexpr size_t READ_TERM_TYPES[READ_TERMS] = {read_term_types}; - - /** - * @brief They type of WRITE_TERM used for each write index - * - */ - static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = {write_term_types}; - - /** - * @brief How many values represent a single lookup object. This value is used by the automatic read term - * implementation in the relation in case the lookup is a basic or scaled tuple and in the write term if it's a - * basic tuple - * - */ - static constexpr size_t LOOKUP_TUPLE_SIZE = {lookup_tuple_size}; - - /** - * @brief The polynomial degree of the relation telling us if the inverse polynomial value needs to be computed - * - */ - static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = {inverse_degree}; - - /** - * @brief The degree of the read term if implemented arbitrarily. This value is not used by basic and scaled read - * terms, but will cause compilation error if not defined - * - */ - static constexpr size_t READ_TERM_DEGREE = {read_term_degree}; - - /** - * @brief The degree of the write term if implemented arbitrarily. This value is not used by the basic write - * term, but will cause compilation error if not defined - * - */ - - static constexpr size_t WRITE_TERM_DEGREE = {write_term_degree}; - - /** - * @brief If this method returns true on a row of values, then the inverse polynomial exists at this index. - * Otherwise the value needs to be set to zero. - * - * @details If this is true then the lookup takes place in this row - * - */ - {inverse_polynomial_is_computed_at_row} - - /** - * @brief Subprocedure for computing the value deciding if the inverse polynomial value needs to be checked in this - * row - * - * @tparam Accumulator Type specified by the lookup relation - * @tparam AllEntities Values/Univariates of all entities row - * @param in Value/Univariate of all entities at row/edge - * @return Accumulator - */ - {compute_inverse_exists} - - /** - * @brief Get all the entities for the lookup when need to update them - * - * @details The generic structure of this tuple is described in ./generic_lookup_relation.hpp . The following is - description for the current case: - The entities are returned as a tuple of references in the following order (this is for ): - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that specifies how many times the lookup table entry at this row has been looked up - * - READ_TERMS entities/polynomials that enable individual lookup operations - * - The entity/polynomial that enables adding an entry to the lookup table in this row - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the basic tuple being looked up as the first read term - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the previous accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the shifts in the second read term (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing the current accumulators in the second read term - (scaled tuple) - * - LOOKUP_TUPLE_SIZE entities/polynomials representing basic tuples added to the table - * - * @return All the entities needed for the lookup - */ - {const_entities} - - /** - * @brief Get all the entities for the lookup when we only need to read them - * @details Same as in get_const_entities, but nonconst - * - * @return All the entities needed for the lookup - */ - {nonconst_entities} - }}; - - {relation_exporter} - }} - " - ) -} - -fn create_inverse_computed_at(lhs_selector: &String, rhs_selector: &String) -> String { - let lhs_computed_selector = format!("in.{lhs_selector}"); - let rhs_computed_selector = format!("in.{rhs_selector}"); - format!(" - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) {{ - return ({lhs_computed_selector } == 1 || {rhs_computed_selector} == 1); - }}") -} - -fn create_compute_inverse_exist(lhs_selector: &String, rhs_selector: &String) -> String { - let lhs_computed_selector = format!("in.{lhs_selector}"); - let rhs_computed_selector = format!("in.{rhs_selector}"); - format!(" - template static inline auto compute_inverse_exists(const AllEntities& in) {{ - using View = typename Accumulator::View; - const auto is_operation = View({lhs_computed_selector}); - const auto is_table_entry = View({rhs_computed_selector}); - return (is_operation + is_table_entry - is_operation * is_table_entry); - }}") + let read_term_types = "{0}".to_owned(); + let write_term_types = "{0}".to_owned(); + + json!({ + "lookup_name": lookup_name, + "lhs_selector": lhs_selector, + "rhs_selector": rhs_selector, + "read_terms": read_terms, + "write_terms": write_terms, + "lookup_tuple_size": lookup_tuple_size, + "inverse_degree": inverse_degree, + "read_term_degree": read_term_degree, + "write_term_degree": write_term_degree, + "read_term_types": read_term_types, + "write_term_types": write_term_types, + "lookup_entities": lookup_entities, + }) } fn get_lookup_side( diff --git a/bb-pilcom/bb-pil-backend/src/permutation_builder.rs b/bb-pilcom/bb-pil-backend/src/permutation_builder.rs index b9dbeb0130e..04c6da8a82e 100644 --- a/bb-pilcom/bb-pil-backend/src/permutation_builder.rs +++ b/bb-pilcom/bb-pil-backend/src/permutation_builder.rs @@ -1,14 +1,14 @@ -use crate::{ - file_writer::BBFiles, - utils::{create_get_const_entities, create_get_nonconst_entities, snake_case}, -}; +use crate::{file_writer::BBFiles, utils::snake_case}; use itertools::Itertools; use powdr_ast::{ - analyzed::{AlgebraicExpression, Analyzed, Identity, IdentityKind}, + analyzed::{AlgebraicExpression, Analyzed, IdentityKind}, parsed::SelectedExpressions, }; use powdr_number::FieldElement; +use handlebars::Handlebars; +use serde_json::{json, Value as Json}; + use crate::utils::sanitize_name; #[derive(Debug)] @@ -51,13 +51,10 @@ impl PermutationBuilder for BBFiles { project_name: &str, analyzed: &Analyzed, ) -> Vec { - let perms: Vec<&Identity>> = analyzed + let permutations = analyzed .identities .iter() .filter(|identity| matches!(identity.kind, IdentityKind::Permutation)) - .collect(); - let new_perms = perms - .iter() .map(|perm| Permutation { attribute: perm.attribute.clone().map(|att| att.to_lowercase()), left: get_perm_side(&perm.left), @@ -65,8 +62,29 @@ impl PermutationBuilder for BBFiles { }) .collect_vec(); - create_permutations(self, project_name, &new_perms); - new_perms + let mut handlebars = Handlebars::new(); + + handlebars + .register_template_string( + "permutation.hpp", + std::str::from_utf8(include_bytes!("../templates/permutation.hpp.hbs")).unwrap(), + ) + .unwrap(); + + for permutation in permutations.iter() { + let data = create_permutation_settings_data(permutation); + let perm_settings = handlebars.render("permutation.hpp", &data).unwrap(); + + let folder = format!("{}/{}", self.rel, &snake_case(project_name)); + let file_name = format!( + "{}{}", + permutation.attribute.clone().unwrap_or("NONAME".to_owned()), + ".hpp".to_owned() + ); + self.write_file(&folder, &file_name, &perm_settings); + } + + permutations } } @@ -78,49 +96,7 @@ pub fn get_inverses_from_permutations(permutations: &[Permutation]) -> Vec) { - for permutation in permutations { - let perm_settings = create_permutation_settings_file(permutation); - - let folder = format!("{}/{}", bb_files.rel, &snake_case(project_name)); - let file_name = format!( - "{}{}", - permutation.attribute.clone().unwrap_or("NONAME".to_owned()), - ".hpp".to_owned() - ); - bb_files.write_file(&folder, &file_name, &perm_settings); - } -} - -/// All relation types eventually get wrapped in the relation type -/// This function creates the export for the relation type so that it can be added to the flavor -fn create_relation_exporter(permutation_name: &str) -> String { - let settings_name = format!("{}_permutation_settings", permutation_name); - let permutation_export = format!("template using {permutation_name}_relation = GenericPermutationRelation<{settings_name}, FF_>;"); - let relation_export = format!("template using {permutation_name} = GenericPermutation<{settings_name}, FF_>;"); - - format!( - " - {permutation_export} - {relation_export} - " - ) -} - -fn permutation_settings_includes() -> &'static str { - r#" - #pragma once - - #include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" - - #include - #include - "# -} - -fn create_permutation_settings_file(permutation: &Permutation) -> String { - log::trace!("Permutation: {:?}", permutation); +fn create_permutation_settings_data(permutation: &Permutation) -> Json { let columns_per_set = permutation.left.cols.len(); // TODO(md): In the future we will need to condense off the back of this - combining those with the same inverse column let permutation_name = permutation @@ -161,82 +137,13 @@ fn create_permutation_settings_file(permutation: &Permutation) -> String { perm_entities.extend(lhs_cols); perm_entities.extend(rhs_cols); - let permutation_settings_includes = permutation_settings_includes(); - - let inverse_computed_at = create_inverse_computed_at(&lhs_selector, &rhs_selector); - let const_entities = create_get_const_entities(&perm_entities); - let nonconst_entities = create_get_nonconst_entities(&perm_entities); - let relation_exporter = create_relation_exporter(&permutation_name); - - format!( - " - {permutation_settings_includes} - - namespace bb {{ - - class {permutation_name}_permutation_settings {{ - public: - // This constant defines how many columns are bundled together to form each set. - constexpr static size_t COLUMNS_PER_SET = {columns_per_set}; - - /** - * @brief If this method returns true on a row of values, then the inverse polynomial at this index. Otherwise the - * value needs to be set to zero. - * - * @details If this is true then permutation takes place in this row - */ - {inverse_computed_at} - - /** - * @brief Get all the entities for the permutation when we don't need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - {const_entities} - - /** - * @brief Get all the entities for the permutation when need to update them - * - * @details The entities are returned as a tuple of references in the following order: - * - The entity/polynomial used to store the product of the inverse values - * - The entity/polynomial that switches on the subrelation of the permutation relation that ensures correctness of - * the inverse polynomial - * - The entity/polynomial that enables adding a tuple-generated value from the first set to the logderivative sum - * subrelation - * - The entity/polynomial that enables adding a tuple-generated value from the second set to the logderivative sum - * subrelation - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the first set (N.B. ORDER IS IMPORTANT!) - * - A sequence of COLUMNS_PER_SET entities/polynomials that represent the second set (N.B. ORDER IS IMPORTANT!) - * - * @return All the entities needed for the permutation - */ - {nonconst_entities} - }}; - - {relation_exporter} - }} - " - ) -} - -fn create_inverse_computed_at(lhs_selector: &String, rhs_selector: &String) -> String { - let lhs_computed_selector = format!("in.{lhs_selector}"); - let rhs_computed_selector = format!("in.{rhs_selector}"); - format!(" - template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) {{ - return ({lhs_computed_selector } == 1 || {rhs_computed_selector} == 1); - }}") + json!({ + "perm_name": permutation_name, + "columns_per_set": columns_per_set, + "lhs_selector": lhs_selector, + "rhs_selector": rhs_selector, + "perm_entities": perm_entities, + }) } fn get_perm_side( diff --git a/bb-pilcom/bb-pil-backend/src/utils.rs b/bb-pilcom/bb-pil-backend/src/utils.rs index 9a4ce358953..a4d221d0efa 100644 --- a/bb-pilcom/bb-pil-backend/src/utils.rs +++ b/bb-pilcom/bb-pil-backend/src/utils.rs @@ -1,5 +1,3 @@ -use itertools::Itertools; - /// Sanitize Names /// /// Column titles that we get from pil contain . to distinguish which pil namespace they belong to @@ -38,44 +36,6 @@ pub fn flatten(list: &[Vec]) -> Vec { arr.into_iter().flatten().collect() } -/// Create Forward As Tuple -/// -/// Helper function to create a forward as tuple cpp statement -pub fn create_forward_as_tuple(settings: &[String]) -> String { - let adjusted = settings.iter().map(|col| format!("in.{col}")).join(",\n"); - format!( - " - return std::forward_as_tuple( - {} - ); - ", - adjusted - ) -} - -// TODO: may make sense to move the below around a bit -pub fn create_get_const_entities(settings: &[String]) -> String { - let forward = create_forward_as_tuple(settings); - format!( - " - template static inline auto get_const_entities(const AllEntities& in) {{ - {forward} - }} - " - ) -} - -pub fn create_get_nonconst_entities(settings: &[String]) -> String { - let forward = create_forward_as_tuple(settings); - format!( - " - template static inline auto get_nonconst_entities(AllEntities& in) {{ - {forward} - }} - " - ) -} - /// Snake Case /// /// Transform camel case string into snake case, such as: RedFlower --> red_flower diff --git a/bb-pilcom/bb-pil-backend/templates/lookup.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/lookup.hpp.hbs new file mode 100644 index 00000000000..0ad04440e50 --- /dev/null +++ b/bb-pilcom/bb-pil-backend/templates/lookup.hpp.hbs @@ -0,0 +1,71 @@ +#pragma once + +#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp" + +#include +#include + +namespace bb { + +/** + * @brief This class contains an example of how to set LookupSettings classes used by the + * GenericLookupRelationImpl class to specify a scaled lookup + * + * @details To create your own lookup: + * 1) Create a copy of this class and rename it + * 2) Update all the values with the ones needed for your lookup + * 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to + * include the new settings + * 4) Add the relation with the chosen settings to Relations in the flavor (for example,"` + * using Relations = std::tuple>;)` + * + */ + class {{lookup_name}}_lookup_settings { + public: + static constexpr size_t READ_TERMS = {{read_terms}}; + static constexpr size_t WRITE_TERMS = {{write_terms}}; + static constexpr size_t READ_TERM_TYPES[READ_TERMS] = {{read_term_types}}; + static constexpr size_t WRITE_TERM_TYPES[WRITE_TERMS] = {{write_term_types}}; + static constexpr size_t LOOKUP_TUPLE_SIZE = {{lookup_tuple_size}}; + static constexpr size_t INVERSE_EXISTS_POLYNOMIAL_DEGREE = {{inverse_degree}}; + static constexpr size_t READ_TERM_DEGREE = {{read_term_degree}}; + static constexpr size_t WRITE_TERM_DEGREE = {{write_term_degree}}; + + template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) + { + return (in.{{lhs_selector}} == 1 || in.{{rhs_selector}} == 1); + } + + template + static inline auto compute_inverse_exists(const AllEntities& in) + { + using View = typename Accumulator::View; + const auto is_operation = View(in.{{lhs_selector}}); + const auto is_table_entry = View(in.{{rhs_selector}}); + return (is_operation + is_table_entry - is_operation * is_table_entry); + } + + template static inline auto get_const_entities(const AllEntities& in) + { + return std::forward_as_tuple( + {{#each lookup_entities as |ent|}} + in.{{ent}}{{#unless @last}},{{/unless}} + {{/each}} + ); + } + + template static inline auto get_nonconst_entities(AllEntities& in) + { + return std::forward_as_tuple( + {{#each lookup_entities as |ent|}} + in.{{ent}}{{#unless @last}},{{/unless}} + {{/each}} + ); + } +}; + +template using {{lookup_name}}_relation = GenericLookupRelation<{{lookup_name}}_lookup_settings, FF_>; +template using {{lookup_name}} = GenericLookup<{{lookup_name}}_lookup_settings, FF_>; + +} // namespace bb \ No newline at end of file diff --git a/bb-pilcom/bb-pil-backend/templates/permutation.hpp.hbs b/bb-pilcom/bb-pil-backend/templates/permutation.hpp.hbs new file mode 100644 index 00000000000..add6336de4e --- /dev/null +++ b/bb-pilcom/bb-pil-backend/templates/permutation.hpp.hbs @@ -0,0 +1,43 @@ +#pragma once + +#include "barretenberg/relations/generic_permutation/generic_permutation_relation.hpp" + +#include +#include + +namespace bb { + +class {{perm_name}}_permutation_settings { + public: + // This constant defines how many columns are bundled together to form each set. + constexpr static size_t COLUMNS_PER_SET = {{columns_per_set}}; + + template static inline auto inverse_polynomial_is_computed_at_row(const AllEntities& in) + { + return (in.{{lhs_selector}} == 1 || in.{{rhs_selector}} == 1); + } + + template static inline auto get_const_entities(const AllEntities& in) + { + return std::forward_as_tuple( + {{#each perm_entities as |ent|}} + in.{{ent}}{{#unless @last}},{{/unless}} + {{/each}} + ); + } + + template static inline auto get_nonconst_entities(AllEntities& in) + { + return std::forward_as_tuple( + {{#each perm_entities as |ent|}} + in.{{ent}}{{#unless @last}},{{/unless}} + {{/each}} + ); + } +}; + +template +using {{perm_name}}_relation = GenericPermutationRelation<{{perm_name}}_permutation_settings, FF_>; +template using {{perm_name}} = GenericPermutation<{{perm_name}}_permutation_settings, FF_>; + +} // namespace bb \ No newline at end of file