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
affinity
format
proc_bind.c
Go to the documentation of this file.
1
// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES='{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0}' %libomp-run | %python %S/check.py -c 'CHECK' %s
2
// REQUIRES: affinity
3
4
#include <stdio.h>
5
#include <stdlib.h>
6
#include <omp.h>
7
#include "
omp_testsuite.h
"
8
9
int
main
(
int
argc,
char
** argv) {
10
omp_set_affinity_format
(
"TESTER: tl:%L tn:%n nt:%N aff:{%A}"
);
11
omp_set_num_threads
(8);
12
// Initial parallel
13
go_parallel_spread
();
14
go_parallel_spread
();
15
// Affinity changes here
16
go_parallel_close
();
17
go_parallel_close
();
18
// Affinity changes here
19
go_parallel_master
();
20
go_parallel_master
();
21
return
get_exit_value
();
22
}
23
24
// CHECK: num_threads=8 TESTER: tl:1 tn:[0-7] nt:8 aff:
25
// CHECK: num_threads=8 TESTER: tl:1 tn:[0-7] nt:8 aff:
26
// CHECK: num_threads=8 TESTER: tl:1 tn:[0-7] nt:8 aff:
omp_set_num_threads
#define omp_set_num_threads
Definition:
kmp_stub.cpp:34
omp_set_affinity_format
#define omp_set_affinity_format
Definition:
kmp_stub.cpp:37
omp_testsuite.h
go_parallel_master
static void go_parallel_master()
Definition:
omp_testsuite.h:64
go_parallel_spread
static void go_parallel_spread()
Definition:
omp_testsuite.h:46
go_parallel_close
static void go_parallel_close()
Definition:
omp_testsuite.h:55
get_exit_value
static int get_exit_value()
Definition:
omp_testsuite.h:73
main
int main()
Definition:
test-touch.c:21
Generated on Mon Jun 9 2025 17:00:14 for LLVM OpenMP by
1.9.6