Open
Conversation
The sc_array_pqueue_add function was hitherto set do abort. We update the semantics to have it enlarge the queue array by one. New implementation by the new helper function sc_array_pqueue_lessen.
Add a new helper function to sift down an element in a minimum heap. Update the pqueue_pop function to use the helper function.
Collaborator
|
I've added the new test and example to the respective CMakeLists.txt's and ran them. Everything looks fine to me. There are further tests (io_file, mpi_pack) that are included in the Makefile.am, but not in the CMakeLists.txt. Should I add them as well? |
Owner
Author
|
Thanks! You may add these tests, please, here or in #239, whatever is best. |
Collaborator
|
I've added the tests to #239 |
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.
Rework priority queue
Proposed changes
The previous pqueue implementation based on a binary heap was flawed.
Completely reworked interface and code, and reactivating the test.
It remains to check whether it all works under CMake. Would you be able to look into this @hannesbrandt?