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

kokkos-implicit-this-capture warns for explicit *this capture #20

Open
masterleinad opened this issue Aug 2, 2022 · 0 comments
Open

Comments

@masterleinad
Copy link

Using KOKKOS_CLASS_LAMBDA with Kokkos' clang-tidy gives

/var/jenkins/workspace/Kokkos/containers/unit_tests/TestErrorReporter.hpp:198:9: error: Lambda passed to parallel_for implicitly captures this. [kokkos-implicit-this-capture,-warnings-as-errors]
        KOKKOS_CLASS_LAMBDA(const int work_idx) {
        ^
/var/jenkins/workspace/Kokkos/core/src/setup/Kokkos_Setup_Cuda.hpp:87:29: note: expanded from macro 'KOKKOS_CLASS_LAMBDA'
#define KOKKOS_CLASS_LAMBDA [ =, *this ] __host__ __device__
                            ^
/var/jenkins/workspace/Kokkos/containers/unit_tests/TestErrorReporter.hpp:198:9: note: the captured variable is used here.
        KOKKOS_CLASS_LAMBDA(const int work_idx) {
        ^
/var/jenkins/workspace/Kokkos/core/src/setup/Kokkos_Setup_Cuda.hpp:87:34: note: expanded from macro 'KOKKOS_CLASS_LAMBDA'
#define KOKKOS_CLASS_LAMBDA [ =, *this ] __host__ __device__
                                 ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant