blob: 8241621d35990709b3de155b4943146529a55848 [file] [log] [blame]
int
foo (int *a, int *b)
{
int r = 0;
#pragma omp parallel for reduction (inscan, +:r) default(none) firstprivate (a, b)
for (int i = 0; i < 64; i++)
{
r += a[i];
#pragma omp scan inclusive (r)
b[i] = r;
}
return r;
}