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 Mask utility function #3265

Merged
merged 7 commits into from
Oct 20, 2019
Merged

Bit Mask utility function #3265

merged 7 commits into from
Oct 20, 2019

Conversation

fweik
Copy link
Contributor

@fweik fweik commented Oct 19, 2019

Description of changes:

  • tuple interface for Utils::{Array, Vector}
  • Extract bit masking utility function to utils
  • Some small code modernization

@fweik fweik requested a review from KaiSzuttor October 19, 2019 20:09
@codecov
Copy link

codecov bot commented Oct 19, 2019

Codecov Report

Merging #3265 into python will increase coverage by <1%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           python   #3265    +/-   ##
=======================================
+ Coverage      86%     86%   +<1%     
=======================================
  Files         530     533     +3     
  Lines       25647   25643     -4     
=======================================
+ Hits        22061   22062     +1     
+ Misses       3586    3581     -5
Impacted Files Coverage Δ
src/core/thermostat.hpp 97% <100%> (-1%) ⬇️
src/utils/include/utils/mask.hpp 100% <100%> (ø)
src/core/rotation.cpp 100% <100%> (+2%) ⬆️
src/utils/include/utils/Array.hpp 96% <100%> (ø) ⬆️
src/utils/include/utils/Vector.hpp 100% <100%> (ø) ⬆️
src/utils/tests/mask_test.cpp 100% <100%> (ø)
src/utils/tests/type_traits_test.cpp 100% <100%> (ø)
src/utils/tests/Array_test.cpp 100% <100%> (ø) ⬆️
src/core/electrostatics_magnetostatics/p3m.cpp 86% <0%> (-1%) ⬇️
... and 3 more

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 0446313...a48b99d. Read the comment docs.

template <class T, class Integral>
auto mask(Integral mask, T t)
-> std::enable_if_t<std::is_unsigned<Integral>::value &&
(8 * sizeof(Integral) >= tuple_size<T>::value),
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does the 8 come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bits vs bytes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I gave it a name, you were the second person to ask this ^^

@fweik
Copy link
Contributor Author

fweik commented Oct 20, 2019

bors r=RudolfWeeber

bors bot added a commit that referenced this pull request Oct 20, 2019
3265: Bit Mask utility function r=RudolfWeeber a=fweik

Description of changes:
 - tuple interface for Utils::{Array, Vector}
 - Extract bit masking utility function to utils
 - Some small code modernization



Co-authored-by: Florian Weik <[email protected]>
@bors
Copy link
Contributor

bors bot commented Oct 20, 2019

Build failed

@jngrad
Copy link
Member

jngrad commented Oct 20, 2019

bors retry

bors bot added a commit that referenced this pull request Oct 20, 2019
3265: Bit Mask utility function r=RudolfWeeber a=fweik

Description of changes:
 - tuple interface for Utils::{Array, Vector}
 - Extract bit masking utility function to utils
 - Some small code modernization



Co-authored-by: Florian Weik <[email protected]>
@bors
Copy link
Contributor

bors bot commented Oct 20, 2019

Build succeeded

@bors bors bot merged commit a48b99d into espressomd:python Oct 20, 2019
@fweik fweik deleted the mask branch August 27, 2020 10:22
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