-
Notifications
You must be signed in to change notification settings - Fork 2
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
[MISC] add div_ceil #149
[MISC] add div_ceil #149
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
2f500d3
to
5640b8c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #149 +/- ##
=======================================
Coverage 98.33% 98.34%
=======================================
Files 41 42 +1
Lines 1385 1389 +4
=======================================
+ Hits 1362 1366 +4
Misses 23 23
☔ View full report in Codecov by Sentry. |
include/hibf/misc/div_ceil.hpp
Outdated
template <std::unsigned_integral t1, std::unsigned_integral t2> | ||
[[nodiscard]] inline constexpr size_t div_ceil(t1 const dividend, t2 const divisor) noexcept | ||
{ | ||
assert(divisor > 0u); |
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.
Maybe also add an assert for overflow detection (dividend + divisor)
include/hibf/misc/div_ceil.hpp
Outdated
* \ingroup hibf | ||
*/ | ||
template <std::unsigned_integral t1, std::unsigned_integral t2> | ||
[[nodiscard]] inline constexpr size_t div_ceil(t1 const dividend, t2 const divisor) noexcept |
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.
[[nodiscard]] inline constexpr size_t div_ceil(t1 const dividend, t2 const divisor) noexcept | |
[[nodiscard]] inline constexpr size_t divide_and_ceil(t1 const dividend, t2 const divisor) noexcept |
5640b8c
to
aa4bd49
Compare
aa4bd49
to
c9f8466
Compare
c9f8466
to
db87a0e
Compare
No description provided.