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
target
issue-81488.c
Go to the documentation of this file.
1
// RUN: %libomp-compile
2
// RUN: env OMP_NUM_THREADS=1 LIBOMP_USE_HIDDEN_HELPER_TASK=1 \
3
// RUN: LIBOMP_NUM_HIDDEN_HELPER_THREADS=8 %libomp-run
4
5
#include <stdio.h>
6
#include <stdlib.h>
7
#include <omp.h>
8
9
#define Nz 8
10
#define DEVICE_ID 0
11
12
int
a
[
Nz
];
13
14
int
main
(
void
) {
15
for
(
int
n = 0; n < 10; ++n) {
16
for
(
int
k = 0; k <
Nz
; ++k) {
17
a
[k] = -1;
18
}
19
#pragma omp parallel shared(a)
20
{
21
#pragma omp single
22
{
23
#pragma omp target teams distribute parallel for nowait device(DEVICE_ID) \
24
map(tofrom : a[0 : 8])
25
for
(
int
i
= 0;
i
<
Nz
; ++
i
) {
26
a
[
i
] =
i
;
27
}
28
}
29
#pragma omp barrier
30
}
31
for
(
int
k = 0; k <
Nz
; ++k) {
32
printf(
"a[%d] = %d\n"
, k,
a
[k]);
33
}
34
}
35
return
0;
36
}
main
int main(void)
Definition:
issue-81488.c:14
a
int a[Nz]
Definition:
issue-81488.c:12
Nz
#define Nz
Definition:
issue-81488.c:9
i
#define i
Definition:
kmp_stub.cpp:87
Generated on Mon Jun 16 2025 04:18:24 for LLVM OpenMP by
1.9.6