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
omp_task_priority3.c
Go to the documentation of this file.
1
// RUN: %libomp-compile && env OMP_MAX_TASK_PRIORITY=42 %libomp-run
2
3
#include <stdio.h>
4
#include <stdlib.h>
5
#include <omp.h>
6
7
int
a
= 0;
8
9
int
main
(
void
) {
10
int
i
;
11
int
max_task_priority = omp_get_max_task_priority();
12
if
(max_task_priority != 42) {
13
fprintf(stderr,
14
"error: omp_get_max_task_priority() returned %d instead of 42\n"
,
15
max_task_priority);
16
exit(EXIT_FAILURE);
17
}
18
19
for
(
i
= 0;
i
< 250; ++
i
) {
20
#pragma omp parallel
21
{
22
#pragma omp task priority(42)
23
{
24
#pragma omp atomic
25
a
++;
26
}
27
}
28
}
29
30
printf(
"a = %d\n"
,
a
);
31
32
return
EXIT_SUCCESS;
33
}
i
#define i
Definition:
kmp_stub.cpp:87
main
int main(void)
Definition:
omp_task_priority3.c:9
a
int a
Definition:
omp_task_priority3.c:7
Generated on Sun Jun 8 2025 18:26:07 for LLVM OpenMP by
1.9.6