feat: Dadda tree implementation#20
Merged
Merged
Conversation
cowardsa
approved these changes
Jun 4, 2026
cowardsa
left a comment
There was a problem hiding this comment.
Looks really neat - very nice work - I've left a couple of suggestions about lifting repeatedly used code into a utility function - but otherwise nice!
If you can get BitVector to BitHeap working, then it should be trivial to start generating MLIR code
| Output: A two-row bit heap. | ||
|
|
||
| (1) Compute the smallest 𝐿 such that 𝑚𝐿 ≥ ℎ, where the Dadda sequence is | ||
| given by 𝑚0 = 2 and 𝑚𝑙 = ⌊3/2 mₗ₋₁⌋. |
There was a problem hiding this comment.
Super Nit: you switch into m_{l-1} from ml?
Collaborator
Author
There was a problem hiding this comment.
you mean it should have been m_l, right? good catch thanks!
Comment on lines
+76
to
+77
| match (h.get col).toList with | ||
| | x :: y :: _ => |
There was a problem hiding this comment.
This gets repeated a lot - anything we can do to wrap HAs and FAs?
Collaborator
Author
There was a problem hiding this comment.
hmm I am not sure what we can do here, since we do not match the same way exactly
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the Dadda tree algorithm implementation.