-
Notifications
You must be signed in to change notification settings - Fork 28
Deep copy from Sidre to Conduit #1510
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
base: develop
Are you sure you want to change the base?
Conversation
The actual fix is on another branch, but I can't wait for it to be merged.
It's failing. Maybe because non-Umpire allocators are not working right or Group isn't using it right.
Also disable test copying in/out of Umpire. This check needs to wait for proper support for that kind of copy, which is being performed on another branch.
change transfer_allocator method name to transferTo. Also use call-back to return View-specific allocator.
6764c24
to
41c15d7
Compare
582bbad
to
46bb8a7
Compare
} | ||
@endcode | ||
*/ | ||
struct ConduitMemory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like is does the same job as ConduitAllocateThroughAxom.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a similar idea but it directly supports arbitrary Axom (or Umpire) allocator ids, including those of applications and third-party libraries.
* deep-copied. | ||
* | ||
* The destination's allocator id should be preserved and used for | ||
* array allocations. However, I'm still checking on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This work-in-progress comment should be resolved prior to merge.
|
||
// TODO: Probably wrong to use owning group's default allocator. | ||
// Group can allocate View with non-default allocator. | ||
// int currentAllocId = getOwningGroup()->getDefaultAllocatorID(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this commented-out section has been resolved and the TODO can be removed.
Summary
Group::deepCopyToConduit
andView::deepCopyToConduit
View
data on host. They now allocate in the default allocator of theGroup
that owns theView
. (We have discussed this in the project meetings, reaching the concensus was that all data should use the default allocator unless individually overridden, despite the fact that many parts of a hierarchy would only be used on the host.)View
s to allocate data on the host, where they are used and expected to be.The goal of this change is toward supporting transparent switching between sidre and conduit. With the addition of

Group::deepCopyToConduit
, the state of conduit-sidre hierarchy copies is:* I labeled
importConduitTreeExternal
as the shallow conduit-to-sidre copy, but it's not exactly analogous to createNativeLayout (the shallow sidre-to-conduit copy).