]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/doc/gfortran/intrinsic-modules/openmp-modules-omplib-and-omplibkinds.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-modules / openmp-modules-omplib-and-omplibkinds.rst
CommitLineData
c63539ff
ML
1..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6.. _openmp-modules-omp_lib-and-omp_lib_kinds:
7
8OpenMP Modules OMP_LIB and OMP_LIB_KINDS
9****************************************
10
11The OpenMP Fortran runtime library routines are provided both in
12a form of two Fortran modules, named ``OMP_LIB`` and
13``OMP_LIB_KINDS``, and in a form of a Fortran ``include`` file named
14:samp:`omp_lib.h`. The procedures provided by ``OMP_LIB`` can be found
15in the :ref:`libgomp:top` manual,
16the named constants defined in the modules are listed
17below.
18
19For details refer to the actual
20`OpenMP Application Program Interface v4.5 <https://www.openmp.org/wp-content/uploads/openmp-4.5.pdf>`_ and
21`OpenMP Application Program Interface v5.0 <https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf>`_.
22
23``OMP_LIB_KINDS`` provides the following scalar default-integer
24named constants:
25
26.. code-block::
27
28 omp_allocator_handle_kind
29 omp_alloctrait_key_kind
30 omp_alloctrait_val_kind
31 omp_depend_kind
32 omp_lock_kind
33 omp_lock_hint_kind
34 omp_nest_lock_kind
35 omp_pause_resource_kind
36 omp_memspace_handle_kind
37 omp_proc_bind_kind
38 omp_sched_kind
39 omp_sync_hint_kind
40
41``OMP_LIB`` provides the scalar default-integer
42named constant ``openmp_version`` with a value of the form
43:samp:`{yyyymm}`, where ``yyyy`` is the year and :samp:`{mm}` the month
44of the OpenMP version; for OpenMP v4.5 the value is ``201511``.
45
46The following derived type:
47
48.. code-block::
49
50 omp_alloctrait
51
52The following scalar integer named constants of the
53kind ``omp_sched_kind`` :
54
55.. code-block::
56
57 omp_sched_static
58 omp_sched_dynamic
59 omp_sched_guided
60 omp_sched_auto
61
62And the following scalar integer named constants of the
63kind ``omp_proc_bind_kind`` :
64
65.. code-block::
66
67 omp_proc_bind_false
68 omp_proc_bind_true
69 omp_proc_bind_primary
70 omp_proc_bind_master
71 omp_proc_bind_close
72 omp_proc_bind_spread
73
74The following scalar integer named constants are of the
75kind ``omp_lock_hint_kind`` :
76
77.. code-block::
78
79 omp_lock_hint_none
80 omp_lock_hint_uncontended
81 omp_lock_hint_contended
82 omp_lock_hint_nonspeculative
83 omp_lock_hint_speculative
84 omp_sync_hint_none
85 omp_sync_hint_uncontended
86 omp_sync_hint_contended
87 omp_sync_hint_nonspeculative
88 omp_sync_hint_speculative
89
90And the following two scalar integer named constants are of the
91kind ``omp_pause_resource_kind`` :
92
93.. code-block::
94
95 omp_pause_soft
96 omp_pause_hard
97
98The following scalar integer named constants are of the kind
99``omp_alloctrait_key_kind`` :
100
101.. code-block::
102
103 omp_atk_sync_hint
104 omp_atk_alignment
105 omp_atk_access
106 omp_atk_pool_size
107 omp_atk_fallback
108 omp_atk_fb_data
109 omp_atk_pinned
110 omp_atk_partition
111
112The following scalar integer named constants are of the kind
113``omp_alloctrait_val_kind`` :
114
115.. code-block::
116
117 omp_atv_default
118 omp_atv_false
119 omp_atv_true
120 omp_atv_contended
121 omp_atv_uncontended
122 omp_atv_serialized
123 omp_atv_sequential
124 omp_atv_private
125 omp_atv_all
126 omp_atv_thread
127 omp_atv_pteam
128 omp_atv_cgroup
129 omp_atv_default_mem_fb
130 omp_atv_null_fb
131 omp_atv_abort_fb
132 omp_atv_allocator_fb
133 omp_atv_environment
134 omp_atv_nearest
135 omp_atv_blocked
136
137The following scalar integer named constants are of the kind
138``omp_allocator_handle_kind`` :
139
140.. code-block::
141
142 omp_null_allocator
143 omp_default_mem_alloc
144 omp_large_cap_mem_alloc
145 omp_const_mem_alloc
146 omp_high_bw_mem_alloc
147 omp_low_lat_mem_alloc
148 omp_cgroup_mem_alloc
149 omp_pteam_mem_alloc
150 omp_thread_mem_alloc
151
152The following scalar integer named constants are of the kind
153``omp_memspace_handle_kind`` :
154
155.. code-block::
156
157 omp_default_mem_space
158 omp_large_cap_mem_space
159 omp_const_mem_space
160 omp_high_bw_mem_space
3ed1b4ce 161 omp_low_lat_mem_space