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
misc
threads_nested.c
Go to the documentation of this file.
1
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
2
// REQUIRES: ompt
3
#include "
callback.h
"
4
#include <omp.h>
5
6
int
main
() {
7
8
int
condition
= 0;
9
int
x = 0;
10
omp_set_nested
(1);
11
#pragma omp parallel num_threads(2)
12
{
13
#pragma omp parallel num_threads(2)
14
{
15
OMPT_SIGNAL
(
condition
);
16
OMPT_WAIT
(
condition
, 4);
17
}
18
}
19
20
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
21
22
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_thread_begin:
23
// CHECK-SAME: thread_type=ompt_thread_initial=1, thread_id=[[MASTER_ID]]
24
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_thread_end:
25
// CHECK-SAME: thread_id=[[MASTER_ID]]
26
// CHECK: {{^}}[[WORKER_ID1:[0-9]+]]: ompt_event_thread_begin:
27
// CHECK-SAME: thread_type=ompt_thread_worker=2, thread_id=[[WORKER_ID1]]
28
// CHECK: {{^}}[[WORKER_ID1]]: ompt_event_thread_end:
29
// CHECK-SAME: thread_id=[[WORKER_ID1]]
30
// CHECK: {{^}}[[WORKER_ID2:[0-9]+]]: ompt_event_thread_begin:
31
// CHECK-SAME: thread_type=ompt_thread_worker=2, thread_id=[[WORKER_ID2]]
32
// CHECK: {{^}}[[WORKER_ID2]]: ompt_event_thread_end:
33
// CHECK-SAME: thread_id=[[WORKER_ID2]]
34
// CHECK: {{^}}[[WORKER_ID3:[0-9]+]]: ompt_event_thread_begin:
35
// CHECK-SAME: thread_type=ompt_thread_worker=2, thread_id=[[WORKER_ID3]]
36
// CHECK: {{^}}[[WORKER_ID3]]: ompt_event_thread_end:
37
// CHECK-SAME: thread_id=[[WORKER_ID3]]
38
39
return
0;
40
}
callback.h
condition
int condition
Definition:
interoperability.cpp:15
omp_set_nested
#define omp_set_nested
Definition:
kmp_stub.cpp:36
OMPT_WAIT
#define OMPT_WAIT(s, v)
Definition:
ompt-signal.h:20
OMPT_SIGNAL
#define OMPT_SIGNAL(s)
Definition:
ompt-signal.h:12
main
int main()
Definition:
threads_nested.c:6
Generated on Wed Jun 18 2025 23:57:02 for LLVM OpenMP by
1.9.6