LLVM OpenMP
22.0.0git
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
Functions
c
d
e
f
g
i
m
n
o
p
r
s
t
u
Variables
Enumerations
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
v
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 Symbols
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
taskwait.c
Go to the documentation of this file.
1
// clang-format off
2
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
3
// REQUIRES: ompt
4
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
5
// clang-format on
6
#include "
callback.h
"
7
#include <omp.h>
8
9
int
main
() {
10
int
x = 0;
11
#pragma omp parallel num_threads(2)
12
{
13
#pragma omp master
14
{
15
#pragma omp task
16
{
17
x++;
18
}
19
#pragma omp taskwait
20
print_current_address
(1);
21
}
22
}
23
24
// clang-format off
25
// Check if libomp supports the callbacks for this test.
26
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_sync_region'
27
// CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_sync_region_wait'
28
29
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
30
31
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_taskwait_begin: parallel_id={{[0-f]+}}, task_id={{[0-f]+}}, codeptr_ra=[[RETURN_ADDRESS:(0x)?[0-f]+]]
32
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskwait_begin: parallel_id={{[0-f]+}}, task_id={{[0-f]+}}, codeptr_ra=[[RETURN_ADDRESS]]
33
// CHECK: {{^}}[[MASTER_ID]]: ompt_event_wait_taskwait_end: parallel_id={{[0-f]+}}, task_id={{[0-f]+}}, codeptr_ra=[[RETURN_ADDRESS]]
34
// CHECK-NEXT: {{^}}[[MASTER_ID]]: ompt_event_taskwait_end: parallel_id={{[0-f]+}}, task_id={{[0-f]+}}, codeptr_ra=[[RETURN_ADDRESS]]
35
// CHECK-NEXT: {{^}}[[MASTER_ID]]: current_address={{.*}}[[RETURN_ADDRESS]]
36
// clang-format on
37
38
return
0;
39
}
9
int
main
() {
…
}
callback.h
print_current_address
#define print_current_address(id)
Definition
callback.h:255
main
int main()
Definition
taskwait.c:9
Generated on
for LLVM OpenMP by
1.14.0