alpaka-group / alpaka

Abstraction Library for Parallel Kernel Acceleration :llama:
https://alpaka.readthedocs.io
Mozilla Public License 2.0
356 stars 74 forks source link

Implement alpaka's view traits for `std::mdspan` #2078

Open bernhardmgruber opened 1 year ago

bernhardmgruber commented 1 year ago

Alpaka has support for std::mdspan in the sense that one can retrieve an mdspan from any alpaka view. However, an mdspan itself is not a view in alpaka terms, because it misses the corresponding trait implementations. Those should be added.

mehmetyusufoglu commented 2 weeks ago

What do we mean here? The traits like CreateTaskMemcpy should be implemented for mdspan, so that users can use mdspan like a view?

SimeonEhrig commented 1 week ago

First, I'm not sure if the PR is already solved. I think bernhard means, that you should be able to use mdspan where you can use alpaka::view, for example in alpaka::memcpy as source and/or destination. But I'm not sure, if this is easy doable because mdspan misses the information where the memory is located. You don't know if the memory points to CPU or GPU memory.