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

Deep copying View should use allocator id of parent #1458

Closed
gunney1 opened this issue Oct 26, 2024 · 1 comment
Closed

Deep copying View should use allocator id of parent #1458

gunney1 opened this issue Oct 26, 2024 · 1 comment
Assignees
Labels
Reviewed Sidre Issues related to Axom's 'sidre' component

Comments

@gunney1
Copy link
Contributor

gunney1 commented Oct 26, 2024

There are 2 ways to deep copy data into a sidre::View, and they should allocate array data the same way.

Deep-copying from a source View currently allocates data using the destination's parent's default allocator id. However, deep-copying from a source conduit::Node, using View::importArrayNode(), currently allocates data on the host, ignoring the parent's default allocator id. We should change the second version to behave like the first.

This proposal constitutes a behavior change, which should be documented. While it is possible to copy data to the desired memory space after the deep copy, to do so for a large hierarchy is messy and wasteful.

@gunney1 gunney1 added the Sidre Issues related to Axom's 'sidre' component label Oct 26, 2024
@gunney1 gunney1 self-assigned this Oct 26, 2024
@gunney1 gunney1 changed the title Deep copying View should always use allocator id of parent Deep copying View should use allocator id of parent Oct 28, 2024
@gunney1
Copy link
Contributor Author

gunney1 commented Nov 5, 2024

Resolved with MR #1460.

@gunney1 gunney1 closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed Sidre Issues related to Axom's 'sidre' component
Projects
None yet
Development

No branches or pull requests

2 participants