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

Add Alpaka `TAcc` to inferface of functors #27

Closed SimeonEhrig closed 2 years ago

SimeonEhrig commented 3 years ago
SimeonEhrig commented 3 years ago

ping @psychocoderHPC

bernhardmgruber commented 2 years ago

I thought Vikunja will provide an STL compatible interface? By adding the accelerator object to the function sinatures that is no longer the case. But I can see the need for that becaues alpaka.

SimeonEhrig commented 2 years ago

Originally, I planed to make the Acc object optional but I don't know how. Maybe it is coming back in the future if I have more experience.

sbastrakov commented 2 years ago

In PIConGPU we sometime have algorithms that accept two forms of functors. Internally we check which form is callable and call it via some SFINAE.

bernhardmgruber commented 2 years ago

In PIConGPU we sometime have algorithms that accept two forms of functors. Internally we check which form is callable and call it via some SFINAE.

I think this could be a great way to improve the interface. But maybe that's beyond the scope of this PR. @SimeonEhrig let's revisit this at some point in the future.