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

bit: Add ceil2 and floor2 functions #105

Merged
merged 4 commits into from
Feb 18, 2020
Merged

bit: Add ceil2 and floor2 functions #105

merged 4 commits into from
Feb 18, 2020

Conversation

stotko
Copy link
Owner

@stotko stotko commented Feb 18, 2020

Internally in createDeviceObject, unordered_base computes the next power of two of the requested size which is used as the number of buckets. Since this kind of function is quite common, there is a ceil2 function (and floor2 respectively) in the upcoming C++20 standard. Add both of them and remove the internal auxiliary version in unordered_base. Furthermore, cleanup the unit test of bit and fix a minor bug there.

@stotko stotko added this to the 1.3.0 milestone Feb 18, 2020
@codecov
Copy link

codecov bot commented Feb 18, 2020

Codecov Report

Merging #105 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #105      +/-   ##
==========================================
+ Coverage   97.83%   97.84%   +0.01%     
==========================================
  Files          27       27              
  Lines        1613     1624      +11     
==========================================
+ Hits         1578     1589      +11     
  Misses         35       35
Impacted Files Coverage Δ
src/stdgpu/impl/unordered_base_detail.cuh 96.64% <100%> (-0.06%) ⬇️
src/stdgpu/impl/bit_detail.h 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ff586d...c7b2e6b. Read the comment docs.

@stotko stotko merged commit faf84fa into master Feb 18, 2020
@stotko stotko deleted the bit_ceil_floor branch February 18, 2020 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant