Repository navigation
Replies: 4 comments 4 replies
|
This looks conspicuously like memory spaces in Kokkos. |
1 reply
Does it really indicate ownership (the owner can and should delete the memory eventually) or location? |
2 replies
Wouldn't those 2 always come in pairs? Should we have: and HostDeviceParamsConnector could encapsulate the memory allocation, deallocation and transfer details. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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_pointersanddevice_pointersthat both returnBarPointersclasses.Maybe there's a way to reduce some of the duplication and complexity, and make the code more typesafe and clean?
All reactions