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

Fixing slice construction for uninitialized AoSoAs #80

Merged
merged 1 commit into from
Mar 12, 2019

Conversation

sslattery
Copy link
Collaborator

A bug was discovered in #79 where slices created from uninitialized AoSoAs would try to dereference the first value of the AoSoA data. Now we check to see if there is any data. If there is we dereference it. Otherwise we build the slice on a raw pointer. This is valid because the slice is given a corresponding size of 0. A user should not dereference data in a slice of size 0.

@sslattery sslattery added the bug Something isn't working label Mar 11, 2019
@sslattery sslattery self-assigned this Mar 11, 2019
@sslattery sslattery requested a review from dalg24 March 11, 2019 22:05
@codecov-io
Copy link

codecov-io commented Mar 11, 2019

Codecov Report

Merging #80 into master will increase coverage by <.1%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #80     +/-   ##
========================================
+ Coverage    97.7%   97.7%   +<.1%     
========================================
  Files          17      17             
  Lines        1097    1100      +3     
========================================
+ Hits         1072    1075      +3     
  Misses         25      25
Impacted Files Coverage Δ
core/src/Cabana_AoSoA.hpp 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 6e1289b...e2507aa. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants