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
tasking
nested_parallel_tasking.c
Go to the documentation of this file.
1
// RUN: %libomp-compile-and-run
2
#include <stdio.h>
3
#include <omp.h>
4
5
/*
6
* This test would hang when level instead of active level
7
* used to push task state.
8
*/
9
10
int
main
()
11
{
12
// If num_threads is changed to a value greater than 1, then the test passes
13
#pragma omp parallel num_threads(1)
14
{
15
#pragma omp parallel
16
printf(
"Hello World from thread %d\n"
, omp_get_thread_num());
17
}
18
19
printf(
"omp_num_threads: %d\n"
,
omp_get_max_threads
());
20
21
#pragma omp parallel
22
{
23
#pragma omp master
24
#pragma omp task default(none)
25
{
26
printf(
"%d is executing this task\n"
, omp_get_thread_num());
27
}
28
}
29
30
printf(
"pass\n"
);
31
return
0;
32
}
main
int main()
Definition:
nested_parallel_tasking.c:10
omp_get_max_threads
int omp_get_max_threads()
Generated on Tue Jun 3 2025 06:11:18 for LLVM OpenMP by
1.9.6