LLVM OpenMP
foreach.cpp
Go to the documentation of this file.
1// RUN: %libomp-cxx-compile-and-run | FileCheck %s --match-full-lines
2
3#include <cstdlib>
4#include <cstdio>
5#include <vector>
6
7int main() {
8 std::vector<int> v = {10, 20, 30, 40, 50, 60};
9 printf("do\n");
10#pragma omp split counts(2, omp_fill)
11 for (int x : v)
12 printf("x=%d\n", x);
13 printf("done\n");
14 return EXIT_SUCCESS;
15}
16
17// CHECK: do
18// CHECK-NEXT: x=10
19// CHECK-NEXT: x=20
20// CHECK-NEXT: x=30
21// CHECK-NEXT: x=40
22// CHECK-NEXT: x=50
23// CHECK-NEXT: x=60
24// CHECK-NEXT: done
int main()
Definition foreach.cpp:124