LLVM OpenMP
runtime
test
transform
interchange
nest-zero-trip.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
#include <stdio.h>
4
#include <stdlib.h>
5
6
static
void
interchange
(
int
n,
int
m) {
7
int
i
= 77,
j
= 111;
8
#pragma omp interchange permutation(2, 1)
9
for
(
i
= 0;
i
< n;
i
++)
10
for
(
j
= 0;
j
< m;
j
++)
11
;
12
printf(
"interchange n=%d m=%d: i=%d j=%d\n"
, n, m,
i
,
j
);
13
}
14
15
int
main
() {
16
interchange
(0, 5);
17
interchange
(6, 0);
18
interchange
(6, 5);
19
return
EXIT_SUCCESS;
20
}
21
// CHECK: interchange n=0 m=5: i=0 j=111
22
// CHECK-NEXT: interchange n=6 m=0: i=6 j=0
23
// CHECK-NEXT: interchange n=6 m=5: i=6 j=5
main
int main()
Definition
nest-zero-trip.c:20
interchange
static void interchange(int n, int m)
Definition
nest-zero-trip.c:6
i
#define i
Definition
kmp_stub.cpp:88
j
int j
Definition
omp_single_copyprivate.c:6
Generated on
for LLVM OpenMP by
1.14.0