Skip to content
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

Merged
merged 1 commit into from
Oct 24, 2023
Merged

[MISC] add div_ceil #149

merged 1 commit into from
Oct 24, 2023

Conversation

eseiler
Copy link
Member

@eseiler eseiler commented Oct 23, 2023

No description provided.

@vercel
Copy link

vercel bot commented Oct 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hibf ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 24, 2023 9:28am

@eseiler eseiler requested a review from smehringer October 23, 2023 14:26
@seqan-actions seqan-actions added lint [INTERNAL] used for linting and removed lint [INTERNAL] used for linting labels Oct 23, 2023
@seqan-actions seqan-actions added lint [INTERNAL] used for linting and removed lint [INTERNAL] used for linting labels Oct 23, 2023
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c725f38) 98.33% compared to head (db87a0e) 98.34%.

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           
Files Coverage Δ
include/hibf/misc/divide_and_ceil.hpp 100.00% <100.00%> (ø)
src/build/construct_ibf.cpp 100.00% <100.00%> (ø)
src/build/insert_into_ibf.cpp 50.00% <100.00%> (ø)
src/hierarchical_interleaved_bloom_filter.cpp 98.86% <100.00%> (ø)
src/layout/hierarchical_binning.cpp 98.78% <100.00%> (ø)
src/layout/simple_binning.cpp 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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);
Copy link
Member Author

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)

* \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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[[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

@seqan-actions seqan-actions added lint [INTERNAL] used for linting and removed lint [INTERNAL] used for linting labels Oct 24, 2023
@seqan-actions seqan-actions added lint [INTERNAL] used for linting and removed lint [INTERNAL] used for linting labels Oct 24, 2023
@seqan-actions seqan-actions added lint [INTERNAL] used for linting and removed lint [INTERNAL] used for linting labels Oct 24, 2023
@eseiler eseiler merged commit 0c6e58e into seqan:main Oct 24, 2023
27 checks passed
@eseiler eseiler deleted the misc/div_ceil branch October 24, 2023 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants