Replies: 4 comments 4 replies
-
This looks conspicuously like memory spaces in Kokkos. |
Beta Was this translation helpful? Give feedback.
-
Does it really indicate ownership (the owner can and should delete the memory eventually) or location? |
Beta Was this translation helpful? Give feedback.
-
Wouldn't those 2 always come in pairs? Should we have:
and HostDeviceParamsConnector could encapsulate the memory allocation, deallocation and transfer details. |
Beta Was this translation helpful? Give feedback.
-
See #131 |
Beta Was this translation helpful? Give feedback.
-
As @pcanal has noted on multiple occasions, there's no type safety in place to prevent device pointers from being unintentionally dereferenced as though they were host pointers. The main safety feature is just the name of accessors being
device_pointers
.In multiple classes now, for host-side testing (MaterialParams, LivermoreParams) as well as host-side setup (ParticleParams) we're duplicating memory structures and owning side-by-side
vector<Foo> host_foo_
andDeviceVector<Foo> device_foo_
, and near-duplicate code for creatinghost_pointers
anddevice_pointers
that both returnBarPointers
classes.Maybe there's a way to reduce some of the duplication and complexity, and make the code more typesafe and clean?
Beta Was this translation helpful? Give feedback.
All reactions