repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[llvm] Stop including unordered_map (NFC)
[llvm-project.git]
/
openmp
/
runtime
/
test
/
tasking
/
nested_task_creation.c
blob
c7c25fcddef698fba4c6198187de87663ae77e19
1
// RUN: %libomp-compile-and-run
2
#include <stdio.h>
3
#include <omp.h>
4
#include
"omp_my_sleep.h"
5
6
/*
7
* This test creates tasks that themselves create a new task.
8
* The runtime has to take care that they are correctly freed.
9
*/
10
11
int
main
()
12
{
13
#pragma omp task
14
{
15
#pragma omp task
16
{
17
my_sleep
(
0.1
);
18
}
19
}
20
21
#pragma omp parallel num_threads(2)
22
{
23
#pragma omp single
24
#pragma omp task
25
{
26
#pragma omp task
27
{
28
my_sleep
(
0.1
);
29
}
30
}
31
}
32
33
printf
(
"pass
\n
"
);
34
return
0
;
35
}