LLVM OpenMP
unroll-partial.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// fuse restores the variable of a partially unrolled loop it consumes.
5
6#ifndef HEADER
7#define HEADER
8
9#include <stdio.h>
10#include <stdlib.h>
11
12int main(void) {
13 int i = -1, j = -1;
14#pragma omp fuse
15 {
16#pragma omp unroll partial(2)
17 for (i = 0; i < 5; i++)
18 ;
19 for (j = 0; j < 5; j++)
20 ;
21 }
22 printf("i=%d j=%d\n", i, j);
23 return EXIT_SUCCESS;
24}
25#endif
26
27// CHECK: i=5 j=5
#define i
Definition kmp_stub.cpp:88
int main(void)