LLVM OpenMP
omp_num_threads_all_host.c
Go to the documentation of this file.
1// RUN: %libomp-compile && env OMP_NUM_THREADS_ALL=8 %libomp-run
2//
3// OpenMP 6.0: host falls through to `_ALL` when `<ENV>` is unset.
4
5#include <omp.h>
6#include <stdio.h>
7#include <stdlib.h>
8
9int main(void) {
10 int max = omp_get_max_threads();
11 if (max != 8) {
12 fprintf(stderr, "FAIL: omp_get_max_threads()=%d, expected 8\n", max);
13 return 1;
14 }
15 return 0;
16}
int main(void)
int omp_get_max_threads()