LLVM OpenMP
20.0.0git
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
c
d
e
g
h
i
m
n
p
r
s
t
u
Functions
c
d
e
g
i
m
n
p
r
s
u
Variables
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
_
a
b
c
d
e
i
k
l
m
n
o
p
r
t
u
Enumerations
_
b
c
d
f
k
l
n
o
s
t
Enumerator
_
a
b
c
d
e
f
k
l
n
o
p
r
s
t
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
runtime
test
worksharing
for
omp_for_collapse_non_rectangular.c
Go to the documentation of this file.
1
// RUN: %libomp-compile-and-run
2
3
// Support for collapse of non-rectangular loop nests was added in GCC 11
4
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10
5
6
#include <stdio.h>
7
8
#define N 3
9
10
int
arr
[
N
][
N
][
N
];
11
int
main
() {
12
#pragma omp for collapse(3)
13
for
(
unsigned
int
i
= 0;
i
<
N
; ++
i
)
14
for
(
unsigned
int
j
=
i
;
j
<
N
; ++
j
)
15
for
(
unsigned
int
k =
j
; k <
N
; ++k)
16
arr
[
i
][
j
][k] = 1;
17
int
num_failed = 0;
18
for
(
unsigned
int
i
= 0;
i
<
N
; ++
i
)
19
for
(
unsigned
int
j
= 0;
j
<
N
; ++
j
)
20
for
(
unsigned
int
k = 0; k <
N
; ++k)
21
if
(
arr
[
i
][
j
][k] == (
j
>=
i
&& k >=
j
) ? 0 : 1)
22
++num_failed;
23
24
return
num_failed;
25
}
i
#define i
Definition:
kmp_stub.cpp:87
N
#define N
Definition:
omp_for_collapse_non_rectangular.c:8
arr
int arr[N][N][N]
Definition:
omp_for_collapse_non_rectangular.c:10
main
int main()
Definition:
omp_for_collapse_non_rectangular.c:11
j
int j
Definition:
omp_single_copyprivate.c:6
Generated on Thu Jun 5 2025 04:45:57 for LLVM OpenMP by
1.9.6