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

resolve get on device edge case #82

Merged
merged 3 commits into from
Nov 14, 2023
Merged

Conversation

Yurlungur
Copy link
Collaborator

@Yurlungur Yurlungur commented Nov 14, 2023

PR Summary

@chadmeyer noticed that GetOnDevice on an empty DataBox causes an assertion error related to array sizes. I think this was indicating an edge case in GetOnDevice: the edge case being being that GetOnDevice was attempting to copy memory to device even for unallocated DataBoxes containing no memory.

This PR simply adds a little default code making GetOnDevice a no-op for empty DataBoxes.

PR Checklist

  • Code is formatted. (You can use the format_spiner make target.)
  • Adds a test for any bugs fixed. Adds tests for new features.
  • If preparing for a new release, update the version in cmake.

@Yurlungur Yurlungur added the bug Something isn't working label Nov 14, 2023
@Yurlungur Yurlungur self-assigned this Nov 14, 2023
@Yurlungur Yurlungur merged commit 88c33bb into main Nov 14, 2023
4 checks passed
@Yurlungur Yurlungur deleted the jmm/feature-getOnDevice-edge-case branch November 14, 2023 21:06
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