Provide specialization of AccessTraits for std::vector#1262
Provide specialization of AccessTraits for std::vector#1262aprokop wants to merge 3 commits intoarborx:masterfrom
Conversation
|
Not sure it is a good idea |
When updating the wrappers for deal.II, we realized that there is a lot of boiler code to write with the new interface. It makes it unnecessary hard to use ArborX. With ArborX 1.X, we only needed to write |
What do you see as the difference between |
|
Views are fit for accelerators. What would we want to do about host device annotations on the access functions? |
Not use them. Everything will be |
|
It is not about what memory space we tag it with, we'd run into issues when CUDA or HIP are enabled. |
Why? It worked correctly with the previous API. I have been doing that for years in adamantine. |
9550e65 to
79da7b1
Compare
|
After a long hiatus, I'm coming back to this PR.
My understanding is that when using nvc++ compiler with For hip, with I think in either case, the memory would be migrated to the host if we access it there. If we run into issues later, we could do
@dalg24 Can you please elaborate? I don't understand what you mean here. |
|
|
It will result in a warning, yes, but in a correct execution, as the corresponding hierarchy will be on the host. |
|
@dalg24 requested that we produce no warning in this scenario. Will need to see how we can hide it. |
79da7b1 to
17980fd
Compare
17980fd to
1632018
Compare
This PR provides a specialization of
AccessTraitsforstd::vectorfor user convenience.In general, we should document somewhere that we reserve the right to provide those specializations for something user's don't control in their libraries (like, things from
std::). If users want to provide custom specializations for those, they should wrap inside a holder.