-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow three extra refinement levels for an ElementId #6347
Allow three extra refinement levels for an ElementId #6347
Conversation
src/Domain/Structure/SegmentId.cpp
Outdated
ASSERT(refinement_level < max_refinement_level, | ||
ASSERT(refinement_level <= max_refinement_level, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove this check. It's not a constraint on SegmentId
but a constraint on ElementId
src/Domain/Structure/ElementId.cpp
Outdated
#if defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L | ||
#include <bit> | ||
#else | ||
#include "Utilities/StdHelpers/Bit.hpp" | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check should be in the Bit.hpp
file. Nobody will know to do this magic when including that file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty cool 😎 thanks for doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, could you move the adding of std::bit_*
into a separate commit as you squash?
Some useful functions (std::has_single_bit and std::bit_floor) in the standard library bit are not defined until the version used by gcc10. So if they are not in the library we add implementations based on cppreference.com
This is done by using a compact representation of a SegmentId. Also fix some clang-tidy errors.
03edcc9
to
cb46b8d
Compare
This is done by using a compact representation of a SegmentId. Also fix some clang-tidy errors.
Proposed changes
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments