-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Queues: randomized testing for binary heaps (#2174)
* A few scheduling transactions - WARNING: the pifo is broken; it doesn't pass the big random test * Make heaps bigger! - both pifo and fifo tests pass with large heaps * Queues all working! * More docs, fewer magic numbers, simpler control - slightly refactor control logic in binheap.py - make rank and value widths arguments to `insert_binheap` - add docs to stable_binheap, binheap, and fifo. TBD: pifo * Add pifo docs * full -> is_full * Switch to non-piezo tests * No more magic numbers in gen_queue_data * Fix error handling logic in binheap and pifo * Integerate stable_binheap testing with queue_call * Merge pifo changes from main * Fix typos * Neaten a list --------- Co-authored-by: Anshuman Mohan <[email protected]>
- Loading branch information
1 parent
2d75684
commit cd0791c
Showing
12 changed files
with
160,198 additions
and
166 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# For usage, see gen_queue_data_expect.sh | ||
|
||
import sys | ||
import calyx.queues as queues | ||
from calyx import queue_util | ||
|
||
if __name__ == "__main__": | ||
max_cmds, len = int(sys.argv[1]), int(sys.argv[2]) | ||
keepgoing = "--keepgoing" in sys.argv | ||
commands, values, ranks = queue_util.parse_json() | ||
binheap = queues.Binheap(len) | ||
ans = queues.operate_queue(binheap, max_cmds, commands, values, ranks=ranks, keepgoing=keepgoing) | ||
queue_util.dump_json(ans, commands, values, ranks=ranks) |
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.