-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Simplify relation containers (#2619)
The main goal of this PR is to simplify the construction of the containers that we use to accumulate relation values (in sumcheck and, soon, in Protogalaxy folding). # Core changes - Expose a `View` alias for each of the primitives that needs one (`Univariate`, `field` and `field_t`). - Add nested container classes that can be instantiated from a `std::array` of sizes. Credit: https://stackoverflow.com/a/60440611 - Remove `AccumulatorsAndViews` types, replacing each with simply an accumulator type with a intrinsic notion of view. # Other changes - Bring ECCVM more in line with the rest of the relation and circuit builder code. - Add a `get_row` function to avoid passing index values to some functions. - Use more explicit or more appropriate type names (e.g., `RelationUnivariates` becomes `TupleOfTuplesOfUnivariates`, `ClaimedEvaluations` becomes `AllValues` outside of sumcheck, where it is now used in the execution trace builders). - Replace some `auto`s with useful template parameter names, still deducing the types. - Deduce more types, especially in `accumulate` functions where now it is possible, since we don't have an 'alias container type' grouping a type with a view. - Use a more idiomatic approach to identify non-linearly independent subrelations. - Get rid of special proxy functions to `accumulate` functions. - Compile time calculation of individual relation lengths, possible now that the subrelation lengths live in a `std::array`. - Relations (always fully static) are no longer instantiated anywhere.
- Loading branch information
1 parent
082ab56
commit 99c5127
Showing
51 changed files
with
1,201 additions
and
1,378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
423 changes: 228 additions & 195 deletions
423
barretenberg/cpp/src/barretenberg/honk/flavor/ecc_vm.hpp
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.