Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Simplify relations code #2100

Closed
codygunton opened this issue Sep 7, 2023 · 1 comment
Closed

Simplify relations code #2100

codygunton opened this issue Sep 7, 2023 · 1 comment

Comments

@codygunton
Copy link
Contributor

Each relation implements a bit of polynomial arithmetic applied to univariate polynomials. As an optimization, we would like that the univariates have the minimum allowable length (the length is the number of evaluations representing the polynomial; this is equals the degree of the polynomial + 1). To accomplish this, each relation defines a container for univariates of different lengths. To avoid code duplication, we have taken a somewhat complicated approach to doing this: each relation is split into

  • an implementation, which records these lengths in a template, and
  • a uniform 'wrapping'/completion step where this template is used to create the corresponding containers.

This solutions works, but it would be beneficial to simplify this structure. Some possibilities:

  • Each RelationImpl puts its lengths in an array which is somehow treated as a parameter pack in order to create the desired containers.
  • We accept duplication and just define the containers in each relation. We can enforce that this is done through a concept.

cc @maramihali

@github-project-automation github-project-automation bot moved this to Todo in A3 Sep 7, 2023
@codygunton
Copy link
Contributor Author

Should have been an issue in Barretenberg repo; see AztecProtocol/barretenberg#720

@codygunton codygunton closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant