================

----------------
Meinersbur wrote:

Could you add tests where what `flatten` does changes the output?
For instance:
```
#pragma omp parallel for schedule(static,1) num_threads(2)
#pragma omp flatten 
  for (int i = 0; i < 2; i += 1)
    for (int j = 0; j < 2; j += 1)
       printf("i=%d j=%d tid=%d\n", i, j, omp_get_thread_num());
```

Output with flatten should be:
```
i=0 j=0 tid=0
i=0 j=1 tid=1
i=1 j=0 tid=0
i=1 j=1 tid=0
```

without flatten:
```
i=0 j=0 tid=0
i=0 j=1 tid=0
i=1 j=0 tid=1
i=1 j=1 tid=1
```

Generally, add test that check the composability with other directives, that's 
what its intended use it


https://github.com/llvm/llvm-project/pull/206977
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to