| void bar (int); |
| |
| /* Static schedule without a chunk size goes through |
| expand_omp_for_static_nochunk. */ |
| |
| void |
| f1 (int n) |
| { |
| int i; |
| #pragma omp for schedule(static) |
| for (i = 0; i < n; ++i) |
| bar (i); |
| } |
| |
| /* Static schedule with a chunk size goes through |
| expand_omp_for_static_chunk. */ |
| |
| void |
| f2 (int n) |
| { |
| int i; |
| #pragma omp for schedule(static, 4) |
| for (i = 0; i < n; ++i) |
| bar (i); |
| } |
| |
| /* Distribute without a chunk size goes through |
| expand_omp_for_static_nochunk. */ |
| |
| void |
| f3 (int n) |
| { |
| int i; |
| #pragma omp teams |
| #pragma omp distribute |
| for (i = 0; i < n; ++i) |
| bar (i); |
| } |
| |
| /* Distribute with a chunk size goes through |
| expand_omp_for_static_chunk. */ |
| |
| void |
| f4 (int n) |
| { |
| int i; |
| #pragma omp teams |
| #pragma omp distribute dist_schedule(static, 4) |
| for (i = 0; i < n; ++i) |
| bar (i); |
| } |