LLVM OpenMP
runtime
test
transform
split
trip_one.c
Go to the documentation of this file.
1
// RUN: %libomp-compile -fopenmp-version=60 && %libomp-run \
2
// RUN: | FileCheck %s --match-full-lines
3
4
// Tiny trip counts: trip=1 with counts(1, omp_fill) and trip=0.
5
6
#include <stdlib.h>
7
#include <stdio.h>
8
9
int
main
() {
10
int
n;
11
12
n = 1;
13
printf(
"trip1\n"
);
14
#pragma omp split counts(1, omp_fill)
15
for
(
int
i
= 0;
i
< n; ++
i
)
16
printf(
"i=%d\n"
,
i
);
17
printf(
"end1\n"
);
18
19
n = 0;
20
printf(
"trip0\n"
);
21
#pragma omp split counts(omp_fill)
22
for
(
int
i
= 0;
i
< n; ++
i
)
23
printf(
"i=%d\n"
,
i
);
24
printf(
"end0\n"
);
25
26
return
EXIT_SUCCESS;
27
}
28
29
// CHECK: trip1
30
// CHECK-NEXT: i=0
31
// CHECK-NEXT: end1
32
// CHECK-NEXT: trip0
33
// CHECK-NEXT: end0
i
#define i
Definition
kmp_stub.cpp:88
main
int main()
Definition
trip_one.c:9
Generated on
for LLVM OpenMP by
1.14.0