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
ompt
synchronization
reduction
empty_reduce.c
Go to the documentation of this file.
1
// RUN: %libomp-compile-and-run | FileCheck %s
2
// RUN: %libomp-compile -DNOWAIT && %libomp-run | FileCheck %s
3
// REQUIRES: ompt
4
// UNSUPPORTED: gcc
5
#include "
callback.h
"
6
#include <omp.h>
7
8
#ifdef NOWAIT
9
#define FOR_CLAUSE nowait
10
#else
11
#define FOR_CLAUSE
12
#endif
13
14
int
main
() {
15
int
sum
= 0;
16
int
i
;
17
#pragma omp parallel num_threads(1)
18
#pragma omp for reduction(+ : sum) FOR_CLAUSE
19
for
(
i
= 0;
i
< 10000;
i
++) {
20
sum
+=
i
;
21
}
22
23
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
24
25
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin:
26
// CHECK-SAME: parallel_id=[[PARALLEL_ID:[0-9]+]]
27
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_implicit_task_begin:
28
// CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID:[0-9]+]]
29
30
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_reduction_begin:
31
// CHECK-SAME: parallel_id=[[PARALLEL_ID]], task_id=[[TASK_ID]],
32
// CHECK-SAME: codeptr_ra=
33
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_reduction_end:
34
// CHECK-SAME: parallel_id=[[PARALLEL_ID]],
35
// CHECK-SAME: task_id=[[TASK_ID]], codeptr_ra=
36
37
return
0;
38
}
callback.h
main
int main()
Definition:
empty_reduce.c:14
i
#define i
Definition:
kmp_stub.cpp:87
sum
int sum
Definition:
omp_for_schedule_runtime.c:19
Generated on Sun Jul 6 2025 15:09:58 for LLVM OpenMP by
1.9.6