1 // RUN: %libomp-cxx-compile-and-run
10 int main(int argc
, char *argv
[]) {
11 const int N
= std::min(std::max(std::max(32, 4 * omp_get_max_threads()),
12 4 * omp_get_num_procs()),
13 std::numeric_limits
<int>::max());
15 std::vector
<int> data(N
);
17 #pragma omp parallel for num_threads(N)
18 for (unsigned i
= 0; i
< N
; ++i
) {
22 #pragma omp parallel for num_threads(N + 1)
23 for (unsigned i
= 0; i
< N
; ++i
) {
27 for (unsigned i
= 0; i
< N
; ++i
) {
28 assert(data
[i
] == 2 * i
);