alpaka-group / vikunja

Vikunja is a performance portable algorithm library that defines functions operating on ranges of elements for a variety of purposes . It supports the execution on multi-core CPUs and various GPUs. Vikunja uses alpaka to implement platform-independent primitives such as reduce or transform.
https://vikunja.readthedocs.io/en/latest/
Mozilla Public License 2.0
14 stars 5 forks source link

Refactor Memory Access Iterators #75

Closed SimeonEhrig closed 2 years ago

SimeonEhrig commented 2 years ago
bussmann commented 2 years ago

I wonder if Vikunja memory access could profit from LLAMA...

SimeonEhrig commented 2 years ago

I wonder if Vikunja memory access could profit from LLAMA...

For this PR, it is not interesting, because the current implementation of the memory access strategies requires 1D memory without padding. But in general, yes. I want to support also multidimensional memory #61 . I think std::mdspan is a good idea for the memory access, like @bernhardmgruber already suggested for llama and alpaka.

SimeonEhrig commented 2 years ago

After a discussion with @bernhardmgruber we find out, that std::mdspan does not support padding, when the padding is not multiple of the size of a single element. Therefore I will use alpaka::accessors, which supports this.

As side not, std::mdspan supports also other nice features like slicing. But I don't need this feature for vikunja.

SimeonEhrig commented 2 years ago

The RP is ready for merging. At the moment, some tests and documentation are missing. This will follow in another PR. This PR needs to be merged, because it is a show stopper for PR #62, #68, #71, #72.