LLVM OpenMP Runtime Library
LLVM OpenMP Runtime Library
Trademarks The OpenMP name and the OpenMP logo are registered trademarks of the OpenMP Architecture
Review Board.
Intel, Xeon, and Intel Xeon Phi are trademarks of Intel Corporation in the U.S. and/or other countries.
This document is Copyright © 2015the LLVM Project. It is subject to the same license terms as the LLVM OpenMP
runtime.
*
Other names and brands may be claimed as the property of others.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
Contents
2 Module Index 7
2.1 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Hierarchical Index 9
3.1 Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 Class Index 11
4.1 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5 Module Documentation 13
5.1 Atomic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2 Wait/Release operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.2.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.2.2.1 flag_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.3 Basic Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.2 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.2.1 KMP_IDENT_ATOMIC_REDUCE . . . . . . . . . . . . . . . . . . . . . . . . . 21
ii CONTENTS
5.3.2.2 KMP_IDENT_AUTOPAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.2.3 KMP_IDENT_BARRIER_EXPL . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.2.4 KMP_IDENT_BARRIER_IMPL . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.2.5 KMP_IDENT_IMB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.2.6 KMP_IDENT_KMPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3.3 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.3.3.1 ident_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.4 Deprecated Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.4.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.4.2.1 __kmpc_ok_to_fork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.5 Startup and Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.5.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.5.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.5.2.1 __kmpc_begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.5.2.2 __kmpc_end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.6 Parallel (fork/join) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6.2.1 kmpc_micro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6.3.1 __kmpc_end_serialized_parallel . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6.3.2 __kmpc_fork_call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6.3.3 __kmpc_fork_teams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.6.3.4 __kmpc_push_num_teams . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.6.3.5 __kmpc_push_num_threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.6.3.6 __kmpc_serialized_parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.7 Thread Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.7.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.7.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.7.2.1 __kmpc_bound_num_threads . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.7.2.2 __kmpc_bound_thread_num . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.7.2.3 __kmpc_global_num_threads . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.7.2.4 __kmpc_global_thread_num . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.7.2.5 __kmpc_in_parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.8 Work Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.8.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.8.2 Enumeration Type Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.8.2.1 sched_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.8.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
CONTENTS iii
5.8.3.1 __kmpc_critical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.8.3.2 __kmpc_dispatch_fini_4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.8.3.3 __kmpc_dispatch_fini_4u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.8.3.4 __kmpc_dispatch_fini_8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.8.3.5 __kmpc_dispatch_fini_8u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8.3.6 __kmpc_dispatch_init_4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8.3.7 __kmpc_dispatch_init_4u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8.3.8 __kmpc_dispatch_init_8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8.3.9 __kmpc_dispatch_init_8u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8.3.10 __kmpc_dispatch_next_4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.8.3.11 __kmpc_dispatch_next_4u . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.8.3.12 __kmpc_dispatch_next_8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.8.3.13 __kmpc_dispatch_next_8u . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.8.3.14 __kmpc_dist_dispatch_init_4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.8.3.15 __kmpc_dist_for_static_init_4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.8.3.16 __kmpc_dist_for_static_init_4u . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.8.3.17 __kmpc_dist_for_static_init_8 . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.8.3.18 __kmpc_dist_for_static_init_8u . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.8.3.19 __kmpc_end_critical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.8.3.20 __kmpc_end_master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.8.3.21 __kmpc_end_ordered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.8.3.22 __kmpc_end_single . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.8.3.23 __kmpc_for_static_fini . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.8.3.24 __kmpc_for_static_init_4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.8.3.25 __kmpc_for_static_init_4u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.8.3.26 __kmpc_for_static_init_8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.8.3.27 __kmpc_for_static_init_8u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.8.3.28 __kmpc_master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.8.3.29 __kmpc_ordered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.8.3.30 __kmpc_single . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.8.3.31 __kmpc_team_static_init_4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.8.3.32 __kmpc_team_static_init_4u . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.8.3.33 __kmpc_team_static_init_8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.8.3.34 __kmpc_team_static_init_8u . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.9 Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.9.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.9.2 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.9.2.1 __kmpc_barrier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.9.2.2 __kmpc_barrier_master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.9.2.3 __kmpc_barrier_master_nowait . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
iv CONTENTS
5.9.2.4 __kmpc_end_barrier_master . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.9.2.5 __kmpc_end_reduce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.9.2.6 __kmpc_end_reduce_nowait . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.9.2.7 __kmpc_flush . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.9.2.8 __kmpc_reduce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.9.2.9 __kmpc_reduce_nowait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.10.2.1 kmpc_cctor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.10.2.2 kmpc_cctor_vec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.10.2.3 kmpc_ctor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.10.2.4 kmpc_ctor_vec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.10.2.5 kmpc_dtor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.10.2.6 kmpc_dtor_vec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.10.3.1 __kmpc_copyprivate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.10.3.2 __kmpc_threadprivate_cached . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.10.3.3 __kmpc_threadprivate_register . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.10.3.4 __kmpc_threadprivate_register_vec . . . . . . . . . . . . . . . . . . . . . . . . 43
5.11.3.1 KMP_COUNT_BLOCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.11.3.2 KMP_COUNT_VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.11.3.3 KMP_FOREACH_COUNTER . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.11.3.4 KMP_FOREACH_EXPLICIT_TIMER . . . . . . . . . . . . . . . . . . . . . . . 46
5.11.3.5 KMP_OUTPUT_STATS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.11.3.6 KMP_RESET_STATS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.11.3.7 KMP_START_EXPLICIT_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.11.3.8 KMP_STOP_EXPLICIT_TIMER . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.11.3.9 KMP_TIME_BLOCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.12.2.1 __kmpc_omp_task_with_deps . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.12.2.2 __kmpc_omp_wait_deps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
CONTENTS v
6 Class Documentation 51
6.1 hierarchy_info Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.1.2 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.1.2.1 depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.1.2.2 maxLeaves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.1.2.3 maxLevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.1.2.4 numPerLevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.2 ident Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.2.2 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.2.2.1 flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.2.2.2 psource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.2.2.3 reserved_1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.2.2.4 reserved_2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.2.2.5 reserved_3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.3 kmp_flag< P > Class Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.3.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.3.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.3.2.1 get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.3.2.2 get_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.3.3 Member Data Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.3.3.1 loc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.3.3.2 t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.4 stats_flags_e Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
6.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Index 55
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
Chapter 1
1.1 Introduction
This document describes the interface provided by the LLVM OpenMP∗ runtime library to the compiler. Routines
that are directly called as simple functions by user code are not currently described here, since their definition is in
the OpenMP specification available from http://openmp.org
The aim here is to explain the interface from the compiler to the runtime.
The overall design is described, and each function in the interface has its own description. (At least, that’s the
ambition, we may not be there yet).
For the impatient, we cover building the runtime as the first topic here.
CMake is used to build the OpenMP runtime. For details and a full list of options for the CMake build system, see
Build_With_CMake.txt inside the runtime/ subdirectory. These instructions will provide the most typical
build.
In-LLVM-tree build:.
$ cd where-you-want-to-live
Check out openmp into llvm/projects
$ cd where-you-want-to-build
$ mkdir build && cd build
$ cmake path/to/llvm -DCMAKE_C_COMPILER=<C compiler> -DCMAKE_CXX_COMPILER=<C++ compiler>
$ make omp
Out-of-LLVM-tree build:
$ cd where-you-want-to-live
Check out openmp
$ cd where-you-want-to-live/openmp/runtime
$ mkdir build && cd build
$ cmake path/to/openmp -DCMAKE_C_COMPILER=<C compiler> -DCMAKE_CXX_COMPILER=<C++ compiler>
$ make
The architectures supported are IA-32 architecture, Intel® 64, and Intel® Many Integrated Core Architecture. The
build configurations supported are shown in the table below.
2 LLVM∗ OpenMP∗ Runtime Library Interface
__kmpc_atomic_cmplx16_*
__kmpc_atomic_float16_*
__kmpc_atomic_*_fp
The following compilers are known to do compatible code generation for this RTL: icc/icl, gcc. Code generation is
discussed in more detail later in this document.
1.5 Outlining
The runtime interface is based on the idea that the compiler "outlines" sections of code that are to run in parallel
into separate functions that can then be invoked in multiple threads. For instance, simple code like this
void foo()
{
#pragma omp parallel
{
... do something ...
}
}
is converted into something that looks conceptually like this (where the names used are merely illustrative; the real
library function names will be used later after we’ve discussed some more issues...)
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
1.6 Library Interfaces 3
void foo()
{
__OMP_runtime_fork(outlinedFooBody, (void*)0); // Not the real function name!
}
In real uses of the OpenMP∗ API there are normally references from the outlined code to shared variables that are
in scope in the containing function. Therefore the containing function must be able to address these variables. The
runtime supports two alternate ways of doing this.
The technique currently supported by the runtime library is to receive a separate pointer to each shared variable
that can be accessed from the outlined function. This is what is shown in the example below.
We hope soon to provide an alternative interface to support the alternate implementation described in the next
section. The alternative implementation has performance advantages for small parallel regions that have many
shared variables.
The idea is to treat the outlined function as though it were a lexically nested function, and pass it a single argument
which is the pointer to the parent’s stack frame. Provided that the compiler knows the layout of the parent frame
when it is generating the outlined function it can then access the up-level variables at appropriate offsets from
the parent frame. This is a classical compiler technique from the 1960s to support languages like Algol (and its
descendants) that support lexically nested functions.
The main benefit of this technique is that there is no code required at the fork point to marshal the arguments to the
outlined function. Since the runtime knows statically how many arguments must be passed to the outlined function,
it can easily copy them to the thread’s stack frame. Therefore the performance of the fork code is independent of
the number of shared variables that are accessed by the outlined function.
If it is hard to determine the stack layout of the parent while generating the outlined code, it is still possible to use
this approach by collecting all of the variables in the parent that are accessed from outlined functions into a single
struct which is placed on the stack, and whose address is passed to the outlined functions. In this way the offsets
of the shared variables are known (since they are inside the struct) without needing to know the complete layout of
the parent stack-frame. From the point of view of the runtime either of these techniques is equivalent, since in either
case it only has to pass a single argument to the outlined function to allow it to access shared variables.
A scheme like this is how gcc∗ generates outlined functions.
The library functions used for specific parts of the OpenMP∗ language implementation are documented in different
modules.
• Deprecated Functions functions that are in the library but are no longer required
• Startup and Shutdown functions for initializing and finalizing the runtime
• Work Sharing functions for work sharing constructs such as omp for, omp sections
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
4 LLVM∗ OpenMP∗ Runtime Library Interface
• Thread private data support functions to support thread private data, copyin etc
• Synchronization functions to support omp critical, omp barrier, omp master, reductions etc
1.7 Examples
This example shows the code generated for a parallel for with reduction and dynamic scheduling.
int main () {
int i;
float r = 0.0;
#pragma omp parallel for schedule(dynamic) reduction(+:r)
for ( i = 0; i < 10; i ++ ) {
r += foo();
}
}
int main () {
static int zero = 0;
auto int gtid;
auto float r = 0.0;
__kmpc_begin( & loc3, 0 );
// The gtid is not actually required in this example so could be omitted;
// We show its initialization here because it is often required for calls into
// the runtime and should be locally cached like this.
gtid = __kmpc_global thread num( & loc3 );
__kmpc_fork call( & loc7, 1, main_7_parallel_3, & r );
__kmpc_end( & loc0 );
return 0;
}
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
1.7 Examples 5
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
6 LLVM∗ OpenMP∗ Runtime Library Interface
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
Chapter 2
Module Index
2.1 Modules
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
Chapter 3
Hierarchical Index
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
Chapter 4
Class Index
Here are the classes, structs, unions and interfaces with brief descriptions:
hierarchy_info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
ident . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
kmp_flag< P > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
stats_flags_e
Flags to describe the statistic ( timers or counter ) . . . . . . . . . . . . . . . . . . . . . . . . 54
12 Class Index
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
Chapter 5
Module Documentation
These functions are used for implementing the many different varieties of atomic operations.
The compiler is at liberty to inline atomic operations that are naturally supported by the target architecture. For
instance on IA-32 architecture an atomic like this can be inlined
static int s = 0;
#pragma omp atomic
s++;
& andb
<< shl
>> shr
| orb
∧ xor
&& andl
|| orl
maximum max
minimum min
.eqv. eqv
.neqv. neqv
For non-commutative operations, _rev can also be added for the reversed operation. For the functions that capture
the result, the suffix _cpt is added.
Update Functions
The general form of an atomic function that just performs an update (without a capture)
void __kmpc_atomic_<datatype>_<operation>( ident_t *id_ref, int gtid, TYPE * lhs, TYPE rhs );
Parameters
ident_t a pointer to source location
gtid the global thread id
lhs a pointer to the left operand
rhs the right operand
capture functions
The capture functions perform an atomic update and return a result, which is either the value before the capture, or
that after. They take an additional argument to determine which result is returned. Their general form is therefore
TYPE __kmpc_atomic_<datatype>_<operation>_cpt( ident_t *id_ref, int gtid, TYPE * lhs, TYPE rhs, int
flag );
Parameters
ident_t a pointer to source location
gtid the global thread id
lhs a pointer to the left operand
rhs the right operand
flag one if the result is to be captured after the operation, zero if captured before.
The one set of exceptions to this is the complex<float> type where the value is not returned, rather an extra
argument pointer is passed.
They look like
void __kmpc_atomic_cmplx4_<op>_cpt( ident_t *id_ref, int gtid, kmp_cmplx32 * lhs, kmp_cmplx32 rhs,
kmp_cmplx32 * out, int flag );
The OpenMP∗ standard now supports atomic operations that simply ensure that the value is read or written atom-
ically, with no modification performed. In many cases on IA-32 architecture these operations can be inlined since
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.1 Atomic Operations 15
the architecture guarantees that no tearing occurs on aligned objects accessed with a single memory operation of
up to 64 bits in size.
The general form of the read operations is
void __kmpc_atomic_<type>_wr ( ident_t *id_ref, int gtid, TYPE * lhs, TYPE rhs );
There are versions here for integers of size 1,2,4 and 8 bytes both signed and unsigned (where that matters).
__kmpc_atomic_fixed1_add
__kmpc_atomic_fixed1_add_cpt
__kmpc_atomic_fixed1_add_fp
__kmpc_atomic_fixed1_andb
__kmpc_atomic_fixed1_andb_cpt
__kmpc_atomic_fixed1_andl
__kmpc_atomic_fixed1_andl_cpt
__kmpc_atomic_fixed1_div
__kmpc_atomic_fixed1_div_cpt
__kmpc_atomic_fixed1_div_cpt_rev
__kmpc_atomic_fixed1_div_float8
__kmpc_atomic_fixed1_div_fp
__kmpc_atomic_fixed1_div_rev
__kmpc_atomic_fixed1_eqv
__kmpc_atomic_fixed1_eqv_cpt
__kmpc_atomic_fixed1_max
__kmpc_atomic_fixed1_max_cpt
__kmpc_atomic_fixed1_min
__kmpc_atomic_fixed1_min_cpt
__kmpc_atomic_fixed1_mul
__kmpc_atomic_fixed1_mul_cpt
__kmpc_atomic_fixed1_mul_float8
__kmpc_atomic_fixed1_mul_fp
__kmpc_atomic_fixed1_neqv
__kmpc_atomic_fixed1_neqv_cpt
__kmpc_atomic_fixed1_orb
__kmpc_atomic_fixed1_orb_cpt
__kmpc_atomic_fixed1_orl
__kmpc_atomic_fixed1_orl_cpt
__kmpc_atomic_fixed1_rd
__kmpc_atomic_fixed1_shl
__kmpc_atomic_fixed1_shl_cpt
__kmpc_atomic_fixed1_shl_cpt_rev
__kmpc_atomic_fixed1_shl_rev
__kmpc_atomic_fixed1_shr
__kmpc_atomic_fixed1_shr_cpt
__kmpc_atomic_fixed1_shr_cpt_rev
__kmpc_atomic_fixed1_shr_rev
__kmpc_atomic_fixed1_sub
__kmpc_atomic_fixed1_sub_cpt
__kmpc_atomic_fixed1_sub_cpt_rev
__kmpc_atomic_fixed1_sub_fp
__kmpc_atomic_fixed1_sub_rev
__kmpc_atomic_fixed1_swp
__kmpc_atomic_fixed1_wr
__kmpc_atomic_fixed1_xor
__kmpc_atomic_fixed1_xor_cpt
__kmpc_atomic_fixed1u_div
__kmpc_atomic_fixed1u_div_cpt
__kmpc_atomic_fixed1u_div_cpt_rev
__kmpc_atomic_fixed1u_div_fp
__kmpc_atomic_fixed1u_div_rev
__kmpc_atomic_fixed1u_shr
__kmpc_atomic_fixed1u_shr_cpt
__kmpc_atomic_fixed1u_shr_cpt_rev
__kmpc_atomic_fixed1u_shr_rev
__kmpc_atomic_fixed2_add
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
16 Module Documentation
__kmpc_atomic_fixed2_add_cpt
__kmpc_atomic_fixed2_add_fp
__kmpc_atomic_fixed2_andb
__kmpc_atomic_fixed2_andb_cpt
__kmpc_atomic_fixed2_andl
__kmpc_atomic_fixed2_andl_cpt
__kmpc_atomic_fixed2_div
__kmpc_atomic_fixed2_div_cpt
__kmpc_atomic_fixed2_div_cpt_rev
__kmpc_atomic_fixed2_div_float8
__kmpc_atomic_fixed2_div_fp
__kmpc_atomic_fixed2_div_rev
__kmpc_atomic_fixed2_eqv
__kmpc_atomic_fixed2_eqv_cpt
__kmpc_atomic_fixed2_max
__kmpc_atomic_fixed2_max_cpt
__kmpc_atomic_fixed2_min
__kmpc_atomic_fixed2_min_cpt
__kmpc_atomic_fixed2_mul
__kmpc_atomic_fixed2_mul_cpt
__kmpc_atomic_fixed2_mul_float8
__kmpc_atomic_fixed2_mul_fp
__kmpc_atomic_fixed2_neqv
__kmpc_atomic_fixed2_neqv_cpt
__kmpc_atomic_fixed2_orb
__kmpc_atomic_fixed2_orb_cpt
__kmpc_atomic_fixed2_orl
__kmpc_atomic_fixed2_orl_cpt
__kmpc_atomic_fixed2_rd
__kmpc_atomic_fixed2_shl
__kmpc_atomic_fixed2_shl_cpt
__kmpc_atomic_fixed2_shl_cpt_rev
__kmpc_atomic_fixed2_shl_rev
__kmpc_atomic_fixed2_shr
__kmpc_atomic_fixed2_shr_cpt
__kmpc_atomic_fixed2_shr_cpt_rev
__kmpc_atomic_fixed2_shr_rev
__kmpc_atomic_fixed2_sub
__kmpc_atomic_fixed2_sub_cpt
__kmpc_atomic_fixed2_sub_cpt_rev
__kmpc_atomic_fixed2_sub_fp
__kmpc_atomic_fixed2_sub_rev
__kmpc_atomic_fixed2_swp
__kmpc_atomic_fixed2_wr
__kmpc_atomic_fixed2_xor
__kmpc_atomic_fixed2_xor_cpt
__kmpc_atomic_fixed2u_div
__kmpc_atomic_fixed2u_div_cpt
__kmpc_atomic_fixed2u_div_cpt_rev
__kmpc_atomic_fixed2u_div_fp
__kmpc_atomic_fixed2u_div_rev
__kmpc_atomic_fixed2u_shr
__kmpc_atomic_fixed2u_shr_cpt
__kmpc_atomic_fixed2u_shr_cpt_rev
__kmpc_atomic_fixed2u_shr_rev
__kmpc_atomic_fixed4_add
__kmpc_atomic_fixed4_add_cpt
__kmpc_atomic_fixed4_add_fp
__kmpc_atomic_fixed4_andb
__kmpc_atomic_fixed4_andb_cpt
__kmpc_atomic_fixed4_andl
__kmpc_atomic_fixed4_andl_cpt
__kmpc_atomic_fixed4_div
__kmpc_atomic_fixed4_div_cpt
__kmpc_atomic_fixed4_div_cpt_rev
__kmpc_atomic_fixed4_div_float8
__kmpc_atomic_fixed4_div_fp
__kmpc_atomic_fixed4_div_rev
__kmpc_atomic_fixed4_eqv
__kmpc_atomic_fixed4_eqv_cpt
__kmpc_atomic_fixed4_max
__kmpc_atomic_fixed4_max_cpt
__kmpc_atomic_fixed4_min
__kmpc_atomic_fixed4_min_cpt
__kmpc_atomic_fixed4_mul
__kmpc_atomic_fixed4_mul_cpt
__kmpc_atomic_fixed4_mul_float8
__kmpc_atomic_fixed4_mul_fp
__kmpc_atomic_fixed4_neqv
__kmpc_atomic_fixed4_neqv_cpt
__kmpc_atomic_fixed4_orb
__kmpc_atomic_fixed4_orb_cpt
__kmpc_atomic_fixed4_orl
__kmpc_atomic_fixed4_orl_cpt
__kmpc_atomic_fixed4_rd
__kmpc_atomic_fixed4_shl
__kmpc_atomic_fixed4_shl_cpt
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.1 Atomic Operations 17
__kmpc_atomic_fixed4_shl_cpt_rev
__kmpc_atomic_fixed4_shl_rev
__kmpc_atomic_fixed4_shr
__kmpc_atomic_fixed4_shr_cpt
__kmpc_atomic_fixed4_shr_cpt_rev
__kmpc_atomic_fixed4_shr_rev
__kmpc_atomic_fixed4_sub
__kmpc_atomic_fixed4_sub_cpt
__kmpc_atomic_fixed4_sub_cpt_rev
__kmpc_atomic_fixed4_sub_fp
__kmpc_atomic_fixed4_sub_rev
__kmpc_atomic_fixed4_swp
__kmpc_atomic_fixed4_wr
__kmpc_atomic_fixed4_xor
__kmpc_atomic_fixed4_xor_cpt
__kmpc_atomic_fixed4u_div
__kmpc_atomic_fixed4u_div_cpt
__kmpc_atomic_fixed4u_div_cpt_rev
__kmpc_atomic_fixed4u_div_fp
__kmpc_atomic_fixed4u_div_rev
__kmpc_atomic_fixed4u_shr
__kmpc_atomic_fixed4u_shr_cpt
__kmpc_atomic_fixed4u_shr_cpt_rev
__kmpc_atomic_fixed4u_shr_rev
__kmpc_atomic_fixed8_add
__kmpc_atomic_fixed8_add_cpt
__kmpc_atomic_fixed8_add_fp
__kmpc_atomic_fixed8_andb
__kmpc_atomic_fixed8_andb_cpt
__kmpc_atomic_fixed8_andl
__kmpc_atomic_fixed8_andl_cpt
__kmpc_atomic_fixed8_div
__kmpc_atomic_fixed8_div_cpt
__kmpc_atomic_fixed8_div_cpt_rev
__kmpc_atomic_fixed8_div_float8
__kmpc_atomic_fixed8_div_fp
__kmpc_atomic_fixed8_div_rev
__kmpc_atomic_fixed8_eqv
__kmpc_atomic_fixed8_eqv_cpt
__kmpc_atomic_fixed8_max
__kmpc_atomic_fixed8_max_cpt
__kmpc_atomic_fixed8_min
__kmpc_atomic_fixed8_min_cpt
__kmpc_atomic_fixed8_mul
__kmpc_atomic_fixed8_mul_cpt
__kmpc_atomic_fixed8_mul_float8
__kmpc_atomic_fixed8_mul_fp
__kmpc_atomic_fixed8_neqv
__kmpc_atomic_fixed8_neqv_cpt
__kmpc_atomic_fixed8_orb
__kmpc_atomic_fixed8_orb_cpt
__kmpc_atomic_fixed8_orl
__kmpc_atomic_fixed8_orl_cpt
__kmpc_atomic_fixed8_rd
__kmpc_atomic_fixed8_shl
__kmpc_atomic_fixed8_shl_cpt
__kmpc_atomic_fixed8_shl_cpt_rev
__kmpc_atomic_fixed8_shl_rev
__kmpc_atomic_fixed8_shr
__kmpc_atomic_fixed8_shr_cpt
__kmpc_atomic_fixed8_shr_cpt_rev
__kmpc_atomic_fixed8_shr_rev
__kmpc_atomic_fixed8_sub
__kmpc_atomic_fixed8_sub_cpt
__kmpc_atomic_fixed8_sub_cpt_rev
__kmpc_atomic_fixed8_sub_fp
__kmpc_atomic_fixed8_sub_rev
__kmpc_atomic_fixed8_swp
__kmpc_atomic_fixed8_wr
__kmpc_atomic_fixed8_xor
__kmpc_atomic_fixed8_xor_cpt
__kmpc_atomic_fixed8u_div
__kmpc_atomic_fixed8u_div_cpt
__kmpc_atomic_fixed8u_div_cpt_rev
__kmpc_atomic_fixed8u_div_fp
__kmpc_atomic_fixed8u_div_rev
__kmpc_atomic_fixed8u_shr
__kmpc_atomic_fixed8u_shr_cpt
__kmpc_atomic_fixed8u_shr_cpt_rev
__kmpc_atomic_fixed8u_shr_rev
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
18 Module Documentation
There are versions here for floating point numbers of size 4, 8, 10 and 16 bytes. (Ten byte floats are used by X87,
but are now rare).
__kmpc_atomic_float4_add
__kmpc_atomic_float4_add_cpt
__kmpc_atomic_float4_add_float8
__kmpc_atomic_float4_add_fp
__kmpc_atomic_float4_div
__kmpc_atomic_float4_div_cpt
__kmpc_atomic_float4_div_cpt_rev
__kmpc_atomic_float4_div_float8
__kmpc_atomic_float4_div_fp
__kmpc_atomic_float4_div_rev
__kmpc_atomic_float4_max
__kmpc_atomic_float4_max_cpt
__kmpc_atomic_float4_min
__kmpc_atomic_float4_min_cpt
__kmpc_atomic_float4_mul
__kmpc_atomic_float4_mul_cpt
__kmpc_atomic_float4_mul_float8
__kmpc_atomic_float4_mul_fp
__kmpc_atomic_float4_rd
__kmpc_atomic_float4_sub
__kmpc_atomic_float4_sub_cpt
__kmpc_atomic_float4_sub_cpt_rev
__kmpc_atomic_float4_sub_float8
__kmpc_atomic_float4_sub_fp
__kmpc_atomic_float4_sub_rev
__kmpc_atomic_float4_swp
__kmpc_atomic_float4_wr
__kmpc_atomic_float8_add
__kmpc_atomic_float8_add_cpt
__kmpc_atomic_float8_add_fp
__kmpc_atomic_float8_div
__kmpc_atomic_float8_div_cpt
__kmpc_atomic_float8_div_cpt_rev
__kmpc_atomic_float8_div_fp
__kmpc_atomic_float8_div_rev
__kmpc_atomic_float8_max
__kmpc_atomic_float8_max_cpt
__kmpc_atomic_float8_min
__kmpc_atomic_float8_min_cpt
__kmpc_atomic_float8_mul
__kmpc_atomic_float8_mul_cpt
__kmpc_atomic_float8_mul_fp
__kmpc_atomic_float8_rd
__kmpc_atomic_float8_sub
__kmpc_atomic_float8_sub_cpt
__kmpc_atomic_float8_sub_cpt_rev
__kmpc_atomic_float8_sub_fp
__kmpc_atomic_float8_sub_rev
__kmpc_atomic_float8_swp
__kmpc_atomic_float8_wr
__kmpc_atomic_float10_add
__kmpc_atomic_float10_add_cpt
__kmpc_atomic_float10_add_fp
__kmpc_atomic_float10_div
__kmpc_atomic_float10_div_cpt
__kmpc_atomic_float10_div_cpt_rev
__kmpc_atomic_float10_div_fp
__kmpc_atomic_float10_div_rev
__kmpc_atomic_float10_mul
__kmpc_atomic_float10_mul_cpt
__kmpc_atomic_float10_mul_fp
__kmpc_atomic_float10_rd
__kmpc_atomic_float10_sub
__kmpc_atomic_float10_sub_cpt
__kmpc_atomic_float10_sub_cpt_rev
__kmpc_atomic_float10_sub_fp
__kmpc_atomic_float10_sub_rev
__kmpc_atomic_float10_swp
__kmpc_atomic_float10_wr
__kmpc_atomic_float16_add
__kmpc_atomic_float16_add_cpt
__kmpc_atomic_float16_div
__kmpc_atomic_float16_div_cpt
__kmpc_atomic_float16_div_cpt_rev
__kmpc_atomic_float16_div_rev
__kmpc_atomic_float16_max
__kmpc_atomic_float16_max_cpt
__kmpc_atomic_float16_min
__kmpc_atomic_float16_min_cpt
__kmpc_atomic_float16_mul
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.1 Atomic Operations 19
__kmpc_atomic_float16_mul_cpt
__kmpc_atomic_float16_rd
__kmpc_atomic_float16_sub
__kmpc_atomic_float16_sub_cpt
__kmpc_atomic_float16_sub_cpt_rev
__kmpc_atomic_float16_sub_rev
__kmpc_atomic_float16_swp
__kmpc_atomic_float16_wr
Functions for complex types whose component floating point variables are of size 4,8,10 or 16 bytes. The names
here are based on the size of the component float, not the size of the complex type. So __kmpc_atomc_-
cmplx8_add is an operation on a complex<double> or complex(kind=8), not complex<float>.
__kmpc_atomic_cmplx4_add
__kmpc_atomic_cmplx4_add_cmplx8
__kmpc_atomic_cmplx4_add_cpt
__kmpc_atomic_cmplx4_div
__kmpc_atomic_cmplx4_div_cmplx8
__kmpc_atomic_cmplx4_div_cpt
__kmpc_atomic_cmplx4_div_cpt_rev
__kmpc_atomic_cmplx4_div_rev
__kmpc_atomic_cmplx4_mul
__kmpc_atomic_cmplx4_mul_cmplx8
__kmpc_atomic_cmplx4_mul_cpt
__kmpc_atomic_cmplx4_rd
__kmpc_atomic_cmplx4_sub
__kmpc_atomic_cmplx4_sub_cmplx8
__kmpc_atomic_cmplx4_sub_cpt
__kmpc_atomic_cmplx4_sub_cpt_rev
__kmpc_atomic_cmplx4_sub_rev
__kmpc_atomic_cmplx4_swp
__kmpc_atomic_cmplx4_wr
__kmpc_atomic_cmplx8_add
__kmpc_atomic_cmplx8_add_cpt
__kmpc_atomic_cmplx8_div
__kmpc_atomic_cmplx8_div_cpt
__kmpc_atomic_cmplx8_div_cpt_rev
__kmpc_atomic_cmplx8_div_rev
__kmpc_atomic_cmplx8_mul
__kmpc_atomic_cmplx8_mul_cpt
__kmpc_atomic_cmplx8_rd
__kmpc_atomic_cmplx8_sub
__kmpc_atomic_cmplx8_sub_cpt
__kmpc_atomic_cmplx8_sub_cpt_rev
__kmpc_atomic_cmplx8_sub_rev
__kmpc_atomic_cmplx8_swp
__kmpc_atomic_cmplx8_wr
__kmpc_atomic_cmplx10_add
__kmpc_atomic_cmplx10_add_cpt
__kmpc_atomic_cmplx10_div
__kmpc_atomic_cmplx10_div_cpt
__kmpc_atomic_cmplx10_div_cpt_rev
__kmpc_atomic_cmplx10_div_rev
__kmpc_atomic_cmplx10_mul
__kmpc_atomic_cmplx10_mul_cpt
__kmpc_atomic_cmplx10_rd
__kmpc_atomic_cmplx10_sub
__kmpc_atomic_cmplx10_sub_cpt
__kmpc_atomic_cmplx10_sub_cpt_rev
__kmpc_atomic_cmplx10_sub_rev
__kmpc_atomic_cmplx10_swp
__kmpc_atomic_cmplx10_wr
__kmpc_atomic_cmplx16_add
__kmpc_atomic_cmplx16_add_cpt
__kmpc_atomic_cmplx16_div
__kmpc_atomic_cmplx16_div_cpt
__kmpc_atomic_cmplx16_div_cpt_rev
__kmpc_atomic_cmplx16_div_rev
__kmpc_atomic_cmplx16_mul
__kmpc_atomic_cmplx16_mul_cpt
__kmpc_atomic_cmplx16_rd
__kmpc_atomic_cmplx16_sub
__kmpc_atomic_cmplx16_sub_cpt
__kmpc_atomic_cmplx16_sub_cpt_rev
__kmpc_atomic_cmplx16_swp
__kmpc_atomic_cmplx16_wr
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
20 Module Documentation
The definitions and functions here implement the lowest level thread synchronizations of suspending a thread and
awaking it. They are used to build higher level operations such as barriers and fork/join.
Enumerator
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.3 Basic Types 21
Values for bit flags used in the ident_t to describe the fields.
Use trampoline for internal microtasks
Definition at line 170 of file kmp.h.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
22 Module Documentation
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.4 Deprecated Functions 23
Functions
Functions in this group are for backwards compatibility only, and should not be used in new code.
Parameters
loc location description
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
24 Module Documentation
Functions
Parameters
loc in source location information
flags in for future use (currently ignored)
Initialize the runtime library. This call is optional; if it is not made then it will be implicitly called by attempts to use
other library functions.
Definition at line 46 of file kmp_csupport.c.
Parameters
loc source location information
Shutdown the runtime library. This is also optional, and even if called will not do anything unless the KMP_IGNO-
RE_MPPEND environment variable is set to zero.
Definition at line 64 of file kmp_csupport.c.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.6 Parallel (fork/join) 25
Typedefs
Functions
5.6.2.1 typedef void(∗ kmpc micro)(kmp int32 ∗global tid, kmp int32 ∗bound tid,...)
The type for a microtask which gets passed to __kmpc_fork_call(). The arguments to the outlined function are
Parameters
global_tid the global thread identity of the thread executing the function.
bound_tid the local identitiy of the thread executing the function
... pointers to shared variables accessed by the function.
5.6.3.1 void kmpc end serialized parallel ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information
global_tid global thread number
5.6.3.2 void kmpc fork call ( ident_t ∗ loc, kmp int32 argc, kmpc_micro microtask, ... )
Parameters
loc source location information
argc total number of arguments in the ellipsis
microtask pointer to callback routine consisting of outlined parallel construct
... pointers to shared variables that aren’t global
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
26 Module Documentation
Do the actual fork and call the microtask in the relevant number of threads.
Definition at line 281 of file kmp_csupport.c.
5.6.3.3 void kmpc fork teams ( ident_t ∗ loc, kmp int32 argc, kmpc_micro microtask, ... )
Parameters
loc source location information
argc total number of arguments in the ellipsis
microtask pointer to callback routine consisting of outlined teams construct
... pointers to shared variables that aren’t global
Do the actual fork and call the microtask in the relevant number of threads.
Definition at line 385 of file kmp_csupport.c.
5.6.3.4 void kmpc push num teams ( ident_t ∗ loc, kmp int32 global tid, kmp int32 num teams, kmp int32 num threads )
Parameters
loc source location information
global_tid global thread number
num_teams number of teams requested for the teams construct
num_threads number of threads per team requested for the teams construct
Set the number of teams to be used by the teams construct. This call is only required if the teams construct has a
num_teams clause or a thread_limit clause (or both).
Definition at line 367 of file kmp_csupport.c.
5.6.3.5 void kmpc push num threads ( ident_t ∗ loc, kmp int32 global tid, kmp int32 num threads )
Parameters
loc source location information
global_tid global thread number
num_threads number of threads requested for this parallel construct
Set the number of threads to be used by the next fork spawned by this thread. This call is only required if the parallel
construct has a num_threads clause.
Definition at line 240 of file kmp_csupport.c.
5.6.3.6 void kmpc serialized parallel ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information
global_tid global thread number
Enter a serialized parallel construct. This interface is used to handle a conditional parallel region, like this,
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.7 Thread Information 27
Functions
Parameters
loc Source location information.
Returns
Parameters
loc Source location information.
Returns
The thread number of the calling thread in the innermost active parallel construct.
Parameters
loc Source location information.
Returns
This function can be called in any context. It returns the total number of threads under the control of the OpenMP
runtime. That is not a number that can be determined by any OpenMP standard calls, since the library may be
called from more than one non-OpenMP thread, and this reflects the total over all such calls. Similarly the runtime
maintains underlying threads even when they are not active (since the cost of creating and destroying OS threads
is high), this call counts all such threads even if they are not waiting for work.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
28 Module Documentation
Parameters
loc Source location information.
Returns
Parameters
loc Source location information.
Returns
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.8 Work Sharing 29
Enumerations
• enum sched_type {
kmp_sch_lower = 32 , kmp_sch_static = 34 , kmp_sch_guided_chunked = 36 , kmp_sch_auto = 38 ,
kmp_sch_static_steal = 44, kmp_sch_upper = 45, kmp_ord_lower = 64 , kmp_ord_static = 66 ,
kmp_ord_auto = 70 , kmp_ord_upper = 72, kmp_distribute_static_chunked = 91, kmp_distribute_static = 92,
kmp_nm_lower = 160 , kmp_nm_static = 162 , kmp_nm_guided_chunked = 164 , kmp_nm_auto = 166 ,
kmp_nm_ord_static = 194 , kmp_nm_ord_auto = 198 , kmp_nm_upper = 200, kmp_sch_default = kmp_sch-
_static }
Functions
• void __kmpc_dispatch_init_4 (ident_t ∗loc, kmp_int32 gtid, enum sched_type schedule, kmp_int32 lb, kmp_-
int32 ub, kmp_int32 st, kmp_int32 chunk)
• void __kmpc_dispatch_init_4u (ident_t ∗loc, kmp_int32 gtid, enum sched_type schedule, kmp_uint32 lb, kmp-
_uint32 ub, kmp_int32 st, kmp_int32 chunk)
• void __kmpc_dispatch_init_8 (ident_t ∗loc, kmp_int32 gtid, enum sched_type schedule, kmp_int64 lb, kmp_-
int64 ub, kmp_int64 st, kmp_int64 chunk)
• void __kmpc_dispatch_init_8u (ident_t ∗loc, kmp_int32 gtid, enum sched_type schedule, kmp_uint64 lb, kmp-
_uint64 ub, kmp_int64 st, kmp_int64 chunk)
• void __kmpc_dist_dispatch_init_4 (ident_t ∗loc, kmp_int32 gtid, enum sched_type schedule, kmp_int32 ∗p_-
last, kmp_int32 lb, kmp_int32 ub, kmp_int32 st, kmp_int32 chunk)
• int __kmpc_dispatch_next_4 (ident_t ∗loc, kmp_int32 gtid, kmp_int32 ∗p_last, kmp_int32 ∗p_lb, kmp_int32
∗p_ub, kmp_int32 ∗p_st)
• int __kmpc_dispatch_next_4u (ident_t ∗loc, kmp_int32 gtid, kmp_int32 ∗p_last, kmp_uint32 ∗p_lb, kmp_-
uint32 ∗p_ub, kmp_int32 ∗p_st)
• int __kmpc_dispatch_next_8 (ident_t ∗loc, kmp_int32 gtid, kmp_int32 ∗p_last, kmp_int64 ∗p_lb, kmp_int64
∗p_ub, kmp_int64 ∗p_st)
• int __kmpc_dispatch_next_8u (ident_t ∗loc, kmp_int32 gtid, kmp_int32 ∗p_last, kmp_uint64 ∗p_lb, kmp_-
uint64 ∗p_ub, kmp_int64 ∗p_st)
• void __kmpc_dispatch_fini_4 (ident_t ∗loc, kmp_int32 gtid)
• void __kmpc_dispatch_fini_8 (ident_t ∗loc, kmp_int32 gtid)
• void __kmpc_dispatch_fini_4u (ident_t ∗loc, kmp_int32 gtid)
• void __kmpc_dispatch_fini_8u (ident_t ∗loc, kmp_int32 gtid)
• void __kmpc_for_static_init_4 (ident_t ∗loc, kmp_int32 gtid, kmp_int32 schedtype, kmp_int32 ∗plastiter, kmp-
_int32 ∗plower, kmp_int32 ∗pupper, kmp_int32 ∗pstride, kmp_int32 incr, kmp_int32 chunk)
• void __kmpc_for_static_init_4u (ident_t ∗loc, kmp_int32 gtid, kmp_int32 schedtype, kmp_int32 ∗plastiter,
kmp_uint32 ∗plower, kmp_uint32 ∗pupper, kmp_int32 ∗pstride, kmp_int32 incr, kmp_int32 chunk)
• void __kmpc_for_static_init_8 (ident_t ∗loc, kmp_int32 gtid, kmp_int32 schedtype, kmp_int32 ∗plastiter, kmp-
_int64 ∗plower, kmp_int64 ∗pupper, kmp_int64 ∗pstride, kmp_int64 incr, kmp_int64 chunk)
• void __kmpc_for_static_init_8u (ident_t ∗loc, kmp_int32 gtid, kmp_int32 schedtype, kmp_int32 ∗plastiter,
kmp_uint64 ∗plower, kmp_uint64 ∗pupper, kmp_int64 ∗pstride, kmp_int64 incr, kmp_int64 chunk)
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
30 Module Documentation
• void __kmpc_dist_for_static_init_4 (ident_t ∗loc, kmp_int32 gtid, kmp_int32 schedule, kmp_int32 ∗plastiter,
kmp_int32 ∗plower, kmp_int32 ∗pupper, kmp_int32 ∗pupperD, kmp_int32 ∗pstride, kmp_int32 incr, kmp_int32
chunk)
• void __kmpc_dist_for_static_init_4u (ident_t ∗loc, kmp_int32 gtid, kmp_int32 schedule, kmp_int32 ∗plastiter,
kmp_uint32 ∗plower, kmp_uint32 ∗pupper, kmp_uint32 ∗pupperD, kmp_int32 ∗pstride, kmp_int32 incr, kmp-
_int32 chunk)
• void __kmpc_dist_for_static_init_8 (ident_t ∗loc, kmp_int32 gtid, kmp_int32 schedule, kmp_int32 ∗plastiter,
kmp_int64 ∗plower, kmp_int64 ∗pupper, kmp_int64 ∗pupperD, kmp_int64 ∗pstride, kmp_int64 incr, kmp_int64
chunk)
• void __kmpc_dist_for_static_init_8u (ident_t ∗loc, kmp_int32 gtid, kmp_int32 schedule, kmp_int32 ∗plastiter,
kmp_uint64 ∗plower, kmp_uint64 ∗pupper, kmp_uint64 ∗pupperD, kmp_int64 ∗pstride, kmp_int64 incr, kmp-
_int64 chunk)
• void __kmpc_team_static_init_4 (ident_t ∗loc, kmp_int32 gtid, kmp_int32 ∗p_last, kmp_int32 ∗p_lb, kmp_-
int32 ∗p_ub, kmp_int32 ∗p_st, kmp_int32 incr, kmp_int32 chunk)
• void __kmpc_team_static_init_4u (ident_t ∗loc, kmp_int32 gtid, kmp_int32 ∗p_last, kmp_uint32 ∗p_lb, kmp_-
uint32 ∗p_ub, kmp_int32 ∗p_st, kmp_int32 incr, kmp_int32 chunk)
• void __kmpc_team_static_init_8 (ident_t ∗loc, kmp_int32 gtid, kmp_int32 ∗p_last, kmp_int64 ∗p_lb, kmp_-
int64 ∗p_ub, kmp_int64 ∗p_st, kmp_int64 incr, kmp_int64 chunk)
• void __kmpc_team_static_init_8u (ident_t ∗loc, kmp_int32 gtid, kmp_int32 ∗p_last, kmp_uint64 ∗p_lb, kmp_-
uint64 ∗p_ub, kmp_int64 ∗p_st, kmp_int64 incr, kmp_int64 chunk)
These functions are used for implementing #pragma omp for, #pragma omp sections, #pragma omp
single and #pragma omp master constructs.
When handling loops, there are different functions for each of the signed and unsigned 32 and 64 bit integer types
which have the name suffixes _4, _4u, _8 and _8u. The semantics of each of the functions is the same, so they
are only described once.
Static loop scheduling is handled by __kmpc_for_static_init_4 and friends. Only a single call is needed, since the
iterations to be executed by any give thread can be determined as soon as the loop parameters are known.
Dynamic scheduling is handled by the __kmpc_dispatch_init_4 and __kmpc_dispatch_next_4 functions. The init
function is called once in each thread outside the loop, while the next function is called each time that the previous
chunk of work has been exhausted.
Enumerator
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.8 Work Sharing 31
5.8.3.1 void kmpc critical ( ident_t ∗ loc, kmp int32 global tid, kmp critical name ∗ crit )
Parameters
loc source location information.
global_tid global thread number .
crit identity of the critical section. This could be a pointer to a lock associated with the critical
section, or some other suitably unique value.
Enter code protected by a critical construct. This function blocks until the executing thread can enter the critical
section.
Definition at line 1119 of file kmp_csupport.c.
5.8.3.2 void kmpc dispatch fini 4 ( ident_t ∗ loc, kmp int32 gtid )
Parameters
loc Source code location
gtid Global thread id
5.8.3.3 void kmpc dispatch fini 4u ( ident_t ∗ loc, kmp int32 gtid )
See __kmpc_dispatch_fini_4
Definition at line 2476 of file kmp_dispatch.cpp.
5.8.3.4 void kmpc dispatch fini 8 ( ident_t ∗ loc, kmp int32 gtid )
See __kmpc_dispatch_fini_4
Definition at line 2467 of file kmp_dispatch.cpp.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
32 Module Documentation
5.8.3.5 void kmpc dispatch fini 8u ( ident_t ∗ loc, kmp int32 gtid )
See __kmpc_dispatch_fini_4
Definition at line 2485 of file kmp_dispatch.cpp.
5.8.3.6 void kmpc dispatch init 4 ( ident_t ∗ loc, kmp int32 gtid, enum sched_type schedule, kmp int32 lb, kmp int32
ub, kmp int32 st, kmp int32 chunk )
Parameters
loc Source location
gtid Global thread id
schedule Schedule type
lb Lower bound
ub Upper bound
st Step (or increment if you prefer)
chunk The chunk size to block with
This function prepares the runtime to start a dynamically scheduled for loop, saving the loop arguments. These
functions are all identical apart from the types of the arguments.
Definition at line 2316 of file kmp_dispatch.cpp.
5.8.3.7 void kmpc dispatch init 4u ( ident_t ∗ loc, kmp int32 gtid, enum sched_type schedule, kmp uint32 lb,
kmp uint32 ub, kmp int32 st, kmp int32 chunk )
See __kmpc_dispatch_init_4
Definition at line 2326 of file kmp_dispatch.cpp.
5.8.3.8 void kmpc dispatch init 8 ( ident_t ∗ loc, kmp int32 gtid, enum sched_type schedule, kmp int64 lb, kmp int64
ub, kmp int64 st, kmp int64 chunk )
See __kmpc_dispatch_init_4
Definition at line 2337 of file kmp_dispatch.cpp.
5.8.3.9 void kmpc dispatch init 8u ( ident_t ∗ loc, kmp int32 gtid, enum sched_type schedule, kmp uint64 lb,
kmp uint64 ub, kmp int64 st, kmp int64 chunk )
See __kmpc_dispatch_init_4
Definition at line 2349 of file kmp_dispatch.cpp.
5.8.3.10 int kmpc dispatch next 4 ( ident_t ∗ loc, kmp int32 gtid, kmp int32 ∗ p last, kmp int32 ∗ p lb, kmp int32 ∗ p ub,
kmp int32 ∗ p st )
Parameters
loc Source code location
gtid Global thread id
p_last Pointer to a flag set to one if this is the last chunk or zero otherwise
p_lb Pointer to the lower bound for the next chunk of work
p_ub Pointer to the upper bound for the next chunk of work
p_st Pointer to the stride for the next chunk of work
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.8 Work Sharing 33
Returns
Get the next dynamically allocated chunk of work for this thread. If there is no more work, then the lb,ub and stride
need not be modified.
Definition at line 2415 of file kmp_dispatch.cpp.
5.8.3.11 int kmpc dispatch next 4u ( ident_t ∗ loc, kmp int32 gtid, kmp int32 ∗ p last, kmp uint32 ∗ p lb, kmp uint32 ∗
p ub, kmp int32 ∗ p st )
See __kmpc_dispatch_next_4
Definition at line 2425 of file kmp_dispatch.cpp.
5.8.3.12 int kmpc dispatch next 8 ( ident_t ∗ loc, kmp int32 gtid, kmp int32 ∗ p last, kmp int64 ∗ p lb, kmp int64 ∗ p ub,
kmp int64 ∗ p st )
See __kmpc_dispatch_next_4
Definition at line 2435 of file kmp_dispatch.cpp.
5.8.3.13 int kmpc dispatch next 8u ( ident_t ∗ loc, kmp int32 gtid, kmp int32 ∗ p last, kmp uint64 ∗ p lb, kmp uint64 ∗
p ub, kmp int64 ∗ p st )
See __kmpc_dispatch_next_4
Definition at line 2445 of file kmp_dispatch.cpp.
5.8.3.14 void kmpc dist dispatch init 4 ( ident_t ∗ loc, kmp int32 gtid, enum sched_type schedule, kmp int32 ∗ p last,
kmp int32 lb, kmp int32 ub, kmp int32 st, kmp int32 chunk )
See __kmpc_dispatch_init_4
Difference from __kmpc_dispatch_init set of functions is these functions are called for composite distribute parallel
for construct. Thus before regular iterations dispatching we need to calc per-team iteration space.
These functions are all identical apart from the types of the arguments.
Definition at line 2367 of file kmp_dispatch.cpp.
5.8.3.15 void kmpc dist for static init 4 ( ident_t ∗ loc, kmp int32 gtid, kmp int32 schedule, kmp int32 ∗ plastiter,
kmp int32 ∗ plower, kmp int32 ∗ pupper, kmp int32 ∗ pupperD, kmp int32 ∗ pstride, kmp int32 incr, kmp int32
chunk )
Parameters
loc Source code location
gtid Global thread id of this thread
schedule Scheduling type for the parallel loop
plastiter Pointer to the "last iteration" flag
plower Pointer to the lower bound
pupper Pointer to the upper bound of loop chunk
pupperD Pointer to the upper bound of dist_chunk
pstride Pointer to the stride for parallel loop
incr Loop increment
chunk The chunk size for the parallel loop
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
34 Module Documentation
Each of the four functions here are identical apart from the argument types.
The functions compute the upper and lower bounds and strides to be used for the set of iterations to be executed
by the current thread from the statically scheduled loop that is described by the initial values of the bounds, strides,
increment and chunks for parallel loop and distribute constructs.
Definition at line 809 of file kmp_sched.cpp.
5.8.3.16 void kmpc dist for static init 4u ( ident_t ∗ loc, kmp int32 gtid, kmp int32 schedule, kmp int32 ∗ plastiter,
kmp uint32 ∗ plower, kmp uint32 ∗ pupper, kmp uint32 ∗ pupperD, kmp int32 ∗ pstride, kmp int32 incr, kmp int32
chunk )
See __kmpc_dist_for_static_init_4
Definition at line 822 of file kmp_sched.cpp.
5.8.3.17 void kmpc dist for static init 8 ( ident_t ∗ loc, kmp int32 gtid, kmp int32 schedule, kmp int32 ∗ plastiter,
kmp int64 ∗ plower, kmp int64 ∗ pupper, kmp int64 ∗ pupperD, kmp int64 ∗ pstride, kmp int64 incr, kmp int64
chunk )
See __kmpc_dist_for_static_init_4
Definition at line 835 of file kmp_sched.cpp.
5.8.3.18 void kmpc dist for static init 8u ( ident_t ∗ loc, kmp int32 gtid, kmp int32 schedule, kmp int32 ∗ plastiter,
kmp uint64 ∗ plower, kmp uint64 ∗ pupper, kmp uint64 ∗ pupperD, kmp int64 ∗ pstride, kmp int64 incr, kmp int64
chunk )
See __kmpc_dist_for_static_init_4
Definition at line 848 of file kmp_sched.cpp.
5.8.3.19 void kmpc end critical ( ident_t ∗ loc, kmp int32 global tid, kmp critical name ∗ crit )
Parameters
loc source location information.
global_tid global thread number .
crit identity of the critical section. This could be a pointer to a lock associated with the critical
section, or some other suitably unique value.
Leave a critical section, releasing any lock that was held during its execution.
Definition at line 1219 of file kmp_csupport.c.
5.8.3.20 void kmpc end master ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information.
global_tid global thread number .
Mark the end of a master region. This should only be called by the thread that executes the master region.
Definition at line 789 of file kmp_csupport.c.
5.8.3.21 void kmpc end ordered ( ident_t ∗ loc, kmp int32 gtid )
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.8 Work Sharing 35
Parameters
loc source location information.
gtid global thread number.
5.8.3.22 void kmpc end single ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information
global_tid global thread number
Mark the end of a single construct. This function should only be called by the thread that executed the block of
code protected by the single construct.
Definition at line 1456 of file kmp_csupport.c.
5.8.3.23 void kmpc for static fini ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc Source location
global_tid Global thread id
5.8.3.24 void kmpc for static init 4 ( ident_t ∗ loc, kmp int32 gtid, kmp int32 schedtype, kmp int32 ∗ plastiter, kmp int32
∗ plower, kmp int32 ∗ pupper, kmp int32 ∗ pstride, kmp int32 incr, kmp int32 chunk )
Parameters
loc Source code location
gtid Global thread id of this thread
schedtype Scheduling type
plastiter Pointer to the "last iteration" flag
plower Pointer to the lower bound
pupper Pointer to the upper bound
pstride Pointer to the stride
incr Loop increment
chunk The chunk size
Each of the four functions here are identical apart from the argument types.
The functions compute the upper and lower bounds and stride to be used for the set of iterations to be executed
by the current thread from the statically scheduled loop that is described by the initial values of the bounds, stride,
increment and chunk size.
Definition at line 739 of file kmp_sched.cpp.
5.8.3.25 void kmpc for static init 4u ( ident_t ∗ loc, kmp int32 gtid, kmp int32 schedtype, kmp int32 ∗ plastiter,
kmp uint32 ∗ plower, kmp uint32 ∗ pupper, kmp int32 ∗ pstride, kmp int32 incr, kmp int32 chunk )
See __kmpc_for_static_init_4
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
36 Module Documentation
5.8.3.26 void kmpc for static init 8 ( ident_t ∗ loc, kmp int32 gtid, kmp int32 schedtype, kmp int32 ∗ plastiter, kmp int64
∗ plower, kmp int64 ∗ pupper, kmp int64 ∗ pstride, kmp int64 incr, kmp int64 chunk )
See __kmpc_for_static_init_4
Definition at line 763 of file kmp_sched.cpp.
5.8.3.27 void kmpc for static init 8u ( ident_t ∗ loc, kmp int32 gtid, kmp int32 schedtype, kmp int32 ∗ plastiter,
kmp uint64 ∗ plower, kmp uint64 ∗ pupper, kmp int64 ∗ pstride, kmp int64 incr, kmp int64 chunk )
See __kmpc_for_static_init_4
Definition at line 775 of file kmp_sched.cpp.
5.8.3.28 kmp int32 kmpc master ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information.
global_tid global thread number .
Returns
Parameters
loc source location information.
gtid global thread number.
5.8.3.30 kmp int32 kmpc single ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information
global_tid global thread number
Returns
One if this thread should execute the single construct, zero otherwise.
Test whether to execute a single construct. There are no implicit barriers in the two "single" calls, rather the
compiler should introduce an explicit barrier if it is required.
Definition at line 1411 of file kmp_csupport.c.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.8 Work Sharing 37
5.8.3.31 void kmpc team static init 4 ( ident_t ∗ loc, kmp int32 gtid, kmp int32 ∗ p last, kmp int32 ∗ p lb, kmp int32 ∗
p ub, kmp int32 ∗ p st, kmp int32 incr, kmp int32 chunk )
Parameters
loc Source location
gtid Global thread id
p_last pointer to last iteration flag
p_lb pointer to Lower bound
p_ub pointer to Upper bound
p_st Step (or increment if you prefer)
incr Loop increment
chunk The chunk size to block with
The functions compute the upper and lower bounds and stride to be used for the set of iterations to be executed
by the current team from the statically scheduled loop that is described by the initial values of the bounds, stride,
increment and chunk for the distribute construct as part of composite distribute parallel loop construct. These
functions are all identical apart from the types of the arguments.
Definition at line 886 of file kmp_sched.cpp.
5.8.3.32 void kmpc team static init 4u ( ident_t ∗ loc, kmp int32 gtid, kmp int32 ∗ p last, kmp uint32 ∗ p lb, kmp uint32
∗ p ub, kmp int32 ∗ p st, kmp int32 incr, kmp int32 chunk )
See __kmpc_team_static_init_4
Definition at line 898 of file kmp_sched.cpp.
5.8.3.33 void kmpc team static init 8 ( ident_t ∗ loc, kmp int32 gtid, kmp int32 ∗ p last, kmp int64 ∗ p lb, kmp int64 ∗
p ub, kmp int64 ∗ p st, kmp int64 incr, kmp int64 chunk )
See __kmpc_team_static_init_4
Definition at line 910 of file kmp_sched.cpp.
5.8.3.34 void kmpc team static init 8u ( ident_t ∗ loc, kmp int32 gtid, kmp int32 ∗ p last, kmp uint64 ∗ p lb, kmp uint64
∗ p ub, kmp int64 ∗ p st, kmp int64 incr, kmp int64 chunk )
See __kmpc_team_static_init_4
Definition at line 922 of file kmp_sched.cpp.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
38 Module Documentation
5.9 Synchronization
Functions
5.9.2.1 void kmpc barrier ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information
global_tid thread id.
Execute a barrier.
Definition at line 697 of file kmp_csupport.c.
5.9.2.2 kmp int32 kmpc barrier master ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information
global_tid thread id.
Returns
one if the thread should execute the master block, zero otherwise
Start execution of a combined barrier and master. The barrier is executed inside this function.
Definition at line 1309 of file kmp_csupport.c.
5.9.2.3 kmp int32 kmpc barrier master nowait ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information
global_tid thread id.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.9 Synchronization 39
Returns
one if the thread should execute the master block, zero otherwise
Start execution of a combined barrier and master(nowait) construct. The barrier is executed inside this function.
There is no equivalent "end" function, since the
Definition at line 1357 of file kmp_csupport.c.
5.9.2.4 void kmpc end barrier master ( ident_t ∗ loc, kmp int32 global tid )
Parameters
loc source location information
global_tid thread id.
Complete the execution of a combined barrier and master. This function should only be called at the completion of
the master code. Other threads will still be waiting at the barrier and this call releases them.
Definition at line 1339 of file kmp_csupport.c.
5.9.2.5 void kmpc end reduce ( ident_t ∗ loc, kmp int32 global tid, kmp critical name ∗ lck )
Parameters
loc source location information
global_tid global thread id.
lck pointer to the unique lock data structure
Finish the execution of a blocking reduce. The lck pointer must be the same as that used in the corresponding
start function.
Definition at line 2761 of file kmp_csupport.c.
5.9.2.6 void kmpc end reduce nowait ( ident_t ∗ loc, kmp int32 global tid, kmp critical name ∗ lck )
Parameters
loc source location information
global_tid global thread id.
lck pointer to the unique lock data structure
Parameters
loc source location information.
Execute flush. This is implemented as a full memory fence. (Though depending on the memory ordering con-
vention obeyed by the compiler even that may not be necessary).
Definition at line 631 of file kmp_csupport.c.
5.9.2.8 kmp int32 kmpc reduce ( ident_t ∗ loc, kmp int32 global tid, kmp int32 num vars, size t reduce size, void ∗
reduce data, void(∗)(void ∗lhs data, void ∗rhs data) reduce func, kmp critical name ∗ lck )
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
40 Module Documentation
Parameters
loc source location information
global_tid global thread number
num_vars number of items (variables) to be reduced
reduce_size size of data in bytes to be reduced
reduce_data pointer to data to be reduced
reduce_func callback function providing reduction operation on two operands and returning result of reduc-
tion in lhs_data
lck pointer to the unique lock data structure
Returns
1 for the master thread, 0 for all other team threads, 2 for all team threads if atomic reduction needed
5.9.2.9 kmp int32 kmpc reduce nowait ( ident_t ∗ loc, kmp int32 global tid, kmp int32 num vars, size t reduce size, void
∗ reduce data, void(∗)(void ∗lhs data, void ∗rhs data) reduce func, kmp critical name ∗ lck )
Parameters
loc source location information
global_tid global thread number
num_vars number of items (variables) to be reduced
reduce_size size of data in bytes to be reduced
reduce_data pointer to data to be reduced
reduce_func callback function providing reduction operation on two operands and returning result of reduc-
tion in lhs_data
lck pointer to the unique lock data structure
Returns
1 for the master thread, 0 for all other team threads, 2 for all team threads if atomic reduction needed
The nowait version is used for a reduce clause with the nowait argument.
Definition at line 2477 of file kmp_csupport.c.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.10 Thread private data support 41
Functions
• void __kmpc_copyprivate (ident_t ∗loc, kmp_int32 gtid, size_t cpy_size, void ∗cpy_data, void(∗cpy_func)(void
∗, void ∗), kmp_int32 didit)
• void __kmpc_threadprivate_register (ident_t ∗loc, void ∗data, kmpc_ctor ctor, kmpc_cctor cctor, kmpc_dtor
dtor)
• void ∗ __kmpc_threadprivate_cached (ident_t ∗loc, kmp_int32 global_tid, void ∗data, size_t size, void
∗∗∗cache)
• void __kmpc_threadprivate_register_vec (ident_t ∗loc, void ∗data, kmpc_ctor_vec ctor, kmpc_cctor_vec cc-
tor, kmpc_dtor_vec dtor, size_t vector_length)
Array constructor. First argument is the this pointer Third argument the number of array elements.
Definition at line 1332 of file kmp.h.
Pointer to the constructor function. The first argument is the this pointer
Definition at line 1299 of file kmp.h.
Array constructor. First argument is the this pointer Second argument the number of array elements.
Definition at line 1320 of file kmp.h.
Pointer to the destructor function. The first argument is the this pointer
Definition at line 1305 of file kmp.h.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
42 Module Documentation
Pointer to the array destructor function. The first argument is the this pointer Second argument the number of
array elements.
Definition at line 1326 of file kmp.h.
5.10.3.1 void kmpc copyprivate ( ident_t ∗ loc, kmp int32 gtid, size t cpy size, void ∗ cpy data, void(∗)(void ∗, void ∗)
cpy func, kmp int32 didit )
Parameters
loc source location information
gtid global thread number
cpy_size size of the cpy_data buffer
cpy_data pointer to data to be copied
cpy_func helper function to call for copying data
didit flag variable: 1=single thread; 0=not single thread
__kmpc_copyprivate implements the interface for the private data broadcast needed for the copyprivate clause
associated with a single region in an OpenMP∗ program (both C and Fortran). All threads participating in the
parallel region call this routine. One of the threads (called the single thread) should have the didit variable set to
1 and all other threads should have that variable set to 0. All threads pass a pointer to a data buffer (cpy_data) that
they have built.
The OpenMP specification forbids the use of nowait on the single region when a copyprivate clause is present.
However, __kmpc_copyprivate implements a barrier internally to avoid race conditions, so the code generation for
the single region should avoid generating a barrier after the call to __kmpc_copyprivate.
The gtid parameter is the global thread id for the current thread. The loc parameter is a pointer to source
location information.
Internal implementation: The single thread will first copy its descriptor address (cpy_data) to a team-private location,
then the other threads will each call the function pointed to by the parameter cpy_func, which carries out the copy
by copying the data using the cpy_data buffer.
The cpy_func routine used for the copy and the contents of the data area defined by cpy_data and cpy_size may
be built in any fashion that will allow the copy to be done. For instance, the cpy_data buffer can hold the actual data
to be copied or it may hold a list of pointers to the data. The cpy_func routine must interpret the cpy_data buffer
appropriately.
The interface to cpy_func is as follows:
where void ∗destination is the cpy_data pointer for the thread being copied to and void ∗source is the cpy_data
pointer for the thread being copied from.
Definition at line 1694 of file kmp_csupport.c.
5.10.3.2 void∗ kmpc threadprivate cached ( ident_t ∗ loc, kmp int32 global tid, void ∗ data, size t size, void ∗∗∗ cache )
Parameters
loc source location information
global_tid global thread number
data pointer to data to privatize
size size of data to privatize
cache pointer to cache
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.10 Thread private data support 43
Returns
5.10.3.3 void kmpc threadprivate register ( ident_t ∗ loc, void ∗ data, kmpc_ctor ctor, kmpc_cctor cctor, kmpc_dtor
dtor )
Parameters
loc source location information
data pointer to data being privatized
ctor pointer to constructor function for data
cctor pointer to copy constructor function for data
dtor pointer to destructor function for data
Register constructors and destructors for thread private data. This function is called when executing in parallel,
when we know the thread id.
Definition at line 532 of file kmp_threadprivate.c.
5.10.3.4 void kmpc threadprivate register vec ( ident_t ∗ loc, void ∗ data, kmpc_ctor_vec ctor, kmpc_cctor_vec
cctor, kmpc_dtor_vec dtor, size t vector length )
Parameters
loc source location information
data pointer to data being privatized
ctor pointer to constructor function for data
cctor pointer to copy constructor function for data
dtor pointer to destructor function for data
vector_length length of the vector (bytes or elements?) Register vector constructors and destructors for
thread private data.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
44 Module Documentation
Classes
• class stats_flags_e
flags to describe the statistic ( timers or counter )
Macros
These macros support profiling the libomp library. Use –stats=on when building with build.pl to enable and then use
the KMP_∗ macros to profile (through counts or clock ticks) libomp during execution of an OpenMP program.
KMP_STATS_FILE
This environment variable is set to an output filename that will be appended NOT OVERWRITTEN if it exists. If this
environment variable is undefined, the statistics will be output to stderr
KMP_STATS_THREADS
This environment variable indicates to print thread-specific statistics as well as aggregate statistics. Each thread’s
statistics will be shown as well as the collective sum of all threads. The values "true", "on", "1", "yes" will all indicate
to print per thread statistics.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.11 Statistics Gathering from OMPTB 45
5.11.3.1 #define KMP COUNT BLOCK( name ) kmp stats thread ptr->getCounter(COUNTER ##name)->increment()
Parameters
name counter name as specified under the KMP_FOREACH_COUNTER() macro
Use KMP_COUNT_BLOCK(name, value) macro to increment a statistics counter for the executing thread.
Definition at line 656 of file kmp_stats.h.
Referenced by __kmpc_barrier(), __kmpc_critical(), __kmpc_fork_call(), __kmpc_fork_teams(), __kmpc_master(),
__kmpc_reduce(), __kmpc_reduce_nowait(), and __kmpc_single().
5.11.3.2 #define KMP COUNT VALUE( name, value ) kmp stats thread ptr->getTimer(TIMER ##name)->addSample(value)
Parameters
name timer name as specified under the KMP_FOREACH_TIMER() macro
value double precision sample value to add to statistics for the timer
Value:
Parameters
macro a user defined macro that takes three arguments - macro(COUNTER_NAME, flags, arg)
arg a user defined argument to send to the user defined macro
A counter counts the occurrence of some event. Each thread accumulates its own count, at the end of execution
the counts are aggregated treating each thread as a separate measurement. (Unless onlyInMaster is set, in which
case there’s only a single measurement). The min,mean,max are therefore the values for the threads. Adding the
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
46 Module Documentation
counter here and then putting a KMP_BLOCK_COUNTER(name) at the point you want to count is all you need to
do. All of the tables and printing is generated from this macro. Format is "macro(name, flags, arg)"
Definition at line 70 of file kmp_stats.h.
Value:
macro(OMP_serial, 0, arg) \
macro(OMP_start_end, 0, arg) \
macro(OMP_single, 0, arg) \
macro(OMP_master, 0, arg) \
KMP_FOREACH_EXPLICIT_DEVELOPER_TIMER(macro,arg) \
macro(LAST, 0, arg)
Parameters
macro a user defined macro that takes three arguments - macro(TIMER_NAME, flags, arg)
arg a user defined argument to send to the user defined macro
Warning
YOU MUST HAVE THE SAME NAMED TIMER UNDER KMP_FOREACH_TIMER() OR ELSE BAD THINGS
WILL HAPPEN!
Explicit timers are ones where we need to allocate a timer itself (as well as the accumulated timing statistics). We
allocate these on a per-thread basis, and explicitly start and stop them. Block timers just allocate the timer itself on
the stack, and use the destructor to notice block exit; they don’t need to be defined here. The name here should be
the same as that of a timer above.
Definition at line 198 of file kmp_stats.h.
5.11.3.5 #define KMP OUTPUT STATS( heading string ) kmp output stats(heading string)
Parameters
heading_string heading put above the final stats output
Explicitly stops all timers and outputs all stats. Environment variable, OMPTB_STATSFILE=filename, can
be used to output the stats to a filename instead of stderr Environment variable, OMPTB_STATSTHREAD-
S=true|undefined, can be used to output thread specific stats For now the OMPTB_STATSTHREADS en-
vironment variable can either be defined with any value, which will print out thread specific stats, or it can be
undefined (not specified in the environment) and thread specific stats won’t be printed It should be noted that all
statistics are reset when this macro is called.
Definition at line 701 of file kmp_stats.h.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.11 Statistics Gathering from OMPTB 47
5.11.3.7 #define KMP START EXPLICIT TIMER( name ) kmp stats thread ptr->getExplicitTimer(EXPLICIT TIMER ##name)-
>start(TIMER ##name)
Parameters
name explicit timer name as specified under the KMP_FOREACH_EXPLICIT_TIMER() macro
Use to start a timer. This will need a corresponding KMP_STOP_EXPLICIT_TIMER() macro to stop the timer unlike
the KMP_TIME_BLOCK(name) macro which has an implicit stopping macro at the end of the code block. All explicit
timers are stopped at library exit time before the final statistics are outputted.
Definition at line 670 of file kmp_stats.h.
Referenced by __kmpc_fork_call(), __kmpc_master(), and __kmpc_single().
5.11.3.8 #define KMP STOP EXPLICIT TIMER( name ) kmp stats thread ptr->getExplicitTimer(EXPLICIT TIMER ##name)-
>stop(TIMER ##name)
Parameters
name explicit timer name as specified under the KMP_FOREACH_EXPLICIT_TIMER() macro
Use KMP_STOP_EXPLICIT_TIMER(name) to stop a timer. When this is done, the time between the last KMP_-
START_EXPLICIT_TIMER(name) and this KMP_STOP_EXPLICIT_TIMER(name) will be added to the timer’s stat
value. The timer will then be reset. After the KMP_STOP_EXPLICIT_TIMER(name) macro is called, another call to
KMP_START_EXPLICIT_TIMER(name) will start the timer once again.
Definition at line 684 of file kmp_stats.h.
Referenced by __kmpc_end_master(), __kmpc_end_single(), and __kmpc_fork_call().
5.11.3.9 #define KMP TIME BLOCK( name ) blockTimer BLOCKTIME ( kmp stats thread ptr->getTimer(TIMER ##name),
TIMER ##name)
Parameters
name timer name as specified under the KMP_FOREACH_TIMER() macro
Use KMP_TIME_BLOCK(name) macro to time a code block. This will record the time taken in the block and use
the destructor to stop the timer. Convenient! With this definition you can’t have more than one KMP_TIME_BLOCK
in the same code block. I don’t think that’s a problem.
Definition at line 631 of file kmp_stats.h.
Referenced by __kmpc_barrier().
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
48 Module Documentation
Functions
5.12.2.1 kmp int32 kmpc omp task with deps ( ident_t ∗ loc ref, kmp int32 gtid, kmp task t ∗ new task, kmp int32 ndeps,
kmp depend info t ∗ dep list, kmp int32 ndeps noalias, kmp depend info t ∗ noalias dep list )
Parameters
loc_ref location of the original task directive
gtid Global Thread ID of encountering thread
new_task task thunk allocated by __kmp_omp_task_alloc() for the ”new task”
ndeps Number of depend items with possible aliasing
dep_list List of depend items with possible aliasing
ndeps_noalias Number of depend items with no aliasing
noalias_dep_list List of depend items with no aliasing
Returns
Returns either TASK_CURRENT_NOT_QUEUED if the current task was not suspendend and queued, or TA-
SK_CURRENT_QUEUED if it was suspended and queued
5.12.2.2 void kmpc omp wait deps ( ident_t ∗ loc ref, kmp int32 gtid, kmp int32 ndeps, kmp depend info t ∗ dep list,
kmp int32 ndeps noalias, kmp depend info t ∗ noalias dep list )
Parameters
loc_ref location of the original task directive
gtid Global Thread ID of encountering thread
ndeps Number of depend items with possible aliasing
dep_list List of depend items with possible aliasing
ndeps_noalias Number of depend items with no aliasing
noalias_dep_list List of depend items with no aliasing
Blocks the current task until all specifies dependencies have been fulfilled.
Definition at line 463 of file kmp_taskdeps.cpp.
Referenced by __kmpc_omp_task_with_deps().
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
5.13 User visible functions 49
These functions can be called directly by the user, but are runtime library specific, rather than being OpenMP
interfaces.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
50 Module Documentation
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
Chapter 6
Class Documentation
#include <kmp_affinity.h>
Public Attributes
• kmp_uint32 maxLevels
• kmp_uint32 depth
• kmp_uint32 ∗ numPerLevel
A structure for holding machine-specific hierarchy info to be computed once at init. This structure represents a
mapping of threads to the actual machine hierarchy, or to our best guess at what the hierarchy might be, for the
purpose of performing an efficient barrier. In the worst case, when there is no machine hierarchy information, it
produces a tree suitable for a barrier, similar to the tree used in the hyper barrier.
Definition at line 127 of file kmp_affinity.h.
This is specifically the depth of the machine configuration hierarchy, in terms of the number of levels along the
longest path from root to any leaf. It corresponds to the number of entries in numPerLevel if we exclude all but one
trailing 1.
Definition at line 142 of file kmp_affinity.h.
Good default values for number of leaves and branching factor, given no affinity information. Behaves a bit like hyper
barrier.
Definition at line 131 of file kmp_affinity.h.
52 Class Documentation
Number of levels in the hierarchy. Typical levels are threads/core, cores/package or socket, packages/node, nodes/-
machine, etc. We don’t want to get specific with nomenclature. When the machine is oversubscribed we add levels
to duplicate the hierarchy, doubling the thread capacity of the hierarchy each time we add a level.
Definition at line 137 of file kmp_affinity.h.
Level 0 corresponds to leaves. numPerLevel[i] is the number of children the parent of a node at level i has. For
example, if we have a machine with 4 packages, 4 cores/package and 2 HT per core, then numPerLevel = {2, 4, 4,
1, 1}. All empty levels are set to 1.
Definition at line 151 of file kmp_affinity.h.
The documentation for this class was generated from the following file:
• kmp_affinity.h
#include <kmp.h>
Public Attributes
• kmp_int32 reserved_1
• kmp_int32 flags
• kmp_int32 reserved_2
• kmp_int32 reserved_3
• char const ∗ psource
The string is composed of semi-colon separated fields which describe the source file, the function and a pair of line
numbers that delimit the construct.
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
6.3 kmp_flag< P > Class Template Reference 53
• kmp.h
#include <kmp_wait_release.h>
• volatile P ∗ get ()
• flag_type get_type ()
Private Attributes
• volatile P ∗ loc
• flag_type t
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
54 Class Documentation
Returns
Returns
the flag_type
• kmp_wait_release.h
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
6.4 stats_flags_e Class Reference 55
• kmp_stats.h
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
Index
__kmpc_ordered maxLeaves, 51
Work Sharing, 36 maxLevels, 51
__kmpc_push_num_teams numPerLevel, 52
Parallel (fork/join), 26
__kmpc_push_num_threads ident, 52
Parallel (fork/join), 26 flags, 52
__kmpc_reduce psource, 52
Synchronization, 39 reserved_1, 53
__kmpc_reduce_nowait reserved_2, 53
Synchronization, 40 reserved_3, 53
__kmpc_serialized_parallel ident_t
Parallel (fork/join), 26 Basic Types, 22
__kmpc_single
Work Sharing, 36 KMP_COUNT_BLOCK
__kmpc_team_static_init_4 Statistics Gathering from OMPTB, 45
Work Sharing, 36 KMP_COUNT_VALUE
__kmpc_team_static_init_4u Statistics Gathering from OMPTB, 45
Work Sharing, 37 KMP_IDENT_AUTOPAR
__kmpc_team_static_init_8 Basic Types, 21
Work Sharing, 37 KMP_IDENT_IMB
__kmpc_team_static_init_8u Basic Types, 21
Work Sharing, 37 KMP_IDENT_KMPC
__kmpc_threadprivate_cached Basic Types, 21
Thread private data support, 42 KMP_OUTPUT_STATS
__kmpc_threadprivate_register Statistics Gathering from OMPTB, 46
Thread private data support, 43 KMP_RESET_STATS
__kmpc_threadprivate_register_vec Statistics Gathering from OMPTB, 46
Thread private data support, 43 KMP_TIME_BLOCK
Statistics Gathering from OMPTB, 47
Atomic Operations, 13 kmp_distribute_static
Work Sharing, 31
Basic Types, 21 kmp_distribute_static_chunked
ident_t, 22 Work Sharing, 31
KMP_IDENT_AUTOPAR, 21 kmp_nm_auto
KMP_IDENT_IMB, 21 Work Sharing, 31
KMP_IDENT_KMPC, 21 kmp_nm_guided_chunked
Work Sharing, 31
Deprecated Functions, 23 kmp_nm_lower
__kmpc_ok_to_fork, 23 Work Sharing, 31
depth kmp_nm_ord_auto
hierarchy_info, 51 Work Sharing, 31
kmp_nm_ord_static
flag32
Work Sharing, 31
Wait/Release operations, 20
kmp_nm_static
flag64
Work Sharing, 31
Wait/Release operations, 20
kmp_nm_upper
flag_oncore
Work Sharing, 31
Wait/Release operations, 20
kmp_ord_auto
flag_type
Work Sharing, 30
Wait/Release operations, 20
kmp_ord_lower
flags
Work Sharing, 30
ident, 52
kmp_ord_static
get Work Sharing, 30
kmp_flag, 53 kmp_ord_upper
get_type Work Sharing, 30
kmp_flag, 54 kmp_sch_auto
Work Sharing, 30
hierarchy_info, 51 kmp_sch_default
depth, 51 Work Sharing, 31
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
58 INDEX
kmp_sch_guided_chunked sched_type
Work Sharing, 30 Work Sharing, 30
kmp_sch_lower Startup and Shutdown, 24
Work Sharing, 30 __kmpc_begin, 24
kmp_sch_static __kmpc_end, 24
Work Sharing, 30 Statistics Gathering from OMPTB, 44
kmp_sch_static_steal KMP_COUNT_BLOCK, 45
Work Sharing, 30 KMP_COUNT_VALUE, 45
kmp_sch_upper KMP_RESET_STATS, 46
Work Sharing, 30 KMP_TIME_BLOCK, 47
kmp_flag stats_flags_e, 54
get, 53 Synchronization, 38
get_type, 54 __kmpc_barrier, 38
loc, 54 __kmpc_barrier_master, 38
t, 54 __kmpc_barrier_master_nowait, 38
kmp_flag< P >, 53 __kmpc_end_barrier_master, 39
kmpc_cctor __kmpc_end_reduce, 39
Thread private data support, 41 __kmpc_end_reduce_nowait, 39
kmpc_cctor_vec __kmpc_flush, 39
Thread private data support, 41 __kmpc_reduce, 39
kmpc_ctor __kmpc_reduce_nowait, 40
Thread private data support, 41
kmpc_ctor_vec t
Thread private data support, 41 kmp_flag, 54
kmpc_dtor Tasking support, 48
Thread private data support, 41 __kmpc_omp_task_with_deps, 48
kmpc_dtor_vec __kmpc_omp_wait_deps, 48
Thread private data support, 41 Thread Information, 27
kmpc_micro __kmpc_bound_num_threads, 27
Parallel (fork/join), 25 __kmpc_bound_thread_num, 27
__kmpc_global_num_threads, 27
loc __kmpc_global_thread_num, 28
kmp_flag, 54 __kmpc_in_parallel, 28
Thread private data support, 41
maxLeaves __kmpc_copyprivate, 42
hierarchy_info, 51 __kmpc_threadprivate_cached, 42
maxLevels __kmpc_threadprivate_register, 43
hierarchy_info, 51 __kmpc_threadprivate_register_vec, 43
kmpc_cctor, 41
numPerLevel kmpc_cctor_vec, 41
hierarchy_info, 52 kmpc_ctor, 41
kmpc_ctor_vec, 41
Parallel (fork/join), 25 kmpc_dtor, 41
__kmpc_end_serialized_parallel, 25 kmpc_dtor_vec, 41
__kmpc_fork_call, 25
__kmpc_fork_teams, 26 User visible functions, 49
__kmpc_push_num_teams, 26
__kmpc_push_num_threads, 26 Wait/Release operations
__kmpc_serialized_parallel, 26 flag32, 20
kmpc_micro, 25 flag64, 20
psource flag_oncore, 20
ident, 52 Wait/Release operations, 20
flag_type, 20
reserved_1 Work Sharing, 29
ident, 53 __kmpc_critical, 31
reserved_2 __kmpc_dispatch_fini_4, 31
ident, 53 __kmpc_dispatch_fini_4u, 31
reserved_3 __kmpc_dispatch_fini_8, 31
ident, 53 __kmpc_dispatch_fini_8u, 31
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen
INDEX 59
__kmpc_dispatch_init_4, 32
__kmpc_dispatch_init_4u, 32
__kmpc_dispatch_init_8, 32
__kmpc_dispatch_init_8u, 32
__kmpc_dispatch_next_4, 32
__kmpc_dispatch_next_4u, 33
__kmpc_dispatch_next_8, 33
__kmpc_dispatch_next_8u, 33
__kmpc_dist_dispatch_init_4, 33
__kmpc_dist_for_static_init_4, 33
__kmpc_dist_for_static_init_4u, 34
__kmpc_dist_for_static_init_8, 34
__kmpc_dist_for_static_init_8u, 34
__kmpc_end_critical, 34
__kmpc_end_master, 34
__kmpc_end_ordered, 34
__kmpc_end_single, 35
__kmpc_for_static_fini, 35
__kmpc_for_static_init_4, 35
__kmpc_for_static_init_4u, 35
__kmpc_for_static_init_8, 36
__kmpc_for_static_init_8u, 36
__kmpc_master, 36
__kmpc_ordered, 36
__kmpc_single, 36
__kmpc_team_static_init_4, 36
__kmpc_team_static_init_4u, 37
__kmpc_team_static_init_8, 37
__kmpc_team_static_init_8u, 37
kmp_distribute_static, 31
kmp_distribute_static_chunked, 31
kmp_nm_auto, 31
kmp_nm_guided_chunked, 31
kmp_nm_lower, 31
kmp_nm_ord_auto, 31
kmp_nm_ord_static, 31
kmp_nm_static, 31
kmp_nm_upper, 31
kmp_ord_auto, 30
kmp_ord_lower, 30
kmp_ord_static, 30
kmp_ord_upper, 30
kmp_sch_auto, 30
kmp_sch_default, 31
kmp_sch_guided_chunked, 30
kmp_sch_lower, 30
kmp_sch_static, 30
kmp_sch_static_steal, 30
kmp_sch_upper, 30
sched_type, 30
Generated on Wed Sep 23 2015 13:02:36 for LLVM OpenMP∗ Runtime Library by Doxygen