Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use ALPAKA_ACCELERATOR_NAMESPACE in headers? #168

Open
makortel opened this issue Feb 2, 2021 · 0 comments
Open

How to use ALPAKA_ACCELERATOR_NAMESPACE in headers? #168

makortel opened this issue Feb 2, 2021 · 0 comments
Labels

Comments

@makortel
Copy link
Collaborator

makortel commented Feb 2, 2021

This issue is a reminder of discussion in #165 on what would be the best way to use ALPAKA_ACCELERATOR_NAMESPACE in headers.

One approach would be something along

namespace ALPAKA_ACCELERATOR_NAMESPACE {
  namespace cms::alpaka_tools {
     ...
  }
}

In the Kokkos version this approach is used for functions that do not take the Kokkos execution space as template argument.

Another approach would be to take the Alpaka Accelerator object via template parameter, but the Accelerator depending on the dimension of the index makes this approach a bit cumbersome, unless we would settle with a common index dimension (#144). In the Kokkos version this approach is used for functions that take Kokkos execution space as template argument (the Kokkos execution space corresponds roughly the Alpaka device + queue + accelerator).

Another approach (taken in #165) would be to use ALPAKA_ACCELERATOR_NAMESPACE explicitly in the function arguments along

namespace cms::alpaka_tools {
  void function(ALPAKA_ACCELERATOR_NAMESPACE::Queue& queue, ...);
}

See original discussion in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant