Closed calewis closed 4 years ago
Need to make sure that nested lambdas don't trigger this warning since they don't need annotations
Example that currently triggers a warning when it shouldn't.
Kokkos::parallel_for(7, KOKKOS_LAMBA(int x){
[&]{x;}()
});
It turns out that the issue wasn't the previous post, it was that Kokkos::parallel_for
internally was generating a CallExpr
to our lambda operator()
. I fixed this by only inspecting FunctionDecl
s that are in user space.
The check is being PRd right now, new problems should just be filed as new bugs.
This check will ensure that functions called inside
Kokkos::parallel_*
functors and functions annotated withKOKKOS_FUNCTION
are annotated withKOKKOS_FUNCTION
.At a minimum should detect the calls to
oops
in bothnot_oops
and theKOKKOS_LAMBDA
, this check will be made significantly easier if new versions of Kokkos are required due to an annotation attribute added to KOKKOS_FUNCTION.Also we need to be sure not to flag functions such as
printf