Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

feat(acvm): Directive for sorting networks #77

Merged
merged 4 commits into from
Feb 8, 2023
Merged

Conversation

guipublic
Copy link
Contributor

Description

Summary of changes

Adds a directive for generating a sorting network that sort the inputs of the directive according to the provided ordering.

Test additions / changes

Unit test which extensively test the sorting networks

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

@guipublic guipublic changed the title Directive for sorting networks feat(acvm) Directive for sorting networks Feb 6, 2023
@kevaundray kevaundray changed the title feat(acvm) Directive for sorting networks feat(acvm): Directive for sorting networks Feb 6, 2023
@jfecher
Copy link
Contributor

jfecher commented Feb 6, 2023

Can you elaborate on why this is needed? If I'm reading it right, I'm not sure why we'd need a directive for implementing sorting. Is it an optimization or something else?

@guipublic
Copy link
Contributor Author

It is required for implementing dynamic arrays efficiently, so yes it is some kind of optimisation. You can have a look at noir PR #754 which uses it to sort arrays.

@guipublic guipublic merged commit 55e3eee into master Feb 8, 2023
@guipublic guipublic deleted the gd/sorting_network branch February 8, 2023 12:52
TomAFrench added a commit to TomAFrench/acvm that referenced this pull request Feb 10, 2023
* master:
  feat: Update Arkworks' dependencies on `acir_field` (noir-lang#69)
  add tests for `from_hex` and `to_hex` (noir-lang#85)
  improve field formatting (noir-lang#84)
  chore(ci): Leverage reusable workflows (noir-lang#81)
  fix clippy (noir-lang#82)
  0.4.1 Release
  remove duplicated match statement for Directive::Log (noir-lang#79)
  0.4.0 Release
  update changelog
  feat(acvm): Directive for sorting networks (noir-lang#77)
  feat: Preprocess methods for ACVM interface  (noir-lang#71)
  expose acir_field through acir (noir-lang#75)
  chore(acvm): rename remaining references to gadget calls (noir-lang#76)
  feat: Add Log Directive (noir-lang#61)
  blackbox to black_box (noir-lang#72)
  feat(ci)!: add spellchecker (noir-lang#73)
TomAFrench added a commit that referenced this pull request Feb 10, 2023
* master:
  feat: Update Arkworks' dependencies on `acir_field` (#69)
  add tests for `from_hex` and `to_hex` (#85)
  improve field formatting (#84)
  chore(ci): Leverage reusable workflows (#81)
  fix clippy (#82)
  0.4.1 Release
  remove duplicated match statement for Directive::Log (#79)
  0.4.0 Release
  update changelog
  feat(acvm): Directive for sorting networks (#77)
  feat: Preprocess methods for ACVM interface  (#71)
  expose acir_field through acir (#75)
  chore(acvm): rename remaining references to gadget calls (#76)
  feat: Add Log Directive (#61)
  blackbox to black_box (#72)
  feat(ci)!: add spellchecker (#73)
TomAFrench added a commit that referenced this pull request Feb 10, 2023
* master:
  feat: Update Arkworks' dependencies on `acir_field` (#69)
  add tests for `from_hex` and `to_hex` (#85)
  improve field formatting (#84)
  chore(ci): Leverage reusable workflows (#81)
  fix clippy (#82)
  0.4.1 Release
  remove duplicated match statement for Directive::Log (#79)
  0.4.0 Release
  update changelog
  feat(acvm): Directive for sorting networks (#77)
  feat: Preprocess methods for ACVM interface  (#71)
  expose acir_field through acir (#75)
  chore(acvm): rename remaining references to gadget calls (#76)
  feat: Add Log Directive (#61)
  blackbox to black_box (#72)
  feat(ci)!: add spellchecker (#73)
TomAFrench added a commit that referenced this pull request Feb 10, 2023
* master:
  feat: Update Arkworks' dependencies on `acir_field` (#69)
  add tests for `from_hex` and `to_hex` (#85)
  improve field formatting (#84)
  chore(ci): Leverage reusable workflows (#81)
  fix clippy (#82)
  0.4.1 Release
  remove duplicated match statement for Directive::Log (#79)
  0.4.0 Release
  update changelog
  feat(acvm): Directive for sorting networks (#77)
  feat: Preprocess methods for ACVM interface  (#71)
  expose acir_field through acir (#75)
  chore(acvm): rename remaining references to gadget calls (#76)
  feat: Add Log Directive (#61)
  blackbox to black_box (#72)
  feat(ci)!: add spellchecker (#73)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants