Go to the documentation of this file.
12int main(
int argc,
char **argv) {
17 #pragma omp for reduction(task, +: a) reduction(task, *: b)
18 for (
i = 1;
i <= 5; ++
i) {
19 #pragma omp task in_reduction(+: a) in_reduction(*: b)
28 fprintf(stderr,
"error: a != 15. Instead a = %d\n",
a);
32 fprintf(stderr,
"error: b != 120. Instead b = %d\n",
b);