Skip to content

Commit

Permalink
Queues: extend binary heap (#2145)
Browse files Browse the repository at this point in the history
* Implement ranks

* Move toward Queue interface (with ranks)

* Cleanup bugs

* Add peaks and pops

* Fix bubble down

* Use slightly more involved test

* Tweak formatting

* Remove `mem` reference

* Remove tupleple from test/correctness suite

* Autoformat

* Peek and not peak

* Tweak formatting, variable names, and docs

---------

Co-authored-by: Anshuman Mohan <[email protected]>
  • Loading branch information
polybeandip and anshumanmohan authored Jun 17, 2024
1 parent 85d0e91 commit 04add67
Show file tree
Hide file tree
Showing 6 changed files with 382 additions and 110 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions calyx-py/test/correctness/queues/binheap.data
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"mem": {
"out": {
"data": [
0,
0,
Expand All @@ -20,7 +20,7 @@
"format": {
"is_signed": false,
"numeric_type": "bitnum",
"width": 64
"width": 32
}
}
}
}
12 changes: 6 additions & 6 deletions calyx-py/test/correctness/queues/binheap.expect
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"mem": [
"out": [
3,
6,
6,
8,
9,
9,
10,
12,
0,
0,
0,
0,
0,
3,
0,
0,
0,
Expand Down
Loading

0 comments on commit 04add67

Please sign in to comment.