Open
Description
This would be a check to see if a RAJA lambda is trying to access a global variable. These variables are not captured by the lambda, and can cause problems when utilizing multiple memory spaces, since the lambda won't move the data over automatically.
Example:
static int my_static_var = 3;
int myfunction(double* data, int n)
{
int my_local_var = 5;
RAJA::for_all (RAJA::RangeSegment(0, n, [=](int i) {
...
data[i] += my_static_var; // catch this global variable access
data[i] += my_local_var; // this is fine. Lambda captured local variable
...
} );
}
Metadata
Metadata
Assignees
Labels
No labels