Skip to content

Commit

Permalink
Merge pull request #2177 from clash-lang/parallel-scan
Browse files Browse the repository at this point in the history
Rename and export RTree constructors

New: scanlPar, scanrPar, tscanl, tscanr
  • Loading branch information
DigitalBrains1 authored Apr 28, 2022
2 parents ee87e5b + 8b85268 commit ea114d8
Show file tree
Hide file tree
Showing 6 changed files with 293 additions and 32 deletions.
1 change: 1 addition & 0 deletions changelog/2022-04-21T12_34_12-05_00_add_scanpar
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ADDED: `scanlPar` and `scanrPar` in Clash's Prelude, as well as the `RTree` versions `tscanl` and `tscanr`. These variants of `scanl1` and `scanr1` compile to a binary tree of operations, with a depth of `O(log(n))` (`n` being the length of the vector) rather than a depth of `n` for `scanl1` and `scanr1`. [#2177](https://github.com/clash-lang/clash-compiler/pull/2177)
1 change: 1 addition & 0 deletions changelog/2022-04-27T17_13_24+02_00_export_RTree_constrs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ADDED: The GADT constructors for `RTree` (`RLeaf` and `RBranch`) are now exported directly in addition to the patterns `LR` and `BR`. [#2177](https://github.com/clash-lang/clash-compiler/pull/2177)
Binary file added clash-prelude/doc/scanlPar.graffle
Binary file not shown.
122 changes: 122 additions & 0 deletions clash-prelude/doc/scanlPar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ea114d8

Please sign in to comment.