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