Home | History | Annotate | Line # | Download | only in libgomp
libgomp.info revision 1.7
      1 This is libgomp.info, produced by makeinfo version 4.13 from
      2 /space/rguenther/gcc-6.4.0/gcc-6.4.0/libgomp/libgomp.texi.
      3 
      4 Copyright (C) 2006-2016 Free Software Foundation, Inc.
      5 
      6    Permission is granted to copy, distribute and/or modify this document
      7 under the terms of the GNU Free Documentation License, Version 1.3 or
      8 any later version published by the Free Software Foundation; with the
      9 Invariant Sections being "Funding Free Software", the Front-Cover texts
     10 being (a) (see below), and with the Back-Cover Texts being (b) (see
     11 below).  A copy of the license is included in the section entitled "GNU
     12 Free Documentation License".
     13 
     14    (a) The FSF's Front-Cover Text is:
     15 
     16    A GNU Manual
     17 
     18    (b) The FSF's Back-Cover Text is:
     19 
     20    You have freedom to copy and modify this GNU Manual, like GNU
     21 software.  Copies published by the Free Software Foundation raise
     22 funds for GNU development.
     23 
     24 INFO-DIR-SECTION GNU Libraries
     25 START-INFO-DIR-ENTRY
     26 * libgomp: (libgomp).          GNU Offloading and Multi Processing Runtime Library.
     27 END-INFO-DIR-ENTRY
     28 
     29    This manual documents libgomp, the GNU Offloading and Multi
     30 Processing Runtime library.  This is the GNU implementation of the
     31 OpenMP and OpenACC APIs for parallel and accelerator programming in
     32 C/C++ and Fortran.
     33 
     34    Published by the Free Software Foundation 51 Franklin Street, Fifth
     35 Floor Boston, MA 02110-1301 USA
     36 
     37    Copyright (C) 2006-2016 Free Software Foundation, Inc.
     38 
     39    Permission is granted to copy, distribute and/or modify this document
     40 under the terms of the GNU Free Documentation License, Version 1.3 or
     41 any later version published by the Free Software Foundation; with the
     42 Invariant Sections being "Funding Free Software", the Front-Cover texts
     43 being (a) (see below), and with the Back-Cover Texts being (b) (see
     44 below).  A copy of the license is included in the section entitled "GNU
     45 Free Documentation License".
     46 
     47    (a) The FSF's Front-Cover Text is:
     48 
     49    A GNU Manual
     50 
     51    (b) The FSF's Back-Cover Text is:
     52 
     53    You have freedom to copy and modify this GNU Manual, like GNU
     54 software.  Copies published by the Free Software Foundation raise
     55 funds for GNU development.
     56 
     57 
     58 File: libgomp.info,  Node: Top,  Next: Enabling OpenMP,  Up: (dir)
     59 
     60 Introduction
     61 ************
     62 
     63 This manual documents the usage of libgomp, the GNU Offloading and
     64 Multi Processing Runtime Library.  This includes the GNU implementation
     65 of the OpenMP (http://www.openmp.org) Application Programming Interface
     66 (API) for multi-platform shared-memory parallel programming in C/C++
     67 and Fortran, and the GNU implementation of the OpenACC
     68 (http://www.openacc.org/) Application Programming Interface (API) for
     69 offloading of code to accelerator devices in C/C++ and Fortran.
     70 
     71    Originally, libgomp implemented the GNU OpenMP Runtime Library.
     72 Based on this, support for OpenACC and offloading (both OpenACC and
     73 OpenMP 4's target construct) has been added later on, and the library's
     74 name changed to GNU Offloading and Multi Processing Runtime Library.
     75 
     76 * Menu:
     77 
     78 * Enabling OpenMP::            How to enable OpenMP for your applications.
     79 * Runtime Library Routines::   The OpenMP runtime application programming
     80                                interface.
     81 * Environment Variables::      Influencing runtime behavior with environment
     82                                variables.
     83 * Enabling OpenACC::           How to enable OpenACC for your
     84                                applications.
     85 * OpenACC Runtime Library Routines:: The OpenACC runtime application
     86                                programming interface.
     87 * OpenACC Environment Variables:: Influencing OpenACC runtime behavior with
     88                                environment variables.
     89 * CUDA Streams Usage::         Notes on the implementation of
     90                                asynchronous operations.
     91 * OpenACC Library Interoperability:: OpenACC library interoperability with the
     92                                NVIDIA CUBLAS library.
     93 * The libgomp ABI::            Notes on the external ABI presented by libgomp.
     94 * Reporting Bugs::             How to report bugs in the GNU Offloading and
     95                                Multi Processing Runtime Library.
     96 * Copying::                    GNU general public license says
     97                                how you can copy and share libgomp.
     98 * GNU Free Documentation License::
     99                                How you can copy and share this manual.
    100 * Funding::                    How to help assure continued work for free
    101                                software.
    102 * Library Index::              Index of this documentation.
    103 
    104 
    105 File: libgomp.info,  Node: Enabling OpenMP,  Next: Runtime Library Routines,  Prev: Top,  Up: Top
    106 
    107 1 Enabling OpenMP
    108 *****************
    109 
    110 To activate the OpenMP extensions for C/C++ and Fortran, the
    111 compile-time flag `-fopenmp' must be specified.  This enables the
    112 OpenMP directive `#pragma omp' in C/C++ and `!$omp' directives in free
    113 form, `c$omp', `*$omp' and `!$omp' directives in fixed form, `!$'
    114 conditional compilation sentinels in free form and `c$', `*$' and `!$'
    115 sentinels in fixed form, for Fortran.  The flag also arranges for
    116 automatic linking of the OpenMP runtime library (*note Runtime Library
    117 Routines::).
    118 
    119    A complete description of all OpenMP directives accepted may be
    120 found in the OpenMP Application Program Interface
    121 (http://www.openmp.org) manual, version 4.5.
    122 
    123 
    124 File: libgomp.info,  Node: Runtime Library Routines,  Next: Environment Variables,  Prev: Enabling OpenMP,  Up: Top
    125 
    126 2 Runtime Library Routines
    127 **************************
    128 
    129 The runtime routines described here are defined by Section 3 of the
    130 OpenMP specification in version 4.5.  The routines are structured in
    131 following three parts:
    132 
    133 * Menu:
    134 
    135 Control threads, processors and the parallel environment.  They have C
    136 linkage, and do not throw exceptions.
    137 
    138 * omp_get_active_level::        Number of active parallel regions
    139 * omp_get_ancestor_thread_num:: Ancestor thread ID
    140 * omp_get_cancellation::        Whether cancellation support is enabled
    141 * omp_get_default_device::      Get the default device for target regions
    142 * omp_get_dynamic::             Dynamic teams setting
    143 * omp_get_level::               Number of parallel regions
    144 * omp_get_max_active_levels::   Maximum number of active regions
    145 * omp_get_max_task_priority::   Maximum task priority value that can be set
    146 * omp_get_max_threads::         Maximum number of threads of parallel region
    147 * omp_get_nested::              Nested parallel regions
    148 * omp_get_num_devices::         Number of target devices
    149 * omp_get_num_procs::           Number of processors online
    150 * omp_get_num_teams::           Number of teams
    151 * omp_get_num_threads::         Size of the active team
    152 * omp_get_proc_bind::           Whether theads may be moved between CPUs
    153 * omp_get_schedule::            Obtain the runtime scheduling method
    154 * omp_get_team_num::            Get team number
    155 * omp_get_team_size::           Number of threads in a team
    156 * omp_get_thread_limit::        Maximum number of threads
    157 * omp_get_thread_num::          Current thread ID
    158 * omp_in_parallel::             Whether a parallel region is active
    159 * omp_in_final::                Whether in final or included task region
    160 * omp_is_initial_device::       Whether executing on the host device
    161 * omp_set_default_device::      Set the default device for target regions
    162 * omp_set_dynamic::             Enable/disable dynamic teams
    163 * omp_set_max_active_levels::   Limits the number of active parallel regions
    164 * omp_set_nested::              Enable/disable nested parallel regions
    165 * omp_set_num_threads::         Set upper team size limit
    166 * omp_set_schedule::            Set the runtime scheduling method
    167 
    168 Initialize, set, test, unset and destroy simple and nested locks.
    169 
    170 * omp_init_lock::            Initialize simple lock
    171 * omp_set_lock::             Wait for and set simple lock
    172 * omp_test_lock::            Test and set simple lock if available
    173 * omp_unset_lock::           Unset simple lock
    174 * omp_destroy_lock::         Destroy simple lock
    175 * omp_init_nest_lock::       Initialize nested lock
    176 * omp_set_nest_lock::        Wait for and set simple lock
    177 * omp_test_nest_lock::       Test and set nested lock if available
    178 * omp_unset_nest_lock::      Unset nested lock
    179 * omp_destroy_nest_lock::    Destroy nested lock
    180 
    181 Portable, thread-based, wall clock timer.
    182 
    183 * omp_get_wtick::            Get timer precision.
    184 * omp_get_wtime::            Elapsed wall clock time.
    185 
    186 
    187 File: libgomp.info,  Node: omp_get_active_level,  Next: omp_get_ancestor_thread_num,  Up: Runtime Library Routines
    188 
    189 2.1 `omp_get_active_level' - Number of parallel regions
    190 =======================================================
    191 
    192 _Description_:
    193      This function returns the nesting level for the active parallel
    194      blocks, which enclose the calling call.
    195 
    196 _C/C++_
    197      _Prototype_:  `int omp_get_active_level(void);'
    198 
    199 _Fortran_:
    200      _Interface_:  `integer function omp_get_active_level()'
    201 
    202 _See also_:
    203      *note omp_get_level::, *note omp_get_max_active_levels::, *note
    204      omp_set_max_active_levels::
    205 
    206 _Reference_:
    207      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.20.
    208 
    209 
    210 File: libgomp.info,  Node: omp_get_ancestor_thread_num,  Next: omp_get_cancellation,  Prev: omp_get_active_level,  Up: Runtime Library Routines
    211 
    212 2.2 `omp_get_ancestor_thread_num' - Ancestor thread ID
    213 ======================================================
    214 
    215 _Description_:
    216      This function returns the thread identification number for the
    217      given nesting level of the current thread.  For values of LEVEL
    218      outside zero to `omp_get_level' -1 is returned; if LEVEL is
    219      `omp_get_level' the result is identical to `omp_get_thread_num'.
    220 
    221 _C/C++_
    222      _Prototype_:  `int omp_get_ancestor_thread_num(int level);'
    223 
    224 _Fortran_:
    225      _Interface_:  `integer function omp_get_ancestor_thread_num(level)'
    226                    `integer level'
    227 
    228 _See also_:
    229      *note omp_get_level::, *note omp_get_thread_num::, *note
    230      omp_get_team_size::
    231 
    232 _Reference_:
    233      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.18.
    234 
    235 
    236 File: libgomp.info,  Node: omp_get_cancellation,  Next: omp_get_default_device,  Prev: omp_get_ancestor_thread_num,  Up: Runtime Library Routines
    237 
    238 2.3 `omp_get_cancellation' - Whether cancellation support is enabled
    239 ====================================================================
    240 
    241 _Description_:
    242      This function returns `true' if cancellation is activated, `false'
    243      otherwise.  Here, `true' and `false' represent their
    244      language-specific counterparts.  Unless `OMP_CANCELLATION' is set
    245      true, cancellations are deactivated.
    246 
    247 _C/C++_:
    248      _Prototype_:  `int omp_get_cancellation(void);'
    249 
    250 _Fortran_:
    251      _Interface_:  `logical function omp_get_cancellation()'
    252 
    253 _See also_:
    254      *note OMP_CANCELLATION::
    255 
    256 _Reference_:
    257      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.9.
    258 
    259 
    260 File: libgomp.info,  Node: omp_get_default_device,  Next: omp_get_dynamic,  Prev: omp_get_cancellation,  Up: Runtime Library Routines
    261 
    262 2.4 `omp_get_default_device' - Get the default device for target regions
    263 ========================================================================
    264 
    265 _Description_:
    266      Get the default device for target regions without device clause.
    267 
    268 _C/C++_:
    269      _Prototype_:  `int omp_get_default_device(void);'
    270 
    271 _Fortran_:
    272      _Interface_:  `integer function omp_get_default_device()'
    273 
    274 _See also_:
    275      *note OMP_DEFAULT_DEVICE::, *note omp_set_default_device::
    276 
    277 _Reference_:
    278      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.30.
    279 
    280 
    281 File: libgomp.info,  Node: omp_get_dynamic,  Next: omp_get_level,  Prev: omp_get_default_device,  Up: Runtime Library Routines
    282 
    283 2.5 `omp_get_dynamic' - Dynamic teams setting
    284 =============================================
    285 
    286 _Description_:
    287      This function returns `true' if enabled, `false' otherwise.  Here,
    288      `true' and `false' represent their language-specific counterparts.
    289 
    290      The dynamic team setting may be initialized at startup by the
    291      `OMP_DYNAMIC' environment variable or at runtime using
    292      `omp_set_dynamic'.  If undefined, dynamic adjustment is disabled
    293      by default.
    294 
    295 _C/C++_:
    296      _Prototype_:  `int omp_get_dynamic(void);'
    297 
    298 _Fortran_:
    299      _Interface_:  `logical function omp_get_dynamic()'
    300 
    301 _See also_:
    302      *note omp_set_dynamic::, *note OMP_DYNAMIC::
    303 
    304 _Reference_:
    305      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.8.
    306 
    307 
    308 File: libgomp.info,  Node: omp_get_level,  Next: omp_get_max_active_levels,  Prev: omp_get_dynamic,  Up: Runtime Library Routines
    309 
    310 2.6 `omp_get_level' - Obtain the current nesting level
    311 ======================================================
    312 
    313 _Description_:
    314      This function returns the nesting level for the parallel blocks,
    315      which enclose the calling call.
    316 
    317 _C/C++_
    318      _Prototype_:  `int omp_get_level(void);'
    319 
    320 _Fortran_:
    321      _Interface_:  `integer function omp_level()'
    322 
    323 _See also_:
    324      *note omp_get_active_level::
    325 
    326 _Reference_:
    327      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.17.
    328 
    329 
    330 File: libgomp.info,  Node: omp_get_max_active_levels,  Next: omp_get_max_task_priority,  Prev: omp_get_level,  Up: Runtime Library Routines
    331 
    332 2.7 `omp_get_max_active_levels' - Maximum number of active regions
    333 ==================================================================
    334 
    335 _Description_:
    336      This function obtains the maximum allowed number of nested, active
    337      parallel regions.
    338 
    339 _C/C++_
    340      _Prototype_:  `int omp_get_max_active_levels(void);'
    341 
    342 _Fortran_:
    343      _Interface_:  `integer function omp_get_max_active_levels()'
    344 
    345 _See also_:
    346      *note omp_set_max_active_levels::, *note omp_get_active_level::
    347 
    348 _Reference_:
    349      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.16.
    350 
    351 
    352 File: libgomp.info,  Node: omp_get_max_task_priority,  Next: omp_get_max_threads,  Prev: omp_get_max_active_levels,  Up: Runtime Library Routines
    353 
    354 2.8 `omp_get_max_task_priority' - Maximum priority value
    355 ========================================================
    356 
    357 that can be set for tasks.
    358 _Description_:
    359      This function obtains the maximum allowed priority number for
    360      tasks.
    361 
    362 _C/C++_
    363      _Prototype_:  `int omp_get_max_task_priority(void);'
    364 
    365 _Fortran_:
    366      _Interface_:  `integer function omp_get_max_task_priority()'
    367 
    368 _Reference_:
    369      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.29.
    370 
    371 
    372 File: libgomp.info,  Node: omp_get_max_threads,  Next: omp_get_nested,  Prev: omp_get_max_task_priority,  Up: Runtime Library Routines
    373 
    374 2.9 `omp_get_max_threads' - Maximum number of threads of parallel region
    375 ========================================================================
    376 
    377 _Description_:
    378      Return the maximum number of threads used for the current parallel
    379      region that does not use the clause `num_threads'.
    380 
    381 _C/C++_:
    382      _Prototype_:  `int omp_get_max_threads(void);'
    383 
    384 _Fortran_:
    385      _Interface_:  `integer function omp_get_max_threads()'
    386 
    387 _See also_:
    388      *note omp_set_num_threads::, *note omp_set_dynamic::, *note
    389      omp_get_thread_limit::
    390 
    391 _Reference_:
    392      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.3.
    393 
    394 
    395 File: libgomp.info,  Node: omp_get_nested,  Next: omp_get_num_devices,  Prev: omp_get_max_threads,  Up: Runtime Library Routines
    396 
    397 2.10 `omp_get_nested' - Nested parallel regions
    398 ===============================================
    399 
    400 _Description_:
    401      This function returns `true' if nested parallel regions are
    402      enabled, `false' otherwise.  Here, `true' and `false' represent
    403      their language-specific counterparts.
    404 
    405      Nested parallel regions may be initialized at startup by the
    406      `OMP_NESTED' environment variable or at runtime using
    407      `omp_set_nested'.  If undefined, nested parallel regions are
    408      disabled by default.
    409 
    410 _C/C++_:
    411      _Prototype_:  `int omp_get_nested(void);'
    412 
    413 _Fortran_:
    414      _Interface_:  `logical function omp_get_nested()'
    415 
    416 _See also_:
    417      *note omp_set_nested::, *note OMP_NESTED::
    418 
    419 _Reference_:
    420      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.11.
    421 
    422 
    423 File: libgomp.info,  Node: omp_get_num_devices,  Next: omp_get_num_procs,  Prev: omp_get_nested,  Up: Runtime Library Routines
    424 
    425 2.11 `omp_get_num_devices' - Number of target devices
    426 =====================================================
    427 
    428 _Description_:
    429      Returns the number of target devices.
    430 
    431 _C/C++_:
    432      _Prototype_:  `int omp_get_num_devices(void);'
    433 
    434 _Fortran_:
    435      _Interface_:  `integer function omp_get_num_devices()'
    436 
    437 _Reference_:
    438      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.31.
    439 
    440 
    441 File: libgomp.info,  Node: omp_get_num_procs,  Next: omp_get_num_teams,  Prev: omp_get_num_devices,  Up: Runtime Library Routines
    442 
    443 2.12 `omp_get_num_procs' - Number of processors online
    444 ======================================================
    445 
    446 _Description_:
    447      Returns the number of processors online on that device.
    448 
    449 _C/C++_:
    450      _Prototype_:  `int omp_get_num_procs(void);'
    451 
    452 _Fortran_:
    453      _Interface_:  `integer function omp_get_num_procs()'
    454 
    455 _Reference_:
    456      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.5.
    457 
    458 
    459 File: libgomp.info,  Node: omp_get_num_teams,  Next: omp_get_num_threads,  Prev: omp_get_num_procs,  Up: Runtime Library Routines
    460 
    461 2.13 `omp_get_num_teams' - Number of teams
    462 ==========================================
    463 
    464 _Description_:
    465      Returns the number of teams in the current team region.
    466 
    467 _C/C++_:
    468      _Prototype_:  `int omp_get_num_teams(void);'
    469 
    470 _Fortran_:
    471      _Interface_:  `integer function omp_get_num_teams()'
    472 
    473 _Reference_:
    474      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.32.
    475 
    476 
    477 File: libgomp.info,  Node: omp_get_num_threads,  Next: omp_get_proc_bind,  Prev: omp_get_num_teams,  Up: Runtime Library Routines
    478 
    479 2.14 `omp_get_num_threads' - Size of the active team
    480 ====================================================
    481 
    482 _Description_:
    483      Returns the number of threads in the current team.  In a
    484      sequential section of the program `omp_get_num_threads' returns 1.
    485 
    486      The default team size may be initialized at startup by the
    487      `OMP_NUM_THREADS' environment variable.  At runtime, the size of
    488      the current team may be set either by the `NUM_THREADS' clause or
    489      by `omp_set_num_threads'.  If none of the above were used to
    490      define a specific value and `OMP_DYNAMIC' is disabled, one thread
    491      per CPU online is used.
    492 
    493 _C/C++_:
    494      _Prototype_:  `int omp_get_num_threads(void);'
    495 
    496 _Fortran_:
    497      _Interface_:  `integer function omp_get_num_threads()'
    498 
    499 _See also_:
    500      *note omp_get_max_threads::, *note omp_set_num_threads::, *note
    501      OMP_NUM_THREADS::
    502 
    503 _Reference_:
    504      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.2.
    505 
    506 
    507 File: libgomp.info,  Node: omp_get_proc_bind,  Next: omp_get_schedule,  Prev: omp_get_num_threads,  Up: Runtime Library Routines
    508 
    509 2.15 `omp_get_proc_bind' - Whether theads may be moved between CPUs
    510 ===================================================================
    511 
    512 _Description_:
    513      This functions returns the currently active thread affinity
    514      policy, which is set via `OMP_PROC_BIND'.  Possible values are
    515      `omp_proc_bind_false', `omp_proc_bind_true',
    516      `omp_proc_bind_master', `omp_proc_bind_close' and
    517      `omp_proc_bind_spread'.
    518 
    519 _C/C++_:
    520      _Prototype_:  `omp_proc_bind_t omp_get_proc_bind(void);'
    521 
    522 _Fortran_:
    523      _Interface_:  `integer(kind=omp_proc_bind_kind) function
    524                    omp_get_proc_bind()'
    525 
    526 _See also_:
    527      *note OMP_PROC_BIND::, *note OMP_PLACES::, *note
    528      GOMP_CPU_AFFINITY::,
    529 
    530 _Reference_:
    531      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.22.
    532 
    533 
    534 File: libgomp.info,  Node: omp_get_schedule,  Next: omp_get_team_num,  Prev: omp_get_proc_bind,  Up: Runtime Library Routines
    535 
    536 2.16 `omp_get_schedule' - Obtain the runtime scheduling method
    537 ==============================================================
    538 
    539 _Description_:
    540      Obtain the runtime scheduling method.  The KIND argument will be
    541      set to the value `omp_sched_static', `omp_sched_dynamic',
    542      `omp_sched_guided' or `omp_sched_auto'.  The second argument,
    543      CHUNK_SIZE, is set to the chunk size.
    544 
    545 _C/C++_
    546      _Prototype_:  `void omp_get_schedule(omp_sched_t *kind, int
    547                    *chunk_size);'
    548 
    549 _Fortran_:
    550      _Interface_:  `subroutine omp_get_schedule(kind, chunk_size)'
    551                    `integer(kind=omp_sched_kind) kind'
    552                    `integer chunk_size'
    553 
    554 _See also_:
    555      *note omp_set_schedule::, *note OMP_SCHEDULE::
    556 
    557 _Reference_:
    558      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.13.
    559 
    560 
    561 File: libgomp.info,  Node: omp_get_team_num,  Next: omp_get_team_size,  Prev: omp_get_schedule,  Up: Runtime Library Routines
    562 
    563 2.17 `omp_get_team_num' - Get team number
    564 =========================================
    565 
    566 _Description_:
    567      Returns the team number of the calling thread.
    568 
    569 _C/C++_:
    570      _Prototype_:  `int omp_get_team_num(void);'
    571 
    572 _Fortran_:
    573      _Interface_:  `integer function omp_get_team_num()'
    574 
    575 _Reference_:
    576      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.33.
    577 
    578 
    579 File: libgomp.info,  Node: omp_get_team_size,  Next: omp_get_thread_limit,  Prev: omp_get_team_num,  Up: Runtime Library Routines
    580 
    581 2.18 `omp_get_team_size' - Number of threads in a team
    582 ======================================================
    583 
    584 _Description_:
    585      This function returns the number of threads in a thread team to
    586      which either the current thread or its ancestor belongs.  For
    587      values of LEVEL outside zero to `omp_get_level', -1 is returned;
    588      if LEVEL is zero, 1 is returned, and for `omp_get_level', the
    589      result is identical to `omp_get_num_threads'.
    590 
    591 _C/C++_:
    592      _Prototype_:  `int omp_get_team_size(int level);'
    593 
    594 _Fortran_:
    595      _Interface_:  `integer function omp_get_team_size(level)'
    596                    `integer level'
    597 
    598 _See also_:
    599      *note omp_get_num_threads::, *note omp_get_level::, *note
    600      omp_get_ancestor_thread_num::
    601 
    602 _Reference_:
    603      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.19.
    604 
    605 
    606 File: libgomp.info,  Node: omp_get_thread_limit,  Next: omp_get_thread_num,  Prev: omp_get_team_size,  Up: Runtime Library Routines
    607 
    608 2.19 `omp_get_thread_limit' - Maximum number of threads
    609 =======================================================
    610 
    611 _Description_:
    612      Return the maximum number of threads of the program.
    613 
    614 _C/C++_:
    615      _Prototype_:  `int omp_get_thread_limit(void);'
    616 
    617 _Fortran_:
    618      _Interface_:  `integer function omp_get_thread_limit()'
    619 
    620 _See also_:
    621      *note omp_get_max_threads::, *note OMP_THREAD_LIMIT::
    622 
    623 _Reference_:
    624      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.14.
    625 
    626 
    627 File: libgomp.info,  Node: omp_get_thread_num,  Next: omp_in_parallel,  Prev: omp_get_thread_limit,  Up: Runtime Library Routines
    628 
    629 2.20 `omp_get_thread_num' - Current thread ID
    630 =============================================
    631 
    632 _Description_:
    633      Returns a unique thread identification number within the current
    634      team.  In a sequential parts of the program, `omp_get_thread_num'
    635      always returns 0.  In parallel regions the return value varies
    636      from 0 to `omp_get_num_threads'-1 inclusive.  The return value of
    637      the master thread of a team is always 0.
    638 
    639 _C/C++_:
    640      _Prototype_:  `int omp_get_thread_num(void);'
    641 
    642 _Fortran_:
    643      _Interface_:  `integer function omp_get_thread_num()'
    644 
    645 _See also_:
    646      *note omp_get_num_threads::, *note omp_get_ancestor_thread_num::
    647 
    648 _Reference_:
    649      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.4.
    650 
    651 
    652 File: libgomp.info,  Node: omp_in_parallel,  Next: omp_in_final,  Prev: omp_get_thread_num,  Up: Runtime Library Routines
    653 
    654 2.21 `omp_in_parallel' - Whether a parallel region is active
    655 ============================================================
    656 
    657 _Description_:
    658      This function returns `true' if currently running in parallel,
    659      `false' otherwise.  Here, `true' and `false' represent their
    660      language-specific counterparts.
    661 
    662 _C/C++_:
    663      _Prototype_:  `int omp_in_parallel(void);'
    664 
    665 _Fortran_:
    666      _Interface_:  `logical function omp_in_parallel()'
    667 
    668 _Reference_:
    669      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.6.
    670 
    671 
    672 File: libgomp.info,  Node: omp_in_final,  Next: omp_is_initial_device,  Prev: omp_in_parallel,  Up: Runtime Library Routines
    673 
    674 2.22 `omp_in_final' - Whether in final or included task region
    675 ==============================================================
    676 
    677 _Description_:
    678      This function returns `true' if currently running in a final or
    679      included task region, `false' otherwise.  Here, `true' and `false'
    680      represent their language-specific counterparts.
    681 
    682 _C/C++_:
    683      _Prototype_:  `int omp_in_final(void);'
    684 
    685 _Fortran_:
    686      _Interface_:  `logical function omp_in_final()'
    687 
    688 _Reference_:
    689      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.21.
    690 
    691 
    692 File: libgomp.info,  Node: omp_is_initial_device,  Next: omp_set_default_device,  Prev: omp_in_final,  Up: Runtime Library Routines
    693 
    694 2.23 `omp_is_initial_device' - Whether executing on the host device
    695 ===================================================================
    696 
    697 _Description_:
    698      This function returns `true' if currently running on the host
    699      device, `false' otherwise.  Here, `true' and `false' represent
    700      their language-specific counterparts.
    701 
    702 _C/C++_:
    703      _Prototype_:  `int omp_is_initial_device(void);'
    704 
    705 _Fortran_:
    706      _Interface_:  `logical function omp_is_initial_device()'
    707 
    708 _Reference_:
    709      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.34.
    710 
    711 
    712 File: libgomp.info,  Node: omp_set_default_device,  Next: omp_set_dynamic,  Prev: omp_is_initial_device,  Up: Runtime Library Routines
    713 
    714 2.24 `omp_set_default_device' - Set the default device for target regions
    715 =========================================================================
    716 
    717 _Description_:
    718      Set the default device for target regions without device clause.
    719      The argument shall be a nonnegative device number.
    720 
    721 _C/C++_:
    722      _Prototype_:  `void omp_set_default_device(int device_num);'
    723 
    724 _Fortran_:
    725      _Interface_:  `subroutine omp_set_default_device(device_num)'
    726                    `integer device_num'
    727 
    728 _See also_:
    729      *note OMP_DEFAULT_DEVICE::, *note omp_get_default_device::
    730 
    731 _Reference_:
    732      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.29.
    733 
    734 
    735 File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_set_max_active_levels,  Prev: omp_set_default_device,  Up: Runtime Library Routines
    736 
    737 2.25 `omp_set_dynamic' - Enable/disable dynamic teams
    738 =====================================================
    739 
    740 _Description_:
    741      Enable or disable the dynamic adjustment of the number of threads
    742      within a team.  The function takes the language-specific equivalent
    743      of `true' and `false', where `true' enables dynamic adjustment of
    744      team sizes and `false' disables it.
    745 
    746 _C/C++_:
    747      _Prototype_:  `void omp_set_dynamic(int dynamic_threads);'
    748 
    749 _Fortran_:
    750      _Interface_:  `subroutine omp_set_dynamic(dynamic_threads)'
    751                    `logical, intent(in) :: dynamic_threads'
    752 
    753 _See also_:
    754      *note OMP_DYNAMIC::, *note omp_get_dynamic::
    755 
    756 _Reference_:
    757      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.7.
    758 
    759 
    760 File: libgomp.info,  Node: omp_set_max_active_levels,  Next: omp_set_nested,  Prev: omp_set_dynamic,  Up: Runtime Library Routines
    761 
    762 2.26 `omp_set_max_active_levels' - Limits the number of active parallel regions
    763 ===============================================================================
    764 
    765 _Description_:
    766      This function limits the maximum allowed number of nested, active
    767      parallel regions.
    768 
    769 _C/C++_
    770      _Prototype_:  `void omp_set_max_active_levels(int max_levels);'
    771 
    772 _Fortran_:
    773      _Interface_:  `subroutine omp_set_max_active_levels(max_levels)'
    774                    `integer max_levels'
    775 
    776 _See also_:
    777      *note omp_get_max_active_levels::, *note omp_get_active_level::
    778 
    779 _Reference_:
    780      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.15.
    781 
    782 
    783 File: libgomp.info,  Node: omp_set_nested,  Next: omp_set_num_threads,  Prev: omp_set_max_active_levels,  Up: Runtime Library Routines
    784 
    785 2.27 `omp_set_nested' - Enable/disable nested parallel regions
    786 ==============================================================
    787 
    788 _Description_:
    789      Enable or disable nested parallel regions, i.e., whether team
    790      members are allowed to create new teams.  The function takes the
    791      language-specific equivalent of `true' and `false', where `true'
    792      enables dynamic adjustment of team sizes and `false' disables it.
    793 
    794 _C/C++_:
    795      _Prototype_:  `void omp_set_nested(int nested);'
    796 
    797 _Fortran_:
    798      _Interface_:  `subroutine omp_set_nested(nested)'
    799                    `logical, intent(in) :: nested'
    800 
    801 _See also_:
    802      *note OMP_NESTED::, *note omp_get_nested::
    803 
    804 _Reference_:
    805      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.10.
    806 
    807 
    808 File: libgomp.info,  Node: omp_set_num_threads,  Next: omp_set_schedule,  Prev: omp_set_nested,  Up: Runtime Library Routines
    809 
    810 2.28 `omp_set_num_threads' - Set upper team size limit
    811 ======================================================
    812 
    813 _Description_:
    814      Specifies the number of threads used by default in subsequent
    815      parallel sections, if those do not specify a `num_threads' clause.
    816      The argument of `omp_set_num_threads' shall be a positive integer.
    817 
    818 _C/C++_:
    819      _Prototype_:  `void omp_set_num_threads(int num_threads);'
    820 
    821 _Fortran_:
    822      _Interface_:  `subroutine omp_set_num_threads(num_threads)'
    823                    `integer, intent(in) :: num_threads'
    824 
    825 _See also_:
    826      *note OMP_NUM_THREADS::, *note omp_get_num_threads::, *note
    827      omp_get_max_threads::
    828 
    829 _Reference_:
    830      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.1.
    831 
    832 
    833 File: libgomp.info,  Node: omp_set_schedule,  Next: omp_init_lock,  Prev: omp_set_num_threads,  Up: Runtime Library Routines
    834 
    835 2.29 `omp_set_schedule' - Set the runtime scheduling method
    836 ===========================================================
    837 
    838 _Description_:
    839      Sets the runtime scheduling method.  The KIND argument can have the
    840      value `omp_sched_static', `omp_sched_dynamic', `omp_sched_guided'
    841      or `omp_sched_auto'.  Except for `omp_sched_auto', the chunk size
    842      is set to the value of CHUNK_SIZE if positive, or to the default
    843      value if zero or negative.  For `omp_sched_auto' the CHUNK_SIZE
    844      argument is ignored.
    845 
    846 _C/C++_
    847      _Prototype_:  `void omp_set_schedule(omp_sched_t kind, int
    848                    chunk_size);'
    849 
    850 _Fortran_:
    851      _Interface_:  `subroutine omp_set_schedule(kind, chunk_size)'
    852                    `integer(kind=omp_sched_kind) kind'
    853                    `integer chunk_size'
    854 
    855 _See also_:
    856      *note omp_get_schedule:: *note OMP_SCHEDULE::
    857 
    858 _Reference_:
    859      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.2.12.
    860 
    861 
    862 File: libgomp.info,  Node: omp_init_lock,  Next: omp_set_lock,  Prev: omp_set_schedule,  Up: Runtime Library Routines
    863 
    864 2.30 `omp_init_lock' - Initialize simple lock
    865 =============================================
    866 
    867 _Description_:
    868      Initialize a simple lock.  After initialization, the lock is in an
    869      unlocked state.
    870 
    871 _C/C++_:
    872      _Prototype_:  `void omp_init_lock(omp_lock_t *lock);'
    873 
    874 _Fortran_:
    875      _Interface_:  `subroutine omp_init_lock(svar)'
    876                    `integer(omp_lock_kind), intent(out) :: svar'
    877 
    878 _See also_:
    879      *note omp_destroy_lock::
    880 
    881 _Reference_:
    882      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.1.
    883 
    884 
    885 File: libgomp.info,  Node: omp_set_lock,  Next: omp_test_lock,  Prev: omp_init_lock,  Up: Runtime Library Routines
    886 
    887 2.31 `omp_set_lock' - Wait for and set simple lock
    888 ==================================================
    889 
    890 _Description_:
    891      Before setting a simple lock, the lock variable must be
    892      initialized by `omp_init_lock'.  The calling thread is blocked
    893      until the lock is available.  If the lock is already held by the
    894      current thread, a deadlock occurs.
    895 
    896 _C/C++_:
    897      _Prototype_:  `void omp_set_lock(omp_lock_t *lock);'
    898 
    899 _Fortran_:
    900      _Interface_:  `subroutine omp_set_lock(svar)'
    901                    `integer(omp_lock_kind), intent(inout) :: svar'
    902 
    903 _See also_:
    904      *note omp_init_lock::, *note omp_test_lock::, *note
    905      omp_unset_lock::
    906 
    907 _Reference_:
    908      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.4.
    909 
    910 
    911 File: libgomp.info,  Node: omp_test_lock,  Next: omp_unset_lock,  Prev: omp_set_lock,  Up: Runtime Library Routines
    912 
    913 2.32 `omp_test_lock' - Test and set simple lock if available
    914 ============================================================
    915 
    916 _Description_:
    917      Before setting a simple lock, the lock variable must be
    918      initialized by `omp_init_lock'.  Contrary to `omp_set_lock',
    919      `omp_test_lock' does not block if the lock is not available.  This
    920      function returns `true' upon success, `false' otherwise.  Here,
    921      `true' and `false' represent their language-specific counterparts.
    922 
    923 _C/C++_:
    924      _Prototype_:  `int omp_test_lock(omp_lock_t *lock);'
    925 
    926 _Fortran_:
    927      _Interface_:  `logical function omp_test_lock(svar)'
    928                    `integer(omp_lock_kind), intent(inout) :: svar'
    929 
    930 _See also_:
    931      *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::
    932 
    933 _Reference_:
    934      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.6.
    935 
    936 
    937 File: libgomp.info,  Node: omp_unset_lock,  Next: omp_destroy_lock,  Prev: omp_test_lock,  Up: Runtime Library Routines
    938 
    939 2.33 `omp_unset_lock' - Unset simple lock
    940 =========================================
    941 
    942 _Description_:
    943      A simple lock about to be unset must have been locked by
    944      `omp_set_lock' or `omp_test_lock' before.  In addition, the lock
    945      must be held by the thread calling `omp_unset_lock'.  Then, the
    946      lock becomes unlocked.  If one or more threads attempted to set
    947      the lock before, one of them is chosen to, again, set the lock to
    948      itself.
    949 
    950 _C/C++_:
    951      _Prototype_:  `void omp_unset_lock(omp_lock_t *lock);'
    952 
    953 _Fortran_:
    954      _Interface_:  `subroutine omp_unset_lock(svar)'
    955                    `integer(omp_lock_kind), intent(inout) :: svar'
    956 
    957 _See also_:
    958      *note omp_set_lock::, *note omp_test_lock::
    959 
    960 _Reference_:
    961      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.5.
    962 
    963 
    964 File: libgomp.info,  Node: omp_destroy_lock,  Next: omp_init_nest_lock,  Prev: omp_unset_lock,  Up: Runtime Library Routines
    965 
    966 2.34 `omp_destroy_lock' - Destroy simple lock
    967 =============================================
    968 
    969 _Description_:
    970      Destroy a simple lock.  In order to be destroyed, a simple lock
    971      must be in the unlocked state.
    972 
    973 _C/C++_:
    974      _Prototype_:  `void omp_destroy_lock(omp_lock_t *lock);'
    975 
    976 _Fortran_:
    977      _Interface_:  `subroutine omp_destroy_lock(svar)'
    978                    `integer(omp_lock_kind), intent(inout) :: svar'
    979 
    980 _See also_:
    981      *note omp_init_lock::
    982 
    983 _Reference_:
    984      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.3.
    985 
    986 
    987 File: libgomp.info,  Node: omp_init_nest_lock,  Next: omp_set_nest_lock,  Prev: omp_destroy_lock,  Up: Runtime Library Routines
    988 
    989 2.35 `omp_init_nest_lock' - Initialize nested lock
    990 ==================================================
    991 
    992 _Description_:
    993      Initialize a nested lock.  After initialization, the lock is in an
    994      unlocked state and the nesting count is set to zero.
    995 
    996 _C/C++_:
    997      _Prototype_:  `void omp_init_nest_lock(omp_nest_lock_t *lock);'
    998 
    999 _Fortran_:
   1000      _Interface_:  `subroutine omp_init_nest_lock(nvar)'
   1001                    `integer(omp_nest_lock_kind), intent(out) :: nvar'
   1002 
   1003 _See also_:
   1004      *note omp_destroy_nest_lock::
   1005 
   1006 _Reference_:
   1007      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.1.
   1008 
   1009 
   1010 File: libgomp.info,  Node: omp_set_nest_lock,  Next: omp_test_nest_lock,  Prev: omp_init_nest_lock,  Up: Runtime Library Routines
   1011 
   1012 2.36 `omp_set_nest_lock' - Wait for and set nested lock
   1013 =======================================================
   1014 
   1015 _Description_:
   1016      Before setting a nested lock, the lock variable must be
   1017      initialized by `omp_init_nest_lock'.  The calling thread is
   1018      blocked until the lock is available.  If the lock is already held
   1019      by the current thread, the nesting count for the lock is
   1020      incremented.
   1021 
   1022 _C/C++_:
   1023      _Prototype_:  `void omp_set_nest_lock(omp_nest_lock_t *lock);'
   1024 
   1025 _Fortran_:
   1026      _Interface_:  `subroutine omp_set_nest_lock(nvar)'
   1027                    `integer(omp_nest_lock_kind), intent(inout) :: nvar'
   1028 
   1029 _See also_:
   1030      *note omp_init_nest_lock::, *note omp_unset_nest_lock::
   1031 
   1032 _Reference_:
   1033      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.4.
   1034 
   1035 
   1036 File: libgomp.info,  Node: omp_test_nest_lock,  Next: omp_unset_nest_lock,  Prev: omp_set_nest_lock,  Up: Runtime Library Routines
   1037 
   1038 2.37 `omp_test_nest_lock' - Test and set nested lock if available
   1039 =================================================================
   1040 
   1041 _Description_:
   1042      Before setting a nested lock, the lock variable must be
   1043      initialized by `omp_init_nest_lock'.  Contrary to
   1044      `omp_set_nest_lock', `omp_test_nest_lock' does not block if the
   1045      lock is not available.  If the lock is already held by the current
   1046      thread, the new nesting count is returned.  Otherwise, the return
   1047      value equals zero.
   1048 
   1049 _C/C++_:
   1050      _Prototype_:  `int omp_test_nest_lock(omp_nest_lock_t *lock);'
   1051 
   1052 _Fortran_:
   1053      _Interface_:  `logical function omp_test_nest_lock(nvar)'
   1054                    `integer(omp_nest_lock_kind), intent(inout) :: nvar'
   1055 
   1056 _See also_:
   1057      *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::
   1058 
   1059 _Reference_:
   1060      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.6.
   1061 
   1062 
   1063 File: libgomp.info,  Node: omp_unset_nest_lock,  Next: omp_destroy_nest_lock,  Prev: omp_test_nest_lock,  Up: Runtime Library Routines
   1064 
   1065 2.38 `omp_unset_nest_lock' - Unset nested lock
   1066 ==============================================
   1067 
   1068 _Description_:
   1069      A nested lock about to be unset must have been locked by
   1070      `omp_set_nested_lock' or `omp_test_nested_lock' before.  In
   1071      addition, the lock must be held by the thread calling
   1072      `omp_unset_nested_lock'.  If the nesting count drops to zero, the
   1073      lock becomes unlocked.  If one ore more threads attempted to set
   1074      the lock before, one of them is chosen to, again, set the lock to
   1075      itself.
   1076 
   1077 _C/C++_:
   1078      _Prototype_:  `void omp_unset_nest_lock(omp_nest_lock_t *lock);'
   1079 
   1080 _Fortran_:
   1081      _Interface_:  `subroutine omp_unset_nest_lock(nvar)'
   1082                    `integer(omp_nest_lock_kind), intent(inout) :: nvar'
   1083 
   1084 _See also_:
   1085      *note omp_set_nest_lock::
   1086 
   1087 _Reference_:
   1088      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.5.
   1089 
   1090 
   1091 File: libgomp.info,  Node: omp_destroy_nest_lock,  Next: omp_get_wtick,  Prev: omp_unset_nest_lock,  Up: Runtime Library Routines
   1092 
   1093 2.39 `omp_destroy_nest_lock' - Destroy nested lock
   1094 ==================================================
   1095 
   1096 _Description_:
   1097      Destroy a nested lock.  In order to be destroyed, a nested lock
   1098      must be in the unlocked state and its nesting count must equal
   1099      zero.
   1100 
   1101 _C/C++_:
   1102      _Prototype_:  `void omp_destroy_nest_lock(omp_nest_lock_t *);'
   1103 
   1104 _Fortran_:
   1105      _Interface_:  `subroutine omp_destroy_nest_lock(nvar)'
   1106                    `integer(omp_nest_lock_kind), intent(inout) :: nvar'
   1107 
   1108 _See also_:
   1109      *note omp_init_lock::
   1110 
   1111 _Reference_:
   1112      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.3.3.
   1113 
   1114 
   1115 File: libgomp.info,  Node: omp_get_wtick,  Next: omp_get_wtime,  Prev: omp_destroy_nest_lock,  Up: Runtime Library Routines
   1116 
   1117 2.40 `omp_get_wtick' - Get timer precision
   1118 ==========================================
   1119 
   1120 _Description_:
   1121      Gets the timer precision, i.e., the number of seconds between two
   1122      successive clock ticks.
   1123 
   1124 _C/C++_:
   1125      _Prototype_:  `double omp_get_wtick(void);'
   1126 
   1127 _Fortran_:
   1128      _Interface_:  `double precision function omp_get_wtick()'
   1129 
   1130 _See also_:
   1131      *note omp_get_wtime::
   1132 
   1133 _Reference_:
   1134      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.4.2.
   1135 
   1136 
   1137 File: libgomp.info,  Node: omp_get_wtime,  Prev: omp_get_wtick,  Up: Runtime Library Routines
   1138 
   1139 2.41 `omp_get_wtime' - Elapsed wall clock time
   1140 ==============================================
   1141 
   1142 _Description_:
   1143      Elapsed wall clock time in seconds.  The time is measured per
   1144      thread, no guarantee can be made that two distinct threads measure
   1145      the same time.  Time is measured from some "time in the past",
   1146      which is an arbitrary time guaranteed not to change during the
   1147      execution of the program.
   1148 
   1149 _C/C++_:
   1150      _Prototype_:  `double omp_get_wtime(void);'
   1151 
   1152 _Fortran_:
   1153      _Interface_:  `double precision function omp_get_wtime()'
   1154 
   1155 _See also_:
   1156      *note omp_get_wtick::
   1157 
   1158 _Reference_:
   1159      OpenMP specification v4.5 (http://www.openmp.org/), Section 3.4.1.
   1160 
   1161 
   1162 File: libgomp.info,  Node: Environment Variables,  Next: Enabling OpenACC,  Prev: Runtime Library Routines,  Up: Top
   1163 
   1164 3 Environment Variables
   1165 ***********************
   1166 
   1167 The environment variables which beginning with `OMP_' are defined by
   1168 section 4 of the OpenMP specification in version 4.5, while those
   1169 beginning with `GOMP_' are GNU extensions.
   1170 
   1171 * Menu:
   1172 
   1173 * OMP_CANCELLATION::        Set whether cancellation is activated
   1174 * OMP_DISPLAY_ENV::         Show OpenMP version and environment variables
   1175 * OMP_DEFAULT_DEVICE::      Set the device used in target regions
   1176 * OMP_DYNAMIC::             Dynamic adjustment of threads
   1177 * OMP_MAX_ACTIVE_LEVELS::   Set the maximum number of nested parallel regions
   1178 * OMP_MAX_TASK_PRIORITY::   Set the maximum task priority value
   1179 * OMP_NESTED::              Nested parallel regions
   1180 * OMP_NUM_THREADS::         Specifies the number of threads to use
   1181 * OMP_PROC_BIND::           Whether theads may be moved between CPUs
   1182 * OMP_PLACES::              Specifies on which CPUs the theads should be placed
   1183 * OMP_STACKSIZE::           Set default thread stack size
   1184 * OMP_SCHEDULE::            How threads are scheduled
   1185 * OMP_THREAD_LIMIT::        Set the maximum number of threads
   1186 * OMP_WAIT_POLICY::         How waiting threads are handled
   1187 * GOMP_CPU_AFFINITY::       Bind threads to specific CPUs
   1188 * GOMP_DEBUG::              Enable debugging output
   1189 * GOMP_STACKSIZE::          Set default thread stack size
   1190 * GOMP_SPINCOUNT::          Set the busy-wait spin count
   1191 * GOMP_RTEMS_THREAD_POOLS:: Set the RTEMS specific thread pools
   1192 
   1193 
   1194 File: libgomp.info,  Node: OMP_CANCELLATION,  Next: OMP_DISPLAY_ENV,  Up: Environment Variables
   1195 
   1196 3.1 `OMP_CANCELLATION' - Set whether cancellation is activated
   1197 ==============================================================
   1198 
   1199 _Description_:
   1200      If set to `TRUE', the cancellation is activated.  If set to
   1201      `FALSE' or if unset, cancellation is disabled and the `cancel'
   1202      construct is ignored.
   1203 
   1204 _See also_:
   1205      *note omp_get_cancellation::
   1206 
   1207 _Reference_:
   1208      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.11
   1209 
   1210 
   1211 File: libgomp.info,  Node: OMP_DISPLAY_ENV,  Next: OMP_DEFAULT_DEVICE,  Prev: OMP_CANCELLATION,  Up: Environment Variables
   1212 
   1213 3.2 `OMP_DISPLAY_ENV' - Show OpenMP version and environment variables
   1214 =====================================================================
   1215 
   1216 _Description_:
   1217      If set to `TRUE', the OpenMP version number and the values
   1218      associated with the OpenMP environment variables are printed to
   1219      `stderr'.  If set to `VERBOSE', it additionally shows the value of
   1220      the environment variables which are GNU extensions.  If undefined
   1221      or set to `FALSE', this information will not be shown.
   1222 
   1223 _Reference_:
   1224      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.12
   1225 
   1226 
   1227 File: libgomp.info,  Node: OMP_DEFAULT_DEVICE,  Next: OMP_DYNAMIC,  Prev: OMP_DISPLAY_ENV,  Up: Environment Variables
   1228 
   1229 3.3 `OMP_DEFAULT_DEVICE' - Set the device used in target regions
   1230 ================================================================
   1231 
   1232 _Description_:
   1233      Set to choose the device which is used in a `target' region,
   1234      unless the value is overridden by `omp_set_default_device' or by a
   1235      `device' clause.  The value shall be the nonnegative device
   1236      number. If no device with the given device number exists, the code
   1237      is executed on the host.  If unset, device number 0 will be used.
   1238 
   1239 _See also_:
   1240      *note omp_get_default_device::, *note omp_set_default_device::,
   1241 
   1242 _Reference_:
   1243      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.13
   1244 
   1245 
   1246 File: libgomp.info,  Node: OMP_DYNAMIC,  Next: OMP_MAX_ACTIVE_LEVELS,  Prev: OMP_DEFAULT_DEVICE,  Up: Environment Variables
   1247 
   1248 3.4 `OMP_DYNAMIC' - Dynamic adjustment of threads
   1249 =================================================
   1250 
   1251 _Description_:
   1252      Enable or disable the dynamic adjustment of the number of threads
   1253      within a team.  The value of this environment variable shall be
   1254      `TRUE' or `FALSE'.  If undefined, dynamic adjustment is disabled
   1255      by default.
   1256 
   1257 _See also_:
   1258      *note omp_set_dynamic::
   1259 
   1260 _Reference_:
   1261      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.3
   1262 
   1263 
   1264 File: libgomp.info,  Node: OMP_MAX_ACTIVE_LEVELS,  Next: OMP_MAX_TASK_PRIORITY,  Prev: OMP_DYNAMIC,  Up: Environment Variables
   1265 
   1266 3.5 `OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
   1267 ===============================================================================
   1268 
   1269 _Description_:
   1270      Specifies the initial value for the maximum number of nested
   1271      parallel regions.  The value of this variable shall be a positive
   1272      integer.  If undefined, the number of active levels is unlimited.
   1273 
   1274 _See also_:
   1275      *note omp_set_max_active_levels::
   1276 
   1277 _Reference_:
   1278      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.9
   1279 
   1280 
   1281 File: libgomp.info,  Node: OMP_MAX_TASK_PRIORITY,  Next: OMP_NESTED,  Prev: OMP_MAX_ACTIVE_LEVELS,  Up: Environment Variables
   1282 
   1283 3.6 `OMP_MAX_TASK_PRIORITY' - Set the maximum priority
   1284 ======================================================
   1285 
   1286 number that can be set for a task.  
   1287 _Description_:
   1288      Specifies the initial value for the maximum priority value that
   1289      can be set for a task.  The value of this variable shall be a
   1290      non-negative integer, and zero is allowed.  If undefined, the
   1291      default priority is 0.
   1292 
   1293 _See also_:
   1294      *note omp_get_max_task_priority::
   1295 
   1296 _Reference_:
   1297      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.14
   1298 
   1299 
   1300 File: libgomp.info,  Node: OMP_NESTED,  Next: OMP_NUM_THREADS,  Prev: OMP_MAX_TASK_PRIORITY,  Up: Environment Variables
   1301 
   1302 3.7 `OMP_NESTED' - Nested parallel regions
   1303 ==========================================
   1304 
   1305 _Description_:
   1306      Enable or disable nested parallel regions, i.e., whether team
   1307      members are allowed to create new teams.  The value of this
   1308      environment variable shall be `TRUE' or `FALSE'.  If undefined,
   1309      nested parallel regions are disabled by default.
   1310 
   1311 _See also_:
   1312      *note omp_set_nested::
   1313 
   1314 _Reference_:
   1315      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.6
   1316 
   1317 
   1318 File: libgomp.info,  Node: OMP_NUM_THREADS,  Next: OMP_PROC_BIND,  Prev: OMP_NESTED,  Up: Environment Variables
   1319 
   1320 3.8 `OMP_NUM_THREADS' - Specifies the number of threads to use
   1321 ==============================================================
   1322 
   1323 _Description_:
   1324      Specifies the default number of threads to use in parallel
   1325      regions.  The value of this variable shall be a comma-separated
   1326      list of positive integers; the value specified the number of
   1327      threads to use for the corresponding nested level.  If undefined
   1328      one thread per CPU is used.
   1329 
   1330 _See also_:
   1331      *note omp_set_num_threads::
   1332 
   1333 _Reference_:
   1334      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.2
   1335 
   1336 
   1337 File: libgomp.info,  Node: OMP_PROC_BIND,  Next: OMP_PLACES,  Prev: OMP_NUM_THREADS,  Up: Environment Variables
   1338 
   1339 3.9 `OMP_PROC_BIND' - Whether theads may be moved between CPUs
   1340 ==============================================================
   1341 
   1342 _Description_:
   1343      Specifies whether threads may be moved between processors.  If set
   1344      to `TRUE', OpenMP theads should not be moved; if set to `FALSE'
   1345      they may be moved.  Alternatively, a comma separated list with the
   1346      values `MASTER', `CLOSE' and `SPREAD' can be used to specify the
   1347      thread affinity policy for the corresponding nesting level.  With
   1348      `MASTER' the worker threads are in the same place partition as the
   1349      master thread.  With `CLOSE' those are kept close to the master
   1350      thread in contiguous place partitions.  And with `SPREAD' a sparse
   1351      distribution across the place partitions is used.
   1352 
   1353      When undefined, `OMP_PROC_BIND' defaults to `TRUE' when
   1354      `OMP_PLACES' or `GOMP_CPU_AFFINITY' is set and `FALSE' otherwise.
   1355 
   1356 _See also_:
   1357      *note OMP_PLACES::, *note GOMP_CPU_AFFINITY::, *note
   1358      omp_get_proc_bind::
   1359 
   1360 _Reference_:
   1361      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.4
   1362 
   1363 
   1364 File: libgomp.info,  Node: OMP_PLACES,  Next: OMP_STACKSIZE,  Prev: OMP_PROC_BIND,  Up: Environment Variables
   1365 
   1366 3.10 `OMP_PLACES' - Specifies on which CPUs the theads should be placed
   1367 =======================================================================
   1368 
   1369 _Description_:
   1370      The thread placement can be either specified using an abstract
   1371      name or by an explicit list of the places.  The abstract names
   1372      `threads', `cores' and `sockets' can be optionally followed by a
   1373      positive number in parentheses, which denotes the how many places
   1374      shall be created.  With `threads' each place corresponds to a
   1375      single hardware thread; `cores' to a single core with the
   1376      corresponding number of hardware threads; and with `sockets' the
   1377      place corresponds to a single socket.  The resulting placement can
   1378      be shown by setting the `OMP_DISPLAY_ENV' environment variable.
   1379 
   1380      Alternatively, the placement can be specified explicitly as
   1381      comma-separated list of places.  A place is specified by set of
   1382      nonnegative numbers in curly braces, denoting the denoting the
   1383      hardware threads.  The hardware threads belonging to a place can
   1384      either be specified as comma-separated list of nonnegative thread
   1385      numbers or using an interval.  Multiple places can also be either
   1386      specified by a comma-separated list of places or by an interval.
   1387      To specify an interval, a colon followed by the count is placed
   1388      after after the hardware thread number or the place.  Optionally,
   1389      the length can be followed by a colon and the stride number -
   1390      otherwise a unit stride is assumed.  For instance, the following
   1391      specifies the same places list: `"{0,1,2}, {3,4,6}, {7,8,9},
   1392      {10,11,12}"'; `"{0:3}, {3:3}, {7:3}, {10:3}"'; and `"{0:2}:4:3"'.
   1393 
   1394      If `OMP_PLACES' and `GOMP_CPU_AFFINITY' are unset and
   1395      `OMP_PROC_BIND' is either unset or `false', threads may be moved
   1396      between CPUs following no placement policy.
   1397 
   1398 _See also_:
   1399      *note OMP_PROC_BIND::, *note GOMP_CPU_AFFINITY::, *note
   1400      omp_get_proc_bind::, *note OMP_DISPLAY_ENV::
   1401 
   1402 _Reference_:
   1403      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.5
   1404 
   1405 
   1406 File: libgomp.info,  Node: OMP_STACKSIZE,  Next: OMP_SCHEDULE,  Prev: OMP_PLACES,  Up: Environment Variables
   1407 
   1408 3.11 `OMP_STACKSIZE' - Set default thread stack size
   1409 ====================================================
   1410 
   1411 _Description_:
   1412      Set the default thread stack size in kilobytes, unless the number
   1413      is suffixed by `B', `K', `M' or `G', in which case the size is,
   1414      respectively, in bytes, kilobytes, megabytes or gigabytes.  This
   1415      is different from `pthread_attr_setstacksize' which gets the
   1416      number of bytes as an argument.  If the stack size cannot be set
   1417      due to system constraints, an error is reported and the initial
   1418      stack size is left unchanged.  If undefined, the stack size is
   1419      system dependent.
   1420 
   1421 _Reference_:
   1422      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.7
   1423 
   1424 
   1425 File: libgomp.info,  Node: OMP_SCHEDULE,  Next: OMP_THREAD_LIMIT,  Prev: OMP_STACKSIZE,  Up: Environment Variables
   1426 
   1427 3.12 `OMP_SCHEDULE' - How threads are scheduled
   1428 ===============================================
   1429 
   1430 _Description_:
   1431      Allows to specify `schedule type' and `chunk size'.  The value of
   1432      the variable shall have the form: `type[,chunk]' where `type' is
   1433      one of `static', `dynamic', `guided' or `auto' The optional
   1434      `chunk' size shall be a positive integer.  If undefined, dynamic
   1435      scheduling and a chunk size of 1 is used.
   1436 
   1437 _See also_:
   1438      *note omp_set_schedule::
   1439 
   1440 _Reference_:
   1441      OpenMP specification v4.5 (http://www.openmp.org/), Sections
   1442      2.7.1.1 and 4.1
   1443 
   1444 
   1445 File: libgomp.info,  Node: OMP_THREAD_LIMIT,  Next: OMP_WAIT_POLICY,  Prev: OMP_SCHEDULE,  Up: Environment Variables
   1446 
   1447 3.13 `OMP_THREAD_LIMIT' - Set the maximum number of threads
   1448 ===========================================================
   1449 
   1450 _Description_:
   1451      Specifies the number of threads to use for the whole program.  The
   1452      value of this variable shall be a positive integer.  If undefined,
   1453      the number of threads is not limited.
   1454 
   1455 _See also_:
   1456      *note OMP_NUM_THREADS::, *note omp_get_thread_limit::
   1457 
   1458 _Reference_:
   1459      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.10
   1460 
   1461 
   1462 File: libgomp.info,  Node: OMP_WAIT_POLICY,  Next: GOMP_CPU_AFFINITY,  Prev: OMP_THREAD_LIMIT,  Up: Environment Variables
   1463 
   1464 3.14 `OMP_WAIT_POLICY' - How waiting threads are handled
   1465 ========================================================
   1466 
   1467 _Description_:
   1468      Specifies whether waiting threads should be active or passive.  If
   1469      the value is `PASSIVE', waiting threads should not consume CPU
   1470      power while waiting; while the value is `ACTIVE' specifies that
   1471      they should.  If undefined, threads wait actively for a short time
   1472      before waiting passively.
   1473 
   1474 _See also_:
   1475      *note GOMP_SPINCOUNT::
   1476 
   1477 _Reference_:
   1478      OpenMP specification v4.5 (http://www.openmp.org/), Section 4.8
   1479 
   1480 
   1481 File: libgomp.info,  Node: GOMP_CPU_AFFINITY,  Next: GOMP_DEBUG,  Prev: OMP_WAIT_POLICY,  Up: Environment Variables
   1482 
   1483 3.15 `GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
   1484 ========================================================
   1485 
   1486 _Description_:
   1487      Binds threads to specific CPUs.  The variable should contain a
   1488      space-separated or comma-separated list of CPUs.  This list may
   1489      contain different kinds of entries: either single CPU numbers in
   1490      any order, a range of CPUs (M-N) or a range with some stride
   1491      (M-N:S).  CPU numbers are zero based.  For example,
   1492      `GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
   1493      to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to
   1494      CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8,
   1495      10, 12, and 14 respectively and then start assigning back from the
   1496      beginning of the list.  `GOMP_CPU_AFFINITY=0' binds all threads to
   1497      CPU 0.
   1498 
   1499      There is no libgomp library routine to determine whether a CPU
   1500      affinity specification is in effect.  As a workaround,
   1501      language-specific library functions, e.g., `getenv' in C or
   1502      `GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
   1503      setting of the `GOMP_CPU_AFFINITY' environment variable.  A
   1504      defined CPU affinity on startup cannot be changed or disabled
   1505      during the runtime of the application.
   1506 
   1507      If both `GOMP_CPU_AFFINITY' and `OMP_PROC_BIND' are set,
   1508      `OMP_PROC_BIND' has a higher precedence.  If neither has been set
   1509      and `OMP_PROC_BIND' is unset, or when `OMP_PROC_BIND' is set to
   1510      `FALSE', the host system will handle the assignment of threads to
   1511      CPUs.
   1512 
   1513 _See also_:
   1514      *note OMP_PLACES::, *note OMP_PROC_BIND::
   1515 
   1516 
   1517 File: libgomp.info,  Node: GOMP_DEBUG,  Next: GOMP_STACKSIZE,  Prev: GOMP_CPU_AFFINITY,  Up: Environment Variables
   1518 
   1519 3.16 `GOMP_DEBUG' - Enable debugging output
   1520 ===========================================
   1521 
   1522 _Description_:
   1523      Enable debugging output.  The variable should be set to `0'
   1524      (disabled, also the default if not set), or `1' (enabled).
   1525 
   1526      If enabled, some debugging output will be printed during execution.
   1527      This is currently not specified in more detail, and subject to
   1528      change.
   1529 
   1530 
   1531 File: libgomp.info,  Node: GOMP_STACKSIZE,  Next: GOMP_SPINCOUNT,  Prev: GOMP_DEBUG,  Up: Environment Variables
   1532 
   1533 3.17 `GOMP_STACKSIZE' - Set default thread stack size
   1534 =====================================================
   1535 
   1536 _Description_:
   1537      Set the default thread stack size in kilobytes.  This is different
   1538      from `pthread_attr_setstacksize' which gets the number of bytes as
   1539      an argument.  If the stack size cannot be set due to system
   1540      constraints, an error is reported and the initial stack size is
   1541      left unchanged.  If undefined, the stack size is system dependent.
   1542 
   1543 _See also_:
   1544      *note OMP_STACKSIZE::
   1545 
   1546 _Reference_:
   1547      GCC Patches Mailinglist
   1548      (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00493.html), GCC
   1549      Patches Mailinglist
   1550      (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00496.html)
   1551 
   1552 
   1553 File: libgomp.info,  Node: GOMP_SPINCOUNT,  Next: GOMP_RTEMS_THREAD_POOLS,  Prev: GOMP_STACKSIZE,  Up: Environment Variables
   1554 
   1555 3.18 `GOMP_SPINCOUNT' - Set the busy-wait spin count
   1556 ====================================================
   1557 
   1558 _Description_:
   1559      Determines how long a threads waits actively with consuming CPU
   1560      power before waiting passively without consuming CPU power.  The
   1561      value may be either `INFINITE', `INFINITY' to always wait actively
   1562      or an integer which gives the number of spins of the busy-wait
   1563      loop.  The integer may optionally be followed by the following
   1564      suffixes acting as multiplication factors: `k' (kilo, thousand),
   1565      `M' (mega, million), `G' (giga, billion), or `T' (tera, trillion).
   1566      If undefined, 0 is used when `OMP_WAIT_POLICY' is `PASSIVE',
   1567      300,000 is used when `OMP_WAIT_POLICY' is undefined and 30 billion
   1568      is used when `OMP_WAIT_POLICY' is `ACTIVE'.  If there are more
   1569      OpenMP threads than available CPUs, 1000 and 100 spins are used
   1570      for `OMP_WAIT_POLICY' being `ACTIVE' or undefined, respectively;
   1571      unless the `GOMP_SPINCOUNT' is lower or `OMP_WAIT_POLICY' is
   1572      `PASSIVE'.
   1573 
   1574 _See also_:
   1575      *note OMP_WAIT_POLICY::
   1576 
   1577 
   1578 File: libgomp.info,  Node: GOMP_RTEMS_THREAD_POOLS,  Prev: GOMP_SPINCOUNT,  Up: Environment Variables
   1579 
   1580 3.19 `GOMP_RTEMS_THREAD_POOLS' - Set the RTEMS specific thread pools
   1581 ====================================================================
   1582 
   1583 _Description_:
   1584      This environment variable is only used on the RTEMS real-time
   1585      operating system.  It determines the scheduler instance specific
   1586      thread pools.  The format for `GOMP_RTEMS_THREAD_POOLS' is a list
   1587      of optional `<thread-pool-count>[$<priority>]@<scheduler-name>'
   1588      configurations separated by `:' where:
   1589         * `<thread-pool-count>' is the thread pool count for this
   1590           scheduler instance.
   1591 
   1592         * `$<priority>' is an optional priority for the worker threads
   1593           of a thread pool according to `pthread_setschedparam'.  In
   1594           case a priority value is omitted, then a worker thread will
   1595           inherit the priority of the OpenMP master thread that created
   1596           it.  The priority of the worker thread is not changed after
   1597           creation, even if a new OpenMP master thread using the worker
   1598           has a different priority.
   1599 
   1600         * `@<scheduler-name>' is the scheduler instance name according
   1601           to the RTEMS application configuration.
   1602      In case no thread pool configuration is specified for a scheduler
   1603      instance, then each OpenMP master thread of this scheduler
   1604      instance will use its own dynamically allocated thread pool.  To
   1605      limit the worker thread count of the thread pools, each OpenMP
   1606      master thread must call `omp_set_num_threads'.
   1607 
   1608 _Example_:
   1609      Lets suppose we have three scheduler instances `IO', `WRK0', and
   1610      `WRK1' with `GOMP_RTEMS_THREAD_POOLS' set to `"1@WRK0:3$4@WRK1"'.
   1611      Then there are no thread pool restrictions for scheduler instance
   1612      `IO'.  In the scheduler instance `WRK0' there is one thread pool
   1613      available.  Since no priority is specified for this scheduler
   1614      instance, the worker thread inherits the priority of the OpenMP
   1615      master thread that created it.  In the scheduler instance `WRK1'
   1616      there are three thread pools available and their worker threads
   1617      run at priority four.
   1618 
   1619 
   1620 File: libgomp.info,  Node: Enabling OpenACC,  Next: OpenACC Runtime Library Routines,  Prev: Environment Variables,  Up: Top
   1621 
   1622 4 Enabling OpenACC
   1623 ******************
   1624 
   1625 To activate the OpenACC extensions for C/C++ and Fortran, the
   1626 compile-time flag `-fopenacc' must be specified.  This enables the
   1627 OpenACC directive `#pragma acc' in C/C++ and `!$accp' directives in
   1628 free form, `c$acc', `*$acc' and `!$acc' directives in fixed form, `!$'
   1629 conditional compilation sentinels in free form and `c$', `*$' and `!$'
   1630 sentinels in fixed form, for Fortran.  The flag also arranges for
   1631 automatic linking of the OpenACC runtime library (*note OpenACC Runtime
   1632 Library Routines::).
   1633 
   1634    A complete description of all OpenACC directives accepted may be
   1635 found in the OpenACC (http://www.openacc.org/) Application Programming
   1636 Interface manual, version 2.0.
   1637 
   1638    Note that this is an experimental feature and subject to change in
   1639 future versions of GCC.  See `https://gcc.gnu.org/wiki/OpenACC' for
   1640 more information.
   1641 
   1642 
   1643 File: libgomp.info,  Node: OpenACC Runtime Library Routines,  Next: OpenACC Environment Variables,  Prev: Enabling OpenACC,  Up: Top
   1644 
   1645 5 OpenACC Runtime Library Routines
   1646 **********************************
   1647 
   1648 The runtime routines described here are defined by section 3 of the
   1649 OpenACC specifications in version 2.0.  They have C linkage, and do not
   1650 throw exceptions.  Generally, they are available only for the host,
   1651 with the exception of `acc_on_device', which is available for both the
   1652 host and the acceleration device.
   1653 
   1654 * Menu:
   1655 
   1656 * acc_get_num_devices::         Get number of devices for the given device
   1657                                 type.
   1658 * acc_set_device_type::         Set type of device accelerator to use.
   1659 * acc_get_device_type::         Get type of device accelerator to be used.
   1660 * acc_set_device_num::          Set device number to use.
   1661 * acc_get_device_num::          Get device number to be used.
   1662 * acc_async_test::              Tests for completion of a specific asynchronous
   1663                                 operation.
   1664 * acc_async_test_all::          Tests for completion of all asychronous
   1665                                 operations.
   1666 * acc_wait::                    Wait for completion of a specific asynchronous
   1667                                 operation.
   1668 * acc_wait_all::                Waits for completion of all asyncrhonous
   1669                                 operations.
   1670 * acc_wait_all_async::          Wait for completion of all asynchronous
   1671                                 operations.
   1672 * acc_wait_async::              Wait for completion of asynchronous operations.
   1673 * acc_init::                    Initialize runtime for a specific device type.
   1674 * acc_shutdown::                Shuts down the runtime for a specific device
   1675                                 type.
   1676 * acc_on_device::               Whether executing on a particular device
   1677 * acc_malloc::                  Allocate device memory.
   1678 * acc_free::                    Free device memory.
   1679 * acc_copyin::                  Allocate device memory and copy host memory to
   1680                                 it.
   1681 * acc_present_or_copyin::       If the data is not present on the device,
   1682                                 allocate device memory and copy from host
   1683                                 memory.
   1684 * acc_create::                  Allocate device memory and map it to host
   1685                                 memory.
   1686 * acc_present_or_create::       If the data is not present on the device,
   1687                                 allocate device memory and map it to host
   1688                                 memory.
   1689 * acc_copyout::                 Copy device memory to host memory.
   1690 * acc_delete::                  Free device memory.
   1691 * acc_update_device::           Update device memory from mapped host memory.
   1692 * acc_update_self::             Update host memory from mapped device memory.
   1693 * acc_map_data::                Map previously allocated device memory to host
   1694                                 memory.
   1695 * acc_unmap_data::              Unmap device memory from host memory.
   1696 * acc_deviceptr::               Get device pointer associated with specific
   1697                                 host address.
   1698 * acc_hostptr::                 Get host pointer associated with specific
   1699                                 device address.
   1700 * acc_is_present::              Indiciate whether host variable / array is
   1701                                 present on device.
   1702 * acc_memcpy_to_device::        Copy host memory to device memory.
   1703 * acc_memcpy_from_device::      Copy device memory to host memory.
   1704 
   1705 API routines for target platforms.
   1706 
   1707 * acc_get_current_cuda_device:: Get CUDA device handle.
   1708 * acc_get_current_cuda_context::Get CUDA context handle.
   1709 * acc_get_cuda_stream::         Get CUDA stream handle.
   1710 * acc_set_cuda_stream::         Set CUDA stream handle.
   1711 
   1712 
   1713 File: libgomp.info,  Node: acc_get_num_devices,  Next: acc_set_device_type,  Up: OpenACC Runtime Library Routines
   1714 
   1715 5.1 `acc_get_num_devices' - Get number of devices for given device type
   1716 =======================================================================
   1717 
   1718 _Description_
   1719      This function returns a value indicating the number of devices
   1720      available for the device type specified in DEVICETYPE.
   1721 
   1722 _C/C++_:
   1723      _Prototype_:  `int acc_get_num_devices(acc_device_t devicetype);'
   1724 
   1725 _Fortran_:
   1726      _Interface_:  `integer function acc_get_num_devices(devicetype)'
   1727                    `integer(kind=acc_device_kind) devicetype'
   1728 
   1729 _Reference_:
   1730      OpenACC specification v2.0 (http://www.openacc.org/), section
   1731      3.2.1.
   1732 
   1733 
   1734 File: libgomp.info,  Node: acc_set_device_type,  Next: acc_get_device_type,  Prev: acc_get_num_devices,  Up: OpenACC Runtime Library Routines
   1735 
   1736 5.2 `acc_set_device_type' - Set type of device accelerator to use.
   1737 ==================================================================
   1738 
   1739 _Description_
   1740      This function indicates to the runtime library which device typr,
   1741      specified in DEVICETYPE, to use when executing a parallel or
   1742      kernels region.
   1743 
   1744 _C/C++_:
   1745      _Prototype_:  `acc_set_device_type(acc_device_t devicetype);'
   1746 
   1747 _Fortran_:
   1748      _Interface_:  `subroutine acc_set_device_type(devicetype)'
   1749                    `integer(kind=acc_device_kind) devicetype'
   1750 
   1751 _Reference_:
   1752      OpenACC specification v2.0 (http://www.openacc.org/), section
   1753      3.2.2.
   1754 
   1755 
   1756 File: libgomp.info,  Node: acc_get_device_type,  Next: acc_set_device_num,  Prev: acc_set_device_type,  Up: OpenACC Runtime Library Routines
   1757 
   1758 5.3 `acc_get_device_type' - Get type of device accelerator to be used.
   1759 ======================================================================
   1760 
   1761 _Description_
   1762      This function returns what device type will be used when executing
   1763      a parallel or kernels region.
   1764 
   1765 _C/C++_:
   1766      _Prototype_:  `acc_device_t acc_get_device_type(void);'
   1767 
   1768 _Fortran_:
   1769      _Interface_:  `function acc_get_device_type(void)'
   1770                    `integer(kind=acc_device_kind) acc_get_device_type'
   1771 
   1772 _Reference_:
   1773      OpenACC specification v2.0 (http://www.openacc.org/), section
   1774      3.2.3.
   1775 
   1776 
   1777 File: libgomp.info,  Node: acc_set_device_num,  Next: acc_get_device_num,  Prev: acc_get_device_type,  Up: OpenACC Runtime Library Routines
   1778 
   1779 5.4 `acc_set_device_num' - Set device number to use.
   1780 ====================================================
   1781 
   1782 _Description_
   1783      This function will indicate to the runtime which device number,
   1784      specified by NUM, associated with the specifed device type
   1785      DEVICETYPE.
   1786 
   1787 _C/C++_:
   1788      _Prototype_:  `acc_set_device_num(int num, acc_device_t
   1789                    devicetype);'
   1790 
   1791 _Fortran_:
   1792      _Interface_:  `subroutine acc_set_device_num(devicenum, devicetype)'
   1793                    `integer devicenum'
   1794                    `integer(kind=acc_device_kind) devicetype'
   1795 
   1796 _Reference_:
   1797      OpenACC specification v2.0 (http://www.openacc.org/), section
   1798      3.2.4.
   1799 
   1800 
   1801 File: libgomp.info,  Node: acc_get_device_num,  Next: acc_async_test,  Prev: acc_set_device_num,  Up: OpenACC Runtime Library Routines
   1802 
   1803 5.5 `acc_get_device_num' - Get device number to be used.
   1804 ========================================================
   1805 
   1806 _Description_
   1807      This function returns which device number associated with the
   1808      specified device type DEVICETYPE, will be used when executing a
   1809      parallel or kernels region.
   1810 
   1811 _C/C++_:
   1812      _Prototype_:  `int acc_get_device_num(acc_device_t devicetype);'
   1813 
   1814 _Fortran_:
   1815      _Interface_:  `function acc_get_device_num(devicetype)'
   1816                    `integer(kind=acc_device_kind) devicetype'
   1817                    `integer acc_get_device_num'
   1818 
   1819 _Reference_:
   1820      OpenACC specification v2.0 (http://www.openacc.org/), section
   1821      3.2.5.
   1822 
   1823 
   1824 File: libgomp.info,  Node: acc_async_test,  Next: acc_async_test_all,  Prev: acc_get_device_num,  Up: OpenACC Runtime Library Routines
   1825 
   1826 5.6 `acc_async_test' - Test for completion of a specific asynchronous operation.
   1827 ================================================================================
   1828 
   1829 _Description_
   1830      This function tests for completion of the asynchrounous operation
   1831      specified in ARG. In C/C++, a non-zero value will be returned to
   1832      indicate the specified asynchronous operation has completed. While
   1833      Fortran will return a `true'. If the asynchrounous operation has
   1834      not completed, C/C++ returns a zero and Fortran returns a `false'.
   1835 
   1836 _C/C++_:
   1837      _Prototype_:  `int acc_async_test(int arg);'
   1838 
   1839 _Fortran_:
   1840      _Interface_:  `function acc_async_test(arg)'
   1841                    `integer(kind=acc_handle_kind) arg'
   1842                    `logical acc_async_test'
   1843 
   1844 _Reference_:
   1845      OpenACC specification v2.0 (http://www.openacc.org/), section
   1846      3.2.6.
   1847 
   1848 
   1849 File: libgomp.info,  Node: acc_async_test_all,  Next: acc_wait,  Prev: acc_async_test,  Up: OpenACC Runtime Library Routines
   1850 
   1851 5.7 `acc_async_test_all' - Tests for completion of all asynchronous operations.
   1852 ===============================================================================
   1853 
   1854 _Description_
   1855      This function tests for completion of all asynchrounous operations.
   1856      In C/C++, a non-zero value will be returned to indicate all
   1857      asynchronous operations have completed. While Fortran will return
   1858      a `true'. If any asynchronous operation has not completed, C/C++
   1859      returns a zero and Fortran returns a `false'.
   1860 
   1861 _C/C++_:
   1862      _Prototype_:  `int acc_async_test_all(void);'
   1863 
   1864 _Fortran_:
   1865      _Interface_:  `function acc_async_test()'
   1866                    `logical acc_get_device_num'
   1867 
   1868 _Reference_:
   1869      OpenACC specification v2.0 (http://www.openacc.org/), section
   1870      3.2.7.
   1871 
   1872 
   1873 File: libgomp.info,  Node: acc_wait,  Next: acc_wait_all,  Prev: acc_async_test_all,  Up: OpenACC Runtime Library Routines
   1874 
   1875 5.8 `acc_wait' - Wait for completion of a specific asynchronous operation.
   1876 ==========================================================================
   1877 
   1878 _Description_
   1879      This function waits for completion of the asynchronous operation
   1880      specified in ARG.
   1881 
   1882 _C/C++_:
   1883      _Prototype_:  `acc_wait(arg);'
   1884 
   1885 _Fortran_:
   1886      _Interface_:  `subroutine acc_wait(arg)'
   1887                    `integer(acc_handle_kind) arg'
   1888 
   1889 _Reference_:
   1890      OpenACC specification v2.0 (http://www.openacc.org/), section
   1891      3.2.8.
   1892 
   1893 
   1894 File: libgomp.info,  Node: acc_wait_all,  Next: acc_wait_all_async,  Prev: acc_wait,  Up: OpenACC Runtime Library Routines
   1895 
   1896 5.9 `acc_wait_all' - Waits for completion of all asynchronous operations.
   1897 =========================================================================
   1898 
   1899 _Description_
   1900      This function waits for the completion of all asynchronous
   1901      operations.
   1902 
   1903 _C/C++_:
   1904      _Prototype_:  `acc_wait_all(void);'
   1905 
   1906 _Fortran_:
   1907      _Interface_:  `subroutine acc_wait_async()'
   1908 
   1909 _Reference_:
   1910      OpenACC specification v2.0 (http://www.openacc.org/), section
   1911      3.2.10.
   1912 
   1913 
   1914 File: libgomp.info,  Node: acc_wait_all_async,  Next: acc_wait_async,  Prev: acc_wait_all,  Up: OpenACC Runtime Library Routines
   1915 
   1916 5.10 `acc_wait_all_async' - Wait for completion of all asynchronous operations.
   1917 ===============================================================================
   1918 
   1919 _Description_
   1920      This function enqueues a wait operation on the queue ASYNC for any
   1921      and all asynchronous operations that have been previously enqueued
   1922      on any queue.
   1923 
   1924 _C/C++_:
   1925      _Prototype_:  `acc_wait_all_async(int async);'
   1926 
   1927 _Fortran_:
   1928      _Interface_:  `subroutine acc_wait_all_async(async)'
   1929                    `integer(acc_handle_kind) async'
   1930 
   1931 _Reference_:
   1932      OpenACC specification v2.0 (http://www.openacc.org/), section
   1933      3.2.11.
   1934 
   1935 
   1936 File: libgomp.info,  Node: acc_wait_async,  Next: acc_init,  Prev: acc_wait_all_async,  Up: OpenACC Runtime Library Routines
   1937 
   1938 5.11 `acc_wait_async' - Wait for completion of asynchronous operations.
   1939 =======================================================================
   1940 
   1941 _Description_
   1942      This function enqueues a wait operation on queue ASYNC for any and
   1943      all asynchronous operations enqueued on queue ARG.
   1944 
   1945 _C/C++_:
   1946      _Prototype_:  `acc_wait_async(int arg, int async);'
   1947 
   1948 _Fortran_:
   1949      _Interface_:  `subroutine acc_wait_async(arg, async)'
   1950                    `integer(acc_handle_kind) arg, async'
   1951 
   1952 _Reference_:
   1953      OpenACC specification v2.0 (http://www.openacc.org/), section
   1954      3.2.9.
   1955 
   1956 
   1957 File: libgomp.info,  Node: acc_init,  Next: acc_shutdown,  Prev: acc_wait_async,  Up: OpenACC Runtime Library Routines
   1958 
   1959 5.12 `acc_init' - Initialize runtime for a specific device type.
   1960 ================================================================
   1961 
   1962 _Description_
   1963      This function initializes the runtime for the device type
   1964      specified in DEVICETYPE.
   1965 
   1966 _C/C++_:
   1967      _Prototype_:  `acc_init(acc_device_t devicetype);'
   1968 
   1969 _Fortran_:
   1970      _Interface_:  `subroutine acc_init(devicetype)'
   1971                    `integer(acc_device_kind) devicetype'
   1972 
   1973 _Reference_:
   1974      OpenACC specification v2.0 (http://www.openacc.org/), section
   1975      3.2.12.
   1976 
   1977 
   1978 File: libgomp.info,  Node: acc_shutdown,  Next: acc_on_device,  Prev: acc_init,  Up: OpenACC Runtime Library Routines
   1979 
   1980 5.13 `acc_shutdown' - Shuts down the runtime for a specific device type.
   1981 ========================================================================
   1982 
   1983 _Description_
   1984      This function shuts down the runtime for the device type specified
   1985      in DEVICETYPE.
   1986 
   1987 _C/C++_:
   1988      _Prototype_:  `acc_shutdown(acc_device_t devicetype);'
   1989 
   1990 _Fortran_:
   1991      _Interface_:  `subroutine acc_shutdown(devicetype)'
   1992                    `integer(acc_device_kind) devicetype'
   1993 
   1994 _Reference_:
   1995      OpenACC specification v2.0 (http://www.openacc.org/), section
   1996      3.2.13.
   1997 
   1998 
   1999 File: libgomp.info,  Node: acc_on_device,  Next: acc_malloc,  Prev: acc_shutdown,  Up: OpenACC Runtime Library Routines
   2000 
   2001 5.14 `acc_on_device' - Whether executing on a particular device
   2002 ===============================================================
   2003 
   2004 _Description_:
   2005      This function returns whether the program is executing on a
   2006      particular device specified in DEVICETYPE. In C/C++ a non-zero
   2007      value is returned to indicate the device is execiting on the
   2008      specified device type.  In Fortran, `true' will be returned. If
   2009      the program is not executing on the specified device type C/C++
   2010      will return a zero, while Fortran will return `false'.
   2011 
   2012 _C/C++_:
   2013      _Prototype_:  `acc_on_device(acc_device_t devicetype);'
   2014 
   2015 _Fortran_:
   2016      _Interface_:  `function acc_on_device(devicetype)'
   2017                    `integer(acc_device_kind) devicetype'
   2018                    `logical acc_on_device'
   2019 
   2020 _Reference_:
   2021      OpenACC specification v2.0 (http://www.openacc.org/), section
   2022      3.2.14.
   2023 
   2024 
   2025 File: libgomp.info,  Node: acc_malloc,  Next: acc_free,  Prev: acc_on_device,  Up: OpenACC Runtime Library Routines
   2026 
   2027 5.15 `acc_malloc' - Allocate device memory.
   2028 ===========================================
   2029 
   2030 _Description_
   2031      This function allocates LEN bytes of device memory. It returns the
   2032      device address of the allocated memory.
   2033 
   2034 _C/C++_:
   2035      _Prototype_:  `d_void* acc_malloc(size_t len);'
   2036 
   2037 _Reference_:
   2038      OpenACC specification v2.0 (http://www.openacc.org/), section
   2039      3.2.15.
   2040 
   2041 
   2042 File: libgomp.info,  Node: acc_free,  Next: acc_copyin,  Prev: acc_malloc,  Up: OpenACC Runtime Library Routines
   2043 
   2044 5.16 `acc_free' - Free device memory.
   2045 =====================================
   2046 
   2047 _Description_
   2048      Free previously allocated device memory at the device address `a'.
   2049 
   2050 _C/C++_:
   2051      _Prototype_:  `acc_free(d_void *a);'
   2052 
   2053 _Reference_:
   2054      OpenACC specification v2.0 (http://www.openacc.org/), section
   2055      3.2.16.
   2056 
   2057 
   2058 File: libgomp.info,  Node: acc_copyin,  Next: acc_present_or_copyin,  Prev: acc_free,  Up: OpenACC Runtime Library Routines
   2059 
   2060 5.17 `acc_copyin' - Allocate device memory and copy host memory to it.
   2061 ======================================================================
   2062 
   2063 _Description_
   2064      In C/C++, this function allocates LEN bytes of device memory and
   2065      maps it to the specified host address in A. The device address of
   2066      the newly allocated device memory is returned.
   2067 
   2068      In Fortran, two (2) forms are supported. In the first form, A
   2069      specifies a contiguous array section. The second form A specifies a
   2070      variable or array element and LEN specifies the length in bytes.
   2071 
   2072 _C/C++_:
   2073      _Prototype_:  `void *acc_copyin(h_void *a, size_t len);'
   2074 
   2075 _Fortran_:
   2076      _Interface_:  `subroutine acc_copyin(a)'
   2077                    `type, dimension(:[,:]...) :: a'
   2078      _Interface_:  `subroutine acc_copyin(a, len)'
   2079                    `type, dimension(:[,:]...) :: a'
   2080                    `integer len'
   2081 
   2082 _Reference_:
   2083      OpenACC specification v2.0 (http://www.openacc.org/), section
   2084      3.2.17.
   2085 
   2086 
   2087 File: libgomp.info,  Node: acc_present_or_copyin,  Next: acc_create,  Prev: acc_copyin,  Up: OpenACC Runtime Library Routines
   2088 
   2089 5.18 `acc_present_or_copyin' - If the data is not present on the device, allocate device memory and copy from host memory.
   2090 ==========================================================================================================================
   2091 
   2092 _Description_
   2093      This function tests if the host data specifed by A and of length
   2094      LEN is present or not. If it is not present, then device memory
   2095      will be allocated and the host memory copied. The device address of
   2096      the newly allocated device memory is returned.
   2097 
   2098      In Fortran, two (2) forms are supported. In the first form, A
   2099      specifies a contiguous array section. The second form A specifies
   2100      a variable or array element and LEN specifies the length in bytes.
   2101 
   2102 _C/C++_:
   2103      _Prototype_:  `void *acc_present_or_copyin(h_void *a, size_t len);'
   2104      _Prototype_:  `void *acc_pcopyin(h_void *a, size_t len);'
   2105 
   2106 _Fortran_:
   2107      _Interface_:  `subroutine acc_present_or_copyin(a)'
   2108                    `type, dimension(:[,:]...) :: a'
   2109      _Interface_:  `subroutine acc_present_or_copyin(a, len)'
   2110                    `type, dimension(:[,:]...) :: a'
   2111                    `integer len'
   2112      _Interface_:  `subroutine acc_pcopyin(a)'
   2113                    `type, dimension(:[,:]...) :: a'
   2114      _Interface_:  `subroutine acc_pcopyin(a, len)'
   2115                    `type, dimension(:[,:]...) :: a'
   2116                    `integer len'
   2117 
   2118 _Reference_:
   2119      OpenACC specification v2.0 (http://www.openacc.org/), section
   2120      3.2.18.
   2121 
   2122 
   2123 File: libgomp.info,  Node: acc_create,  Next: acc_present_or_create,  Prev: acc_present_or_copyin,  Up: OpenACC Runtime Library Routines
   2124 
   2125 5.19 `acc_create' - Allocate device memory and map it to host memory.
   2126 =====================================================================
   2127 
   2128 _Description_
   2129      This function allocates device memory and maps it to host memory
   2130      specified by the host address A with a length of LEN bytes. In
   2131      C/C++, the function returns the device address of the allocated
   2132      device memory.
   2133 
   2134      In Fortran, two (2) forms are supported. In the first form, A
   2135      specifies a contiguous array section. The second form A specifies
   2136      a variable or array element and LEN specifies the length in bytes.
   2137 
   2138 _C/C++_:
   2139      _Prototype_:  `void *acc_create(h_void *a, size_t len);'
   2140 
   2141 _Fortran_:
   2142      _Interface_:  `subroutine acc_create(a)'
   2143                    `type, dimension(:[,:]...) :: a'
   2144      _Interface_:  `subroutine acc_create(a, len)'
   2145                    `type, dimension(:[,:]...) :: a'
   2146                    `integer len'
   2147 
   2148 _Reference_:
   2149      OpenACC specification v2.0 (http://www.openacc.org/), section
   2150      3.2.19.
   2151 
   2152 
   2153 File: libgomp.info,  Node: acc_present_or_create,  Next: acc_copyout,  Prev: acc_create,  Up: OpenACC Runtime Library Routines
   2154 
   2155 5.20 `acc_present_or_create' - If the data is not present on the device, allocate device memory and map it to host memory.
   2156 ==========================================================================================================================
   2157 
   2158 _Description_
   2159      This function tests if the host data specifed by A and of length
   2160      LEN is present or not. If it is not present, then device memory
   2161      will be allocated and mapped to host memory. In C/C++, the device
   2162      address of the newly allocated device memory is returned.
   2163 
   2164      In Fortran, two (2) forms are supported. In the first form, A
   2165      specifies a contiguous array section. The second form A specifies
   2166      a variable or array element and LEN specifies the length in bytes.
   2167 
   2168 _C/C++_:
   2169      _Prototype_:  `void *acc_present_or_create(h_void *a, size_t len)'
   2170      _Prototype_:  `void *acc_pcreate(h_void *a, size_t len)'
   2171 
   2172 _Fortran_:
   2173      _Interface_:  `subroutine acc_present_or_create(a)'
   2174                    `type, dimension(:[,:]...) :: a'
   2175      _Interface_:  `subroutine acc_present_or_create(a, len)'
   2176                    `type, dimension(:[,:]...) :: a'
   2177                    `integer len'
   2178      _Interface_:  `subroutine acc_pcreate(a)'
   2179                    `type, dimension(:[,:]...) :: a'
   2180      _Interface_:  `subroutine acc_pcreate(a, len)'
   2181                    `type, dimension(:[,:]...) :: a'
   2182                    `integer len'
   2183 
   2184 _Reference_:
   2185      OpenACC specification v2.0 (http://www.openacc.org/), section
   2186      3.2.20.
   2187 
   2188 
   2189 File: libgomp.info,  Node: acc_copyout,  Next: acc_delete,  Prev: acc_present_or_create,  Up: OpenACC Runtime Library Routines
   2190 
   2191 5.21 `acc_copyout' - Copy device memory to host memory.
   2192 =======================================================
   2193 
   2194 _Description_
   2195      This function copies mapped device memory to host memory which is
   2196      specified by host address A for a length LEN bytes in C/C++.
   2197 
   2198      In Fortran, two (2) forms are supported. In the first form, A
   2199      specifies a contiguous array section. The second form A specifies
   2200      a variable or array element and LEN specifies the length in bytes.
   2201 
   2202 _C/C++_:
   2203      _Prototype_:  `acc_copyout(h_void *a, size_t len);'
   2204 
   2205 _Fortran_:
   2206      _Interface_:  `subroutine acc_copyout(a)'
   2207                    `type, dimension(:[,:]...) :: a'
   2208      _Interface_:  `subroutine acc_copyout(a, len)'
   2209                    `type, dimension(:[,:]...) :: a'
   2210                    `integer len'
   2211 
   2212 _Reference_:
   2213      OpenACC specification v2.0 (http://www.openacc.org/), section
   2214      3.2.21.
   2215 
   2216 
   2217 File: libgomp.info,  Node: acc_delete,  Next: acc_update_device,  Prev: acc_copyout,  Up: OpenACC Runtime Library Routines
   2218 
   2219 5.22 `acc_delete' - Free device memory.
   2220 =======================================
   2221 
   2222 _Description_
   2223      This function frees previously allocated device memory specified by
   2224      the device address A and the length of LEN bytes.
   2225 
   2226      In Fortran, two (2) forms are supported. In the first form, A
   2227      specifies a contiguous array section. The second form A specifies
   2228      a variable or array element and LEN specifies the length in bytes.
   2229 
   2230 _C/C++_:
   2231      _Prototype_:  `acc_delete(h_void *a, size_t len);'
   2232 
   2233 _Fortran_:
   2234      _Interface_:  `subroutine acc_delete(a)'
   2235                    `type, dimension(:[,:]...) :: a'
   2236      _Interface_:  `subroutine acc_delete(a, len)'
   2237                    `type, dimension(:[,:]...) :: a'
   2238                    `integer len'
   2239 
   2240 _Reference_:
   2241      OpenACC specification v2.0 (http://www.openacc.org/), section
   2242      3.2.22.
   2243 
   2244 
   2245 File: libgomp.info,  Node: acc_update_device,  Next: acc_update_self,  Prev: acc_delete,  Up: OpenACC Runtime Library Routines
   2246 
   2247 5.23 `acc_update_device' - Update device memory from mapped host memory.
   2248 ========================================================================
   2249 
   2250 _Description_
   2251      This function updates the device copy from the previously mapped
   2252      host memory.  The host memory is specified with the host address A
   2253      and a length of LEN bytes.
   2254 
   2255      In Fortran, two (2) forms are supported. In the first form, A
   2256      specifies a contiguous array section. The second form A specifies
   2257      a variable or array element and LEN specifies the length in bytes.
   2258 
   2259 _C/C++_:
   2260      _Prototype_:  `acc_update_device(h_void *a, size_t len);'
   2261 
   2262 _Fortran_:
   2263      _Interface_:  `subroutine acc_update_device(a)'
   2264                    `type, dimension(:[,:]...) :: a'
   2265      _Interface_:  `subroutine acc_update_device(a, len)'
   2266                    `type, dimension(:[,:]...) :: a'
   2267                    `integer len'
   2268 
   2269 _Reference_:
   2270      OpenACC specification v2.0 (http://www.openacc.org/), section
   2271      3.2.23.
   2272 
   2273 
   2274 File: libgomp.info,  Node: acc_update_self,  Next: acc_map_data,  Prev: acc_update_device,  Up: OpenACC Runtime Library Routines
   2275 
   2276 5.24 `acc_update_self' - Update host memory from mapped device memory.
   2277 ======================================================================
   2278 
   2279 _Description_
   2280      This function updates the host copy from the previously mapped
   2281      device memory.  The host memory is specified with the host address
   2282      A and a length of LEN bytes.
   2283 
   2284      In Fortran, two (2) forms are supported. In the first form, A
   2285      specifies a contiguous array section. The second form A specifies
   2286      a variable or array element and LEN specifies the length in bytes.
   2287 
   2288 _C/C++_:
   2289      _Prototype_:  `acc_update_self(h_void *a, size_t len);'
   2290 
   2291 _Fortran_:
   2292      _Interface_:  `subroutine acc_update_self(a)'
   2293                    `type, dimension(:[,:]...) :: a'
   2294      _Interface_:  `subroutine acc_update_self(a, len)'
   2295                    `type, dimension(:[,:]...) :: a'
   2296                    `integer len'
   2297 
   2298 _Reference_:
   2299      OpenACC specification v2.0 (http://www.openacc.org/), section
   2300      3.2.24.
   2301 
   2302 
   2303 File: libgomp.info,  Node: acc_map_data,  Next: acc_unmap_data,  Prev: acc_update_self,  Up: OpenACC Runtime Library Routines
   2304 
   2305 5.25 `acc_map_data' - Map previously allocated device memory to host memory.
   2306 ============================================================================
   2307 
   2308 _Description_
   2309      This function maps previously allocated device and host memory.
   2310      The device memory is specified with the device address D. The host
   2311      memory is specified with the host address H and a length of LEN.
   2312 
   2313 _C/C++_:
   2314      _Prototype_:  `acc_map_data(h_void *h, d_void *d, size_t len);'
   2315 
   2316 _Reference_:
   2317      OpenACC specification v2.0 (http://www.openacc.org/), section
   2318      3.2.25.
   2319 
   2320 
   2321 File: libgomp.info,  Node: acc_unmap_data,  Next: acc_deviceptr,  Prev: acc_map_data,  Up: OpenACC Runtime Library Routines
   2322 
   2323 5.26 `acc_unmap_data' - Unmap device memory from host memory.
   2324 =============================================================
   2325 
   2326 _Description_
   2327      This function unmaps previously mapped device and host memory. The
   2328      latter specified by H.
   2329 
   2330 _C/C++_:
   2331      _Prototype_:  `acc_unmap_data(h_void *h);'
   2332 
   2333 _Reference_:
   2334      OpenACC specification v2.0 (http://www.openacc.org/), section
   2335      3.2.26.
   2336 
   2337 
   2338 File: libgomp.info,  Node: acc_deviceptr,  Next: acc_hostptr,  Prev: acc_unmap_data,  Up: OpenACC Runtime Library Routines
   2339 
   2340 5.27 `acc_deviceptr' - Get device pointer associated with specific host address.
   2341 ================================================================================
   2342 
   2343 _Description_
   2344      This function returns the device address that has been mapped to
   2345      the host address specified by H.
   2346 
   2347 _C/C++_:
   2348      _Prototype_:  `void *acc_deviceptr(h_void *h);'
   2349 
   2350 _Reference_:
   2351      OpenACC specification v2.0 (http://www.openacc.org/), section
   2352      3.2.27.
   2353 
   2354 
   2355 File: libgomp.info,  Node: acc_hostptr,  Next: acc_is_present,  Prev: acc_deviceptr,  Up: OpenACC Runtime Library Routines
   2356 
   2357 5.28 `acc_hostptr' - Get host pointer associated with specific device address.
   2358 ==============================================================================
   2359 
   2360 _Description_
   2361      This function returns the host address that has been mapped to the
   2362      device address specified by D.
   2363 
   2364 _C/C++_:
   2365      _Prototype_:  `void *acc_hostptr(d_void *d);'
   2366 
   2367 _Reference_:
   2368      OpenACC specification v2.0 (http://www.openacc.org/), section
   2369      3.2.28.
   2370 
   2371 
   2372 File: libgomp.info,  Node: acc_is_present,  Next: acc_memcpy_to_device,  Prev: acc_hostptr,  Up: OpenACC Runtime Library Routines
   2373 
   2374 5.29 `acc_is_present' - Indicate whether host variable / array is present on device.
   2375 ====================================================================================
   2376 
   2377 _Description_
   2378      This function indicates whether the specified host address in A
   2379      and a length of LEN bytes is present on the device. In C/C++, a
   2380      non-zero value is returned to indicate the presence of the mapped
   2381      memory on the device. A zero is returned to indicate the memory is
   2382      not mapped on the device.
   2383 
   2384      In Fortran, two (2) forms are supported. In the first form, A
   2385      specifies a contiguous array section. The second form A specifies
   2386      a variable or array element and LEN specifies the length in bytes.
   2387      If the host memory is mapped to device memory, then a `true' is
   2388      returned. Otherwise, a `false' is return to indicate the mapped
   2389      memory is not present.
   2390 
   2391 _C/C++_:
   2392      _Prototype_:  `int acc_is_present(h_void *a, size_t len);'
   2393 
   2394 _Fortran_:
   2395      _Interface_:  `function acc_is_present(a)'
   2396                    `type, dimension(:[,:]...) :: a'
   2397                    `logical acc_is_present'
   2398      _Interface_:  `function acc_is_present(a, len)'
   2399                    `type, dimension(:[,:]...) :: a'
   2400                    `integer len'
   2401                    `logical acc_is_present'
   2402 
   2403 _Reference_:
   2404      OpenACC specification v2.0 (http://www.openacc.org/), section
   2405      3.2.29.
   2406 
   2407 
   2408 File: libgomp.info,  Node: acc_memcpy_to_device,  Next: acc_memcpy_from_device,  Prev: acc_is_present,  Up: OpenACC Runtime Library Routines
   2409 
   2410 5.30 `acc_memcpy_to_device' - Copy host memory to device memory.
   2411 ================================================================
   2412 
   2413 _Description_
   2414      This function copies host memory specified by host address of SRC
   2415      to device memory specified by the device address DEST for a length
   2416      of BYTES bytes.
   2417 
   2418 _C/C++_:
   2419      _Prototype_:  `acc_memcpy_to_device(d_void *dest, h_void *src,
   2420                    size_t bytes);'
   2421 
   2422 _Reference_:
   2423      OpenACC specification v2.0 (http://www.openacc.org/), section
   2424      3.2.30.
   2425 
   2426 
   2427 File: libgomp.info,  Node: acc_memcpy_from_device,  Next: acc_get_current_cuda_device,  Prev: acc_memcpy_to_device,  Up: OpenACC Runtime Library Routines
   2428 
   2429 5.31 `acc_memcpy_from_device' - Copy device memory to host memory.
   2430 ==================================================================
   2431 
   2432 _Description_
   2433      This function copies host memory specified by host address of SRC
   2434      from device memory specified by the device address DEST for a
   2435      length of BYTES bytes.
   2436 
   2437 _C/C++_:
   2438      _Prototype_:  `acc_memcpy_from_device(d_void *dest, h_void *src,
   2439                    size_t bytes);'
   2440 
   2441 _Reference_:
   2442      OpenACC specification v2.0 (http://www.openacc.org/), section
   2443      3.2.31.
   2444 
   2445 
   2446 File: libgomp.info,  Node: acc_get_current_cuda_device,  Next: acc_get_current_cuda_context,  Prev: acc_memcpy_from_device,  Up: OpenACC Runtime Library Routines
   2447 
   2448 5.32 `acc_get_current_cuda_device' - Get CUDA device handle.
   2449 ============================================================
   2450 
   2451 _Description_
   2452      This function returns the CUDA device handle. This handle is the
   2453      same as used by the CUDA Runtime or Driver API's.
   2454 
   2455 _C/C++_:
   2456      _Prototype_:  `void *acc_get_current_cuda_device(void);'
   2457 
   2458 _Reference_:
   2459      OpenACC specification v2.0 (http://www.openacc.org/), section
   2460      A.2.1.1.
   2461 
   2462 
   2463 File: libgomp.info,  Node: acc_get_current_cuda_context,  Next: acc_get_cuda_stream,  Prev: acc_get_current_cuda_device,  Up: OpenACC Runtime Library Routines
   2464 
   2465 5.33 `acc_get_current_cuda_context' - Get CUDA context handle.
   2466 ==============================================================
   2467 
   2468 _Description_
   2469      This function returns the CUDA context handle. This handle is the
   2470      same as used by the CUDA Runtime or Driver API's.
   2471 
   2472 _C/C++_:
   2473      _Prototype_:  `acc_get_current_cuda_context(void);'
   2474 
   2475 _Reference_:
   2476      OpenACC specification v2.0 (http://www.openacc.org/), section
   2477      A.2.1.2.
   2478 
   2479 
   2480 File: libgomp.info,  Node: acc_get_cuda_stream,  Next: acc_set_cuda_stream,  Prev: acc_get_current_cuda_context,  Up: OpenACC Runtime Library Routines
   2481 
   2482 5.34 `acc_get_cuda_stream' - Get CUDA stream handle.
   2483 ====================================================
   2484 
   2485 _Description_
   2486      This function returns the CUDA stream handle. This handle is the
   2487      same as used by the CUDA Runtime or Driver API's.
   2488 
   2489 _C/C++_:
   2490      _Prototype_:  `acc_get_cuda_stream(void);'
   2491 
   2492 _Reference_:
   2493      OpenACC specification v2.0 (http://www.openacc.org/), section
   2494      A.2.1.3.
   2495 
   2496 
   2497 File: libgomp.info,  Node: acc_set_cuda_stream,  Prev: acc_get_cuda_stream,  Up: OpenACC Runtime Library Routines
   2498 
   2499 5.35 `acc_set_cuda_stream' - Set CUDA stream handle.
   2500 ====================================================
   2501 
   2502 _Description_
   2503      This function associates the stream handle specified by STREAM with
   2504      the asynchronous value specified by ASYNC.
   2505 
   2506 _C/C++_:
   2507      _Prototype_:  `acc_set_cuda_stream(int async void *stream);'
   2508 
   2509 _Reference_:
   2510      OpenACC specification v2.0 (http://www.openacc.org/), section
   2511      A.2.1.4.
   2512 
   2513 
   2514 File: libgomp.info,  Node: OpenACC Environment Variables,  Next: CUDA Streams Usage,  Prev: OpenACC Runtime Library Routines,  Up: Top
   2515 
   2516 6 OpenACC Environment Variables
   2517 *******************************
   2518 
   2519 The variables `ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM' are defined by
   2520 section 4 of the OpenACC specification in version 2.0.  The variable
   2521 `GCC_ACC_NOTIFY' is used for diagnostic purposes.
   2522 
   2523 * Menu:
   2524 
   2525 * ACC_DEVICE_TYPE::
   2526 * ACC_DEVICE_NUM::
   2527 * GCC_ACC_NOTIFY::
   2528 
   2529 
   2530 File: libgomp.info,  Node: ACC_DEVICE_TYPE,  Next: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables
   2531 
   2532 6.1 `ACC_DEVICE_TYPE'
   2533 =====================
   2534 
   2535 _Reference_:
   2536      OpenACC specification v2.0 (http://www.openacc.org/), section 4.1.
   2537 
   2538 
   2539 File: libgomp.info,  Node: ACC_DEVICE_NUM,  Next: GCC_ACC_NOTIFY,  Prev: ACC_DEVICE_TYPE,  Up: OpenACC Environment Variables
   2540 
   2541 6.2 `ACC_DEVICE_NUM'
   2542 ====================
   2543 
   2544 _Reference_:
   2545      OpenACC specification v2.0 (http://www.openacc.org/), section 4.2.
   2546 
   2547 
   2548 File: libgomp.info,  Node: GCC_ACC_NOTIFY,  Prev: ACC_DEVICE_NUM,  Up: OpenACC Environment Variables
   2549 
   2550 6.3 `GCC_ACC_NOTIFY'
   2551 ====================
   2552 
   2553 _Description_:
   2554      Print debug information pertaining to the accelerator.
   2555 
   2556 
   2557 File: libgomp.info,  Node: CUDA Streams Usage,  Next: OpenACC Library Interoperability,  Prev: OpenACC Environment Variables,  Up: Top
   2558 
   2559 7 CUDA Streams Usage
   2560 ********************
   2561 
   2562 This applies to the `nvptx' plugin only.
   2563 
   2564    The library provides elements that perform asynchronous movement of
   2565 data and asynchronous operation of computing constructs.  This
   2566 asynchronous functionality is implemented by making use of CUDA
   2567 streams(1).
   2568 
   2569    The primary means by that the asychronous functionality is accessed
   2570 is through the use of those OpenACC directives which make use of the
   2571 `async' and `wait' clauses.  When the `async' clause is first used with
   2572 a directive, it creates a CUDA stream.  If an `async-argument' is used
   2573 with the `async' clause, then the stream is associated with the
   2574 specified `async-argument'.
   2575 
   2576    Following the creation of an association between a CUDA stream and
   2577 the `async-argument' of an `async' clause, both the `wait' clause and
   2578 the `wait' directive can be used.  When either the clause or directive
   2579 is used after stream creation, it creates a rendezvous point whereby
   2580 execution waits until all operations associated with the
   2581 `async-argument', that is, stream, have completed.
   2582 
   2583    Normally, the management of the streams that are created as a result
   2584 of using the `async' clause, is done without any intervention by the
   2585 caller.  This implies the association between the `async-argument' and
   2586 the CUDA stream will be maintained for the lifetime of the program.
   2587 However, this association can be changed through the use of the library
   2588 function `acc_set_cuda_stream'.  When the function
   2589 `acc_set_cuda_stream' is called, the CUDA stream that was originally
   2590 associated with the `async' clause will be destroyed.  Caution should
   2591 be taken when changing the association as subsequent references to the
   2592 `async-argument' refer to a different CUDA stream.
   2593 
   2594    ---------- Footnotes ----------
   2595 
   2596    (1) See "Stream Management" in "CUDA Driver API", TRM-06703-001,
   2597 Version 5.5, for additional information
   2598 
   2599 
   2600 File: libgomp.info,  Node: OpenACC Library Interoperability,  Next: The libgomp ABI,  Prev: CUDA Streams Usage,  Up: Top
   2601 
   2602 8 OpenACC Library Interoperability
   2603 **********************************
   2604 
   2605 8.1 Introduction
   2606 ================
   2607 
   2608 The OpenACC library uses the CUDA Driver API, and may interact with
   2609 programs that use the Runtime library directly, or another library
   2610 based on the Runtime library, e.g., CUBLAS(1).  This chapter describes
   2611 the use cases and what changes are required in order to use both the
   2612 OpenACC library and the CUBLAS and Runtime libraries within a program.
   2613 
   2614 8.2 First invocation: NVIDIA CUBLAS library API
   2615 ===============================================
   2616 
   2617 In this first use case (see below), a function in the CUBLAS library is
   2618 called prior to any of the functions in the OpenACC library. More
   2619 specifically, the function `cublasCreate()'.
   2620 
   2621    When invoked, the function initializes the library and allocates the
   2622 hardware resources on the host and the device on behalf of the caller.
   2623 Once the initialization and allocation has completed, a handle is
   2624 returned to the caller. The OpenACC library also requires
   2625 initialization and allocation of hardware resources. Since the CUBLAS
   2626 library has already allocated the hardware resources for the device,
   2627 all that is left to do is to initialize the OpenACC library and acquire
   2628 the hardware resources on the host.
   2629 
   2630    Prior to calling the OpenACC function that initializes the library
   2631 and allocate the host hardware resources, you need to acquire the
   2632 device number that was allocated during the call to `cublasCreate()'.
   2633 The invoking of the runtime library function `cudaGetDevice()'
   2634 accomplishes this. Once acquired, the device number is passed along
   2635 with the device type as parameters to the OpenACC library function
   2636 `acc_set_device_num()'.
   2637 
   2638    Once the call to `acc_set_device_num()' has completed, the OpenACC
   2639 library uses the  context that was created during the call to
   2640 `cublasCreate()'. In other words, both libraries will be sharing the
   2641 same context.
   2642 
   2643          /* Create the handle */
   2644          s = cublasCreate(&h);
   2645          if (s != CUBLAS_STATUS_SUCCESS)
   2646          {
   2647              fprintf(stderr, "cublasCreate failed %d\n", s);
   2648              exit(EXIT_FAILURE);
   2649          }
   2650 
   2651          /* Get the device number */
   2652          e = cudaGetDevice(&dev);
   2653          if (e != cudaSuccess)
   2654          {
   2655              fprintf(stderr, "cudaGetDevice failed %d\n", e);
   2656              exit(EXIT_FAILURE);
   2657          }
   2658 
   2659          /* Initialize OpenACC library and use device 'dev' */
   2660          acc_set_device_num(dev, acc_device_nvidia);
   2661                                  Use Case 1
   2662 
   2663 8.3 First invocation: OpenACC library API
   2664 =========================================
   2665 
   2666 In this second use case (see below), a function in the OpenACC library
   2667 is called prior to any of the functions in the CUBLAS library. More
   2668 specificially, the function `acc_set_device_num()'.
   2669 
   2670    In the use case presented here, the function `acc_set_device_num()'
   2671 is used to both initialize the OpenACC library and allocate the hardware
   2672 resources on the host and the device. In the call to the function, the
   2673 call parameters specify which device to use and what device type to
   2674 use, i.e., `acc_device_nvidia'. It should be noted that this is but one
   2675 method to initialize the OpenACC library and allocate the appropriate
   2676 hardware resources. Other methods are available through the use of
   2677 environment variables and these will be discussed in the next section.
   2678 
   2679    Once the call to `acc_set_device_num()' has completed, other OpenACC
   2680 functions can be called as seen with multiple calls being made to
   2681 `acc_copyin()'. In addition, calls can be made to functions in the
   2682 CUBLAS library. In the use case a call to `cublasCreate()' is made
   2683 subsequent to the calls to `acc_copyin()'.  As seen in the previous use
   2684 case, a call to `cublasCreate()' initializes the CUBLAS library and
   2685 allocates the hardware resources on the host and the device.  However,
   2686 since the device has already been allocated, `cublasCreate()' will only
   2687 initialize the CUBLAS library and allocate the appropriate hardware
   2688 resources on the host. The context that was created as part of the
   2689 OpenACC initialization is shared with the CUBLAS library, similarly to
   2690 the first use case.
   2691 
   2692          dev = 0;
   2693 
   2694          acc_set_device_num(dev, acc_device_nvidia);
   2695 
   2696          /* Copy the first set to the device */
   2697          d_X = acc_copyin(&h_X[0], N * sizeof (float));
   2698          if (d_X == NULL)
   2699          {
   2700              fprintf(stderr, "copyin error h_X\n");
   2701              exit(EXIT_FAILURE);
   2702          }
   2703 
   2704          /* Copy the second set to the device */
   2705          d_Y = acc_copyin(&h_Y1[0], N * sizeof (float));
   2706          if (d_Y == NULL)
   2707          {
   2708              fprintf(stderr, "copyin error h_Y1\n");
   2709              exit(EXIT_FAILURE);
   2710          }
   2711 
   2712          /* Create the handle */
   2713          s = cublasCreate(&h);
   2714          if (s != CUBLAS_STATUS_SUCCESS)
   2715          {
   2716              fprintf(stderr, "cublasCreate failed %d\n", s);
   2717              exit(EXIT_FAILURE);
   2718          }
   2719 
   2720          /* Perform saxpy using CUBLAS library function */
   2721          s = cublasSaxpy(h, N, &alpha, d_X, 1, d_Y, 1);
   2722          if (s != CUBLAS_STATUS_SUCCESS)
   2723          {
   2724              fprintf(stderr, "cublasSaxpy failed %d\n", s);
   2725              exit(EXIT_FAILURE);
   2726          }
   2727 
   2728          /* Copy the results from the device */
   2729          acc_memcpy_from_device(&h_Y1[0], d_Y, N * sizeof (float));
   2730                                  Use Case 2
   2731 
   2732 8.4 OpenACC library and environment variables
   2733 =============================================
   2734 
   2735 There are two environment variables associated with the OpenACC library
   2736 that may be used to control the device type and device number:
   2737 `ACC_DEVICE_TYPE' and `ACC_DEVICE_NUM', respecively. These two
   2738 environement variables can be used as an alternative to calling
   2739 `acc_set_device_num()'. As seen in the second use case, the device type
   2740 and device number were specified using `acc_set_device_num()'.  If
   2741 however, the aforementioned environment variables were set, then the
   2742 call to `acc_set_device_num()' would not be required.
   2743 
   2744    The use of the environment variables is only relevant when an
   2745 OpenACC function is called prior to a call to `cudaCreate()'. If
   2746 `cudaCreate()' is called prior to a call to an OpenACC function, then
   2747 you must call `acc_set_device_num()'(2)
   2748 
   2749    ---------- Footnotes ----------
   2750 
   2751    (1) See section 2.26, "Interactions with the CUDA Driver API" in
   2752 "CUDA Runtime API", Version 5.5, and section 2.27, "VDPAU
   2753 Interoperability", in "CUDA Driver API", TRM-06703-001, Version 5.5,
   2754 for additional information on library interoperability.
   2755 
   2756    (2) More complete information about `ACC_DEVICE_TYPE' and
   2757 `ACC_DEVICE_NUM' can be found in sections 4.1 and 4.2 of the OpenACC
   2758 (http://www.openacc.org/) Application Programming Interface, Version
   2759 2.0.
   2760 
   2761 
   2762 File: libgomp.info,  Node: The libgomp ABI,  Next: Reporting Bugs,  Prev: OpenACC Library Interoperability,  Up: Top
   2763 
   2764 9 The libgomp ABI
   2765 *****************
   2766 
   2767 The following sections present notes on the external ABI as presented
   2768 by libgomp.  Only maintainers should need them.
   2769 
   2770 * Menu:
   2771 
   2772 * Implementing MASTER construct::
   2773 * Implementing CRITICAL construct::
   2774 * Implementing ATOMIC construct::
   2775 * Implementing FLUSH construct::
   2776 * Implementing BARRIER construct::
   2777 * Implementing THREADPRIVATE construct::
   2778 * Implementing PRIVATE clause::
   2779 * Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses::
   2780 * Implementing REDUCTION clause::
   2781 * Implementing PARALLEL construct::
   2782 * Implementing FOR construct::
   2783 * Implementing ORDERED construct::
   2784 * Implementing SECTIONS construct::
   2785 * Implementing SINGLE construct::
   2786 * Implementing OpenACC's PARALLEL construct::
   2787 
   2788 
   2789 File: libgomp.info,  Node: Implementing MASTER construct,  Next: Implementing CRITICAL construct,  Up: The libgomp ABI
   2790 
   2791 9.1 Implementing MASTER construct
   2792 =================================
   2793 
   2794      if (omp_get_thread_num () == 0)
   2795        block
   2796 
   2797    Alternately, we generate two copies of the parallel subfunction and
   2798 only include this in the version run by the master thread.  Surely this
   2799 is not worthwhile though...
   2800 
   2801 
   2802 File: libgomp.info,  Node: Implementing CRITICAL construct,  Next: Implementing ATOMIC construct,  Prev: Implementing MASTER construct,  Up: The libgomp ABI
   2803 
   2804 9.2 Implementing CRITICAL construct
   2805 ===================================
   2806 
   2807 Without a specified name,
   2808 
   2809        void GOMP_critical_start (void);
   2810        void GOMP_critical_end (void);
   2811 
   2812    so that we don't get COPY relocations from libgomp to the main
   2813 application.
   2814 
   2815    With a specified name, use omp_set_lock and omp_unset_lock with name
   2816 being transformed into a variable declared like
   2817 
   2818        omp_lock_t gomp_critical_user_<name> __attribute__((common))
   2819 
   2820    Ideally the ABI would specify that all zero is a valid unlocked
   2821 state, and so we wouldn't need to initialize this at startup.
   2822 
   2823 
   2824 File: libgomp.info,  Node: Implementing ATOMIC construct,  Next: Implementing FLUSH construct,  Prev: Implementing CRITICAL construct,  Up: The libgomp ABI
   2825 
   2826 9.3 Implementing ATOMIC construct
   2827 =================================
   2828 
   2829 The target should implement the `__sync' builtins.
   2830 
   2831    Failing that we could add
   2832 
   2833        void GOMP_atomic_enter (void)
   2834        void GOMP_atomic_exit (void)
   2835 
   2836    which reuses the regular lock code, but with yet another lock object
   2837 private to the library.
   2838 
   2839 
   2840 File: libgomp.info,  Node: Implementing FLUSH construct,  Next: Implementing BARRIER construct,  Prev: Implementing ATOMIC construct,  Up: The libgomp ABI
   2841 
   2842 9.4 Implementing FLUSH construct
   2843 ================================
   2844 
   2845 Expands to the `__sync_synchronize' builtin.
   2846 
   2847 
   2848 File: libgomp.info,  Node: Implementing BARRIER construct,  Next: Implementing THREADPRIVATE construct,  Prev: Implementing FLUSH construct,  Up: The libgomp ABI
   2849 
   2850 9.5 Implementing BARRIER construct
   2851 ==================================
   2852 
   2853        void GOMP_barrier (void)
   2854 
   2855 
   2856 File: libgomp.info,  Node: Implementing THREADPRIVATE construct,  Next: Implementing PRIVATE clause,  Prev: Implementing BARRIER construct,  Up: The libgomp ABI
   2857 
   2858 9.6 Implementing THREADPRIVATE construct
   2859 ========================================
   2860 
   2861 In _most_ cases we can map this directly to `__thread'.  Except that
   2862 OMP allows constructors for C++ objects.  We can either refuse to
   2863 support this (how often is it used?) or we can implement something akin
   2864 to .ctors.
   2865 
   2866    Even more ideally, this ctor feature is handled by extensions to the
   2867 main pthreads library.  Failing that, we can have a set of entry points
   2868 to register ctor functions to be called.
   2869 
   2870 
   2871 File: libgomp.info,  Node: Implementing PRIVATE clause,  Next: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses,  Prev: Implementing THREADPRIVATE construct,  Up: The libgomp ABI
   2872 
   2873 9.7 Implementing PRIVATE clause
   2874 ===============================
   2875 
   2876 In association with a PARALLEL, or within the lexical extent of a
   2877 PARALLEL block, the variable becomes a local variable in the parallel
   2878 subfunction.
   2879 
   2880    In association with FOR or SECTIONS blocks, create a new automatic
   2881 variable within the current function.  This preserves the semantic of
   2882 new variable creation.
   2883 
   2884 
   2885 File: libgomp.info,  Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses,  Next: Implementing REDUCTION clause,  Prev: Implementing PRIVATE clause,  Up: The libgomp ABI
   2886 
   2887 9.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
   2888 ========================================================================
   2889 
   2890 This seems simple enough for PARALLEL blocks.  Create a private struct
   2891 for communicating between the parent and subfunction.  In the parent,
   2892 copy in values for scalar and "small" structs; copy in addresses for
   2893 others TREE_ADDRESSABLE types.  In the subfunction, copy the value into
   2894 the local variable.
   2895 
   2896    It is not clear what to do with bare FOR or SECTION blocks.  The
   2897 only thing I can figure is that we do something like:
   2898 
   2899      #pragma omp for firstprivate(x) lastprivate(y)
   2900      for (int i = 0; i < n; ++i)
   2901        body;
   2902 
   2903    which becomes
   2904 
   2905      {
   2906        int x = x, y;
   2907 
   2908        // for stuff
   2909 
   2910        if (i == n)
   2911          y = y;
   2912      }
   2913 
   2914    where the "x=x" and "y=y" assignments actually have different uids
   2915 for the two variables, i.e. not something you could write directly in
   2916 C.  Presumably this only makes sense if the "outer" x and y are global
   2917 variables.
   2918 
   2919    COPYPRIVATE would work the same way, except the structure broadcast
   2920 would have to happen via SINGLE machinery instead.
   2921 
   2922 
   2923 File: libgomp.info,  Node: Implementing REDUCTION clause,  Next: Implementing PARALLEL construct,  Prev: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses,  Up: The libgomp ABI
   2924 
   2925 9.9 Implementing REDUCTION clause
   2926 =================================
   2927 
   2928 The private struct mentioned in the previous section should have a
   2929 pointer to an array of the type of the variable, indexed by the
   2930 thread's TEAM_ID.  The thread stores its final value into the array,
   2931 and after the barrier, the master thread iterates over the array to
   2932 collect the values.
   2933 
   2934 
   2935 File: libgomp.info,  Node: Implementing PARALLEL construct,  Next: Implementing FOR construct,  Prev: Implementing REDUCTION clause,  Up: The libgomp ABI
   2936 
   2937 9.10 Implementing PARALLEL construct
   2938 ====================================
   2939 
   2940        #pragma omp parallel
   2941        {
   2942          body;
   2943        }
   2944 
   2945    becomes
   2946 
   2947        void subfunction (void *data)
   2948        {
   2949          use data;
   2950          body;
   2951        }
   2952 
   2953        setup data;
   2954        GOMP_parallel_start (subfunction, &data, num_threads);
   2955        subfunction (&data);
   2956        GOMP_parallel_end ();
   2957 
   2958        void GOMP_parallel_start (void (*fn)(void *), void *data, unsigned num_threads)
   2959 
   2960    The FN argument is the subfunction to be run in parallel.
   2961 
   2962    The DATA argument is a pointer to a structure used to communicate
   2963 data in and out of the subfunction, as discussed above with respect to
   2964 FIRSTPRIVATE et al.
   2965 
   2966    The NUM_THREADS argument is 1 if an IF clause is present and false,
   2967 or the value of the NUM_THREADS clause, if present, or 0.
   2968 
   2969    The function needs to create the appropriate number of threads
   2970 and/or launch them from the dock.  It needs to create the team
   2971 structure and assign team ids.
   2972 
   2973        void GOMP_parallel_end (void)
   2974 
   2975    Tears down the team and returns us to the previous
   2976 `omp_in_parallel()' state.
   2977 
   2978 
   2979 File: libgomp.info,  Node: Implementing FOR construct,  Next: Implementing ORDERED construct,  Prev: Implementing PARALLEL construct,  Up: The libgomp ABI
   2980 
   2981 9.11 Implementing FOR construct
   2982 ===============================
   2983 
   2984        #pragma omp parallel for
   2985        for (i = lb; i <= ub; i++)
   2986          body;
   2987 
   2988    becomes
   2989 
   2990        void subfunction (void *data)
   2991        {
   2992          long _s0, _e0;
   2993          while (GOMP_loop_static_next (&_s0, &_e0))
   2994          {
   2995            long _e1 = _e0, i;
   2996            for (i = _s0; i < _e1; i++)
   2997              body;
   2998          }
   2999          GOMP_loop_end_nowait ();
   3000        }
   3001 
   3002        GOMP_parallel_loop_static (subfunction, NULL, 0, lb, ub+1, 1, 0);
   3003        subfunction (NULL);
   3004        GOMP_parallel_end ();
   3005 
   3006        #pragma omp for schedule(runtime)
   3007        for (i = 0; i < n; i++)
   3008          body;
   3009 
   3010    becomes
   3011 
   3012        {
   3013          long i, _s0, _e0;
   3014          if (GOMP_loop_runtime_start (0, n, 1, &_s0, &_e0))
   3015            do {
   3016              long _e1 = _e0;
   3017              for (i = _s0, i < _e0; i++)
   3018                body;
   3019            } while (GOMP_loop_runtime_next (&_s0, _&e0));
   3020          GOMP_loop_end ();
   3021        }
   3022 
   3023    Note that while it looks like there is trickiness to propagating a
   3024 non-constant STEP, there isn't really.  We're explicitly allowed to
   3025 evaluate it as many times as we want, and any variables involved should
   3026 automatically be handled as PRIVATE or SHARED like any other variables.
   3027 So the expression should remain evaluable in the subfunction.  We can
   3028 also pull it into a local variable if we like, but since its supposed
   3029 to remain unchanged, we can also not if we like.
   3030 
   3031    If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be
   3032 able to get away with no work-sharing context at all, since we can
   3033 simply perform the arithmetic directly in each thread to divide up the
   3034 iterations.  Which would mean that we wouldn't need to call any of
   3035 these routines.
   3036 
   3037    There are separate routines for handling loops with an ORDERED
   3038 clause.  Bookkeeping for that is non-trivial...
   3039 
   3040 
   3041 File: libgomp.info,  Node: Implementing ORDERED construct,  Next: Implementing SECTIONS construct,  Prev: Implementing FOR construct,  Up: The libgomp ABI
   3042 
   3043 9.12 Implementing ORDERED construct
   3044 ===================================
   3045 
   3046        void GOMP_ordered_start (void)
   3047        void GOMP_ordered_end (void)
   3048 
   3049 
   3050 File: libgomp.info,  Node: Implementing SECTIONS construct,  Next: Implementing SINGLE construct,  Prev: Implementing ORDERED construct,  Up: The libgomp ABI
   3051 
   3052 9.13 Implementing SECTIONS construct
   3053 ====================================
   3054 
   3055 A block as
   3056 
   3057        #pragma omp sections
   3058        {
   3059          #pragma omp section
   3060          stmt1;
   3061          #pragma omp section
   3062          stmt2;
   3063          #pragma omp section
   3064          stmt3;
   3065        }
   3066 
   3067    becomes
   3068 
   3069        for (i = GOMP_sections_start (3); i != 0; i = GOMP_sections_next ())
   3070          switch (i)
   3071            {
   3072            case 1:
   3073              stmt1;
   3074              break;
   3075            case 2:
   3076              stmt2;
   3077              break;
   3078            case 3:
   3079              stmt3;
   3080              break;
   3081            }
   3082        GOMP_barrier ();
   3083 
   3084 
   3085 File: libgomp.info,  Node: Implementing SINGLE construct,  Next: Implementing OpenACC's PARALLEL construct,  Prev: Implementing SECTIONS construct,  Up: The libgomp ABI
   3086 
   3087 9.14 Implementing SINGLE construct
   3088 ==================================
   3089 
   3090 A block like
   3091 
   3092        #pragma omp single
   3093        {
   3094          body;
   3095        }
   3096 
   3097    becomes
   3098 
   3099        if (GOMP_single_start ())
   3100          body;
   3101        GOMP_barrier ();
   3102 
   3103    while
   3104 
   3105        #pragma omp single copyprivate(x)
   3106          body;
   3107 
   3108    becomes
   3109 
   3110        datap = GOMP_single_copy_start ();
   3111        if (datap == NULL)
   3112          {
   3113            body;
   3114            data.x = x;
   3115            GOMP_single_copy_end (&data);
   3116          }
   3117        else
   3118          x = datap->x;
   3119        GOMP_barrier ();
   3120 
   3121 
   3122 File: libgomp.info,  Node: Implementing OpenACC's PARALLEL construct,  Prev: Implementing SINGLE construct,  Up: The libgomp ABI
   3123 
   3124 9.15 Implementing OpenACC's PARALLEL construct
   3125 ==============================================
   3126 
   3127        void GOACC_parallel ()
   3128 
   3129 
   3130 File: libgomp.info,  Node: Reporting Bugs,  Next: Copying,  Prev: The libgomp ABI,  Up: Top
   3131 
   3132 10 Reporting Bugs
   3133 *****************
   3134 
   3135 Bugs in the GNU Offloading and Multi Processing Runtime Library should
   3136 be reported via Bugzilla (http://gcc.gnu.org/bugzilla/).  Please add
   3137 "openacc", or "openmp", or both to the keywords field in the bug
   3138 report, as appropriate.
   3139 
   3140 
   3141 File: libgomp.info,  Node: Copying,  Next: GNU Free Documentation License,  Prev: Reporting Bugs,  Up: Top
   3142 
   3143 GNU General Public License
   3144 **************************
   3145 
   3146                         Version 3, 29 June 2007
   3147 
   3148      Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
   3149 
   3150      Everyone is permitted to copy and distribute verbatim copies of this
   3151      license document, but changing it is not allowed.
   3152 
   3153 Preamble
   3154 ========
   3155 
   3156 The GNU General Public License is a free, copyleft license for software
   3157 and other kinds of works.
   3158 
   3159    The licenses for most software and other practical works are designed
   3160 to take away your freedom to share and change the works.  By contrast,
   3161 the GNU General Public License is intended to guarantee your freedom to
   3162 share and change all versions of a program-to make sure it remains free
   3163 software for all its users.  We, the Free Software Foundation, use the
   3164 GNU General Public License for most of our software; it applies also to
   3165 any other work released this way by its authors.  You can apply it to
   3166 your programs, too.
   3167 
   3168    When we speak of free software, we are referring to freedom, not
   3169 price.  Our General Public Licenses are designed to make sure that you
   3170 have the freedom to distribute copies of free software (and charge for
   3171 them if you wish), that you receive source code or can get it if you
   3172 want it, that you can change the software or use pieces of it in new
   3173 free programs, and that you know you can do these things.
   3174 
   3175    To protect your rights, we need to prevent others from denying you
   3176 these rights or asking you to surrender the rights.  Therefore, you
   3177 have certain responsibilities if you distribute copies of the software,
   3178 or if you modify it: responsibilities to respect the freedom of others.
   3179 
   3180    For example, if you distribute copies of such a program, whether
   3181 gratis or for a fee, you must pass on to the recipients the same
   3182 freedoms that you received.  You must make sure that they, too, receive
   3183 or can get the source code.  And you must show them these terms so they
   3184 know their rights.
   3185 
   3186    Developers that use the GNU GPL protect your rights with two steps:
   3187 (1) assert copyright on the software, and (2) offer you this License
   3188 giving you legal permission to copy, distribute and/or modify it.
   3189 
   3190    For the developers' and authors' protection, the GPL clearly explains
   3191 that there is no warranty for this free software.  For both users' and
   3192 authors' sake, the GPL requires that modified versions be marked as
   3193 changed, so that their problems will not be attributed erroneously to
   3194 authors of previous versions.
   3195 
   3196    Some devices are designed to deny users access to install or run
   3197 modified versions of the software inside them, although the
   3198 manufacturer can do so.  This is fundamentally incompatible with the
   3199 aim of protecting users' freedom to change the software.  The
   3200 systematic pattern of such abuse occurs in the area of products for
   3201 individuals to use, which is precisely where it is most unacceptable.
   3202 Therefore, we have designed this version of the GPL to prohibit the
   3203 practice for those products.  If such problems arise substantially in
   3204 other domains, we stand ready to extend this provision to those domains
   3205 in future versions of the GPL, as needed to protect the freedom of
   3206 users.
   3207 
   3208    Finally, every program is threatened constantly by software patents.
   3209 States should not allow patents to restrict development and use of
   3210 software on general-purpose computers, but in those that do, we wish to
   3211 avoid the special danger that patents applied to a free program could
   3212 make it effectively proprietary.  To prevent this, the GPL assures that
   3213 patents cannot be used to render the program non-free.
   3214 
   3215    The precise terms and conditions for copying, distribution and
   3216 modification follow.
   3217 
   3218 TERMS AND CONDITIONS
   3219 ====================
   3220 
   3221   0. Definitions.
   3222 
   3223      "This License" refers to version 3 of the GNU General Public
   3224      License.
   3225 
   3226      "Copyright" also means copyright-like laws that apply to other
   3227      kinds of works, such as semiconductor masks.
   3228 
   3229      "The Program" refers to any copyrightable work licensed under this
   3230      License.  Each licensee is addressed as "you".  "Licensees" and
   3231      "recipients" may be individuals or organizations.
   3232 
   3233      To "modify" a work means to copy from or adapt all or part of the
   3234      work in a fashion requiring copyright permission, other than the
   3235      making of an exact copy.  The resulting work is called a "modified
   3236      version" of the earlier work or a work "based on" the earlier work.
   3237 
   3238      A "covered work" means either the unmodified Program or a work
   3239      based on the Program.
   3240 
   3241      To "propagate" a work means to do anything with it that, without
   3242      permission, would make you directly or secondarily liable for
   3243      infringement under applicable copyright law, except executing it
   3244      on a computer or modifying a private copy.  Propagation includes
   3245      copying, distribution (with or without modification), making
   3246      available to the public, and in some countries other activities as
   3247      well.
   3248 
   3249      To "convey" a work means any kind of propagation that enables other
   3250      parties to make or receive copies.  Mere interaction with a user
   3251      through a computer network, with no transfer of a copy, is not
   3252      conveying.
   3253 
   3254      An interactive user interface displays "Appropriate Legal Notices"
   3255      to the extent that it includes a convenient and prominently visible
   3256      feature that (1) displays an appropriate copyright notice, and (2)
   3257      tells the user that there is no warranty for the work (except to
   3258      the extent that warranties are provided), that licensees may
   3259      convey the work under this License, and how to view a copy of this
   3260      License.  If the interface presents a list of user commands or
   3261      options, such as a menu, a prominent item in the list meets this
   3262      criterion.
   3263 
   3264   1. Source Code.
   3265 
   3266      The "source code" for a work means the preferred form of the work
   3267      for making modifications to it.  "Object code" means any
   3268      non-source form of a work.
   3269 
   3270      A "Standard Interface" means an interface that either is an
   3271      official standard defined by a recognized standards body, or, in
   3272      the case of interfaces specified for a particular programming
   3273      language, one that is widely used among developers working in that
   3274      language.
   3275 
   3276      The "System Libraries" of an executable work include anything,
   3277      other than the work as a whole, that (a) is included in the normal
   3278      form of packaging a Major Component, but which is not part of that
   3279      Major Component, and (b) serves only to enable use of the work
   3280      with that Major Component, or to implement a Standard Interface
   3281      for which an implementation is available to the public in source
   3282      code form.  A "Major Component", in this context, means a major
   3283      essential component (kernel, window system, and so on) of the
   3284      specific operating system (if any) on which the executable work
   3285      runs, or a compiler used to produce the work, or an object code
   3286      interpreter used to run it.
   3287 
   3288      The "Corresponding Source" for a work in object code form means all
   3289      the source code needed to generate, install, and (for an executable
   3290      work) run the object code and to modify the work, including
   3291      scripts to control those activities.  However, it does not include
   3292      the work's System Libraries, or general-purpose tools or generally
   3293      available free programs which are used unmodified in performing
   3294      those activities but which are not part of the work.  For example,
   3295      Corresponding Source includes interface definition files
   3296      associated with source files for the work, and the source code for
   3297      shared libraries and dynamically linked subprograms that the work
   3298      is specifically designed to require, such as by intimate data
   3299      communication or control flow between those subprograms and other
   3300      parts of the work.
   3301 
   3302      The Corresponding Source need not include anything that users can
   3303      regenerate automatically from other parts of the Corresponding
   3304      Source.
   3305 
   3306      The Corresponding Source for a work in source code form is that
   3307      same work.
   3308 
   3309   2. Basic Permissions.
   3310 
   3311      All rights granted under this License are granted for the term of
   3312      copyright on the Program, and are irrevocable provided the stated
   3313      conditions are met.  This License explicitly affirms your unlimited
   3314      permission to run the unmodified Program.  The output from running
   3315      a covered work is covered by this License only if the output,
   3316      given its content, constitutes a covered work.  This License
   3317      acknowledges your rights of fair use or other equivalent, as
   3318      provided by copyright law.
   3319 
   3320      You may make, run and propagate covered works that you do not
   3321      convey, without conditions so long as your license otherwise
   3322      remains in force.  You may convey covered works to others for the
   3323      sole purpose of having them make modifications exclusively for
   3324      you, or provide you with facilities for running those works,
   3325      provided that you comply with the terms of this License in
   3326      conveying all material for which you do not control copyright.
   3327      Those thus making or running the covered works for you must do so
   3328      exclusively on your behalf, under your direction and control, on
   3329      terms that prohibit them from making any copies of your
   3330      copyrighted material outside their relationship with you.
   3331 
   3332      Conveying under any other circumstances is permitted solely under
   3333      the conditions stated below.  Sublicensing is not allowed; section
   3334      10 makes it unnecessary.
   3335 
   3336   3. Protecting Users' Legal Rights From Anti-Circumvention Law.
   3337 
   3338      No covered work shall be deemed part of an effective technological
   3339      measure under any applicable law fulfilling obligations under
   3340      article 11 of the WIPO copyright treaty adopted on 20 December
   3341      1996, or similar laws prohibiting or restricting circumvention of
   3342      such measures.
   3343 
   3344      When you convey a covered work, you waive any legal power to forbid
   3345      circumvention of technological measures to the extent such
   3346      circumvention is effected by exercising rights under this License
   3347      with respect to the covered work, and you disclaim any intention
   3348      to limit operation or modification of the work as a means of
   3349      enforcing, against the work's users, your or third parties' legal
   3350      rights to forbid circumvention of technological measures.
   3351 
   3352   4. Conveying Verbatim Copies.
   3353 
   3354      You may convey verbatim copies of the Program's source code as you
   3355      receive it, in any medium, provided that you conspicuously and
   3356      appropriately publish on each copy an appropriate copyright notice;
   3357      keep intact all notices stating that this License and any
   3358      non-permissive terms added in accord with section 7 apply to the
   3359      code; keep intact all notices of the absence of any warranty; and
   3360      give all recipients a copy of this License along with the Program.
   3361 
   3362      You may charge any price or no price for each copy that you convey,
   3363      and you may offer support or warranty protection for a fee.
   3364 
   3365   5. Conveying Modified Source Versions.
   3366 
   3367      You may convey a work based on the Program, or the modifications to
   3368      produce it from the Program, in the form of source code under the
   3369      terms of section 4, provided that you also meet all of these
   3370      conditions:
   3371 
   3372        a. The work must carry prominent notices stating that you
   3373           modified it, and giving a relevant date.
   3374 
   3375        b. The work must carry prominent notices stating that it is
   3376           released under this License and any conditions added under
   3377           section 7.  This requirement modifies the requirement in
   3378           section 4 to "keep intact all notices".
   3379 
   3380        c. You must license the entire work, as a whole, under this
   3381           License to anyone who comes into possession of a copy.  This
   3382           License will therefore apply, along with any applicable
   3383           section 7 additional terms, to the whole of the work, and all
   3384           its parts, regardless of how they are packaged.  This License
   3385           gives no permission to license the work in any other way, but
   3386           it does not invalidate such permission if you have separately
   3387           received it.
   3388 
   3389        d. If the work has interactive user interfaces, each must display
   3390           Appropriate Legal Notices; however, if the Program has
   3391           interactive interfaces that do not display Appropriate Legal
   3392           Notices, your work need not make them do so.
   3393 
   3394      A compilation of a covered work with other separate and independent
   3395      works, which are not by their nature extensions of the covered
   3396      work, and which are not combined with it such as to form a larger
   3397      program, in or on a volume of a storage or distribution medium, is
   3398      called an "aggregate" if the compilation and its resulting
   3399      copyright are not used to limit the access or legal rights of the
   3400      compilation's users beyond what the individual works permit.
   3401      Inclusion of a covered work in an aggregate does not cause this
   3402      License to apply to the other parts of the aggregate.
   3403 
   3404   6. Conveying Non-Source Forms.
   3405 
   3406      You may convey a covered work in object code form under the terms
   3407      of sections 4 and 5, provided that you also convey the
   3408      machine-readable Corresponding Source under the terms of this
   3409      License, in one of these ways:
   3410 
   3411        a. Convey the object code in, or embodied in, a physical product
   3412           (including a physical distribution medium), accompanied by the
   3413           Corresponding Source fixed on a durable physical medium
   3414           customarily used for software interchange.
   3415 
   3416        b. Convey the object code in, or embodied in, a physical product
   3417           (including a physical distribution medium), accompanied by a
   3418           written offer, valid for at least three years and valid for
   3419           as long as you offer spare parts or customer support for that
   3420           product model, to give anyone who possesses the object code
   3421           either (1) a copy of the Corresponding Source for all the
   3422           software in the product that is covered by this License, on a
   3423           durable physical medium customarily used for software
   3424           interchange, for a price no more than your reasonable cost of
   3425           physically performing this conveying of source, or (2) access
   3426           to copy the Corresponding Source from a network server at no
   3427           charge.
   3428 
   3429        c. Convey individual copies of the object code with a copy of
   3430           the written offer to provide the Corresponding Source.  This
   3431           alternative is allowed only occasionally and noncommercially,
   3432           and only if you received the object code with such an offer,
   3433           in accord with subsection 6b.
   3434 
   3435        d. Convey the object code by offering access from a designated
   3436           place (gratis or for a charge), and offer equivalent access
   3437           to the Corresponding Source in the same way through the same
   3438           place at no further charge.  You need not require recipients
   3439           to copy the Corresponding Source along with the object code.
   3440           If the place to copy the object code is a network server, the
   3441           Corresponding Source may be on a different server (operated
   3442           by you or a third party) that supports equivalent copying
   3443           facilities, provided you maintain clear directions next to
   3444           the object code saying where to find the Corresponding Source.
   3445           Regardless of what server hosts the Corresponding Source, you
   3446           remain obligated to ensure that it is available for as long
   3447           as needed to satisfy these requirements.
   3448 
   3449        e. Convey the object code using peer-to-peer transmission,
   3450           provided you inform other peers where the object code and
   3451           Corresponding Source of the work are being offered to the
   3452           general public at no charge under subsection 6d.
   3453 
   3454 
   3455      A separable portion of the object code, whose source code is
   3456      excluded from the Corresponding Source as a System Library, need
   3457      not be included in conveying the object code work.
   3458 
   3459      A "User Product" is either (1) a "consumer product", which means
   3460      any tangible personal property which is normally used for personal,
   3461      family, or household purposes, or (2) anything designed or sold for
   3462      incorporation into a dwelling.  In determining whether a product
   3463      is a consumer product, doubtful cases shall be resolved in favor of
   3464      coverage.  For a particular product received by a particular user,
   3465      "normally used" refers to a typical or common use of that class of
   3466      product, regardless of the status of the particular user or of the
   3467      way in which the particular user actually uses, or expects or is
   3468      expected to use, the product.  A product is a consumer product
   3469      regardless of whether the product has substantial commercial,
   3470      industrial or non-consumer uses, unless such uses represent the
   3471      only significant mode of use of the product.
   3472 
   3473      "Installation Information" for a User Product means any methods,
   3474      procedures, authorization keys, or other information required to
   3475      install and execute modified versions of a covered work in that
   3476      User Product from a modified version of its Corresponding Source.
   3477      The information must suffice to ensure that the continued
   3478      functioning of the modified object code is in no case prevented or
   3479      interfered with solely because modification has been made.
   3480 
   3481      If you convey an object code work under this section in, or with,
   3482      or specifically for use in, a User Product, and the conveying
   3483      occurs as part of a transaction in which the right of possession
   3484      and use of the User Product is transferred to the recipient in
   3485      perpetuity or for a fixed term (regardless of how the transaction
   3486      is characterized), the Corresponding Source conveyed under this
   3487      section must be accompanied by the Installation Information.  But
   3488      this requirement does not apply if neither you nor any third party
   3489      retains the ability to install modified object code on the User
   3490      Product (for example, the work has been installed in ROM).
   3491 
   3492      The requirement to provide Installation Information does not
   3493      include a requirement to continue to provide support service,
   3494      warranty, or updates for a work that has been modified or
   3495      installed by the recipient, or for the User Product in which it
   3496      has been modified or installed.  Access to a network may be denied
   3497      when the modification itself materially and adversely affects the
   3498      operation of the network or violates the rules and protocols for
   3499      communication across the network.
   3500 
   3501      Corresponding Source conveyed, and Installation Information
   3502      provided, in accord with this section must be in a format that is
   3503      publicly documented (and with an implementation available to the
   3504      public in source code form), and must require no special password
   3505      or key for unpacking, reading or copying.
   3506 
   3507   7. Additional Terms.
   3508 
   3509      "Additional permissions" are terms that supplement the terms of
   3510      this License by making exceptions from one or more of its
   3511      conditions.  Additional permissions that are applicable to the
   3512      entire Program shall be treated as though they were included in
   3513      this License, to the extent that they are valid under applicable
   3514      law.  If additional permissions apply only to part of the Program,
   3515      that part may be used separately under those permissions, but the
   3516      entire Program remains governed by this License without regard to
   3517      the additional permissions.
   3518 
   3519      When you convey a copy of a covered work, you may at your option
   3520      remove any additional permissions from that copy, or from any part
   3521      of it.  (Additional permissions may be written to require their own
   3522      removal in certain cases when you modify the work.)  You may place
   3523      additional permissions on material, added by you to a covered work,
   3524      for which you have or can give appropriate copyright permission.
   3525 
   3526      Notwithstanding any other provision of this License, for material
   3527      you add to a covered work, you may (if authorized by the copyright
   3528      holders of that material) supplement the terms of this License
   3529      with terms:
   3530 
   3531        a. Disclaiming warranty or limiting liability differently from
   3532           the terms of sections 15 and 16 of this License; or
   3533 
   3534        b. Requiring preservation of specified reasonable legal notices
   3535           or author attributions in that material or in the Appropriate
   3536           Legal Notices displayed by works containing it; or
   3537 
   3538        c. Prohibiting misrepresentation of the origin of that material,
   3539           or requiring that modified versions of such material be
   3540           marked in reasonable ways as different from the original
   3541           version; or
   3542 
   3543        d. Limiting the use for publicity purposes of names of licensors
   3544           or authors of the material; or
   3545 
   3546        e. Declining to grant rights under trademark law for use of some
   3547           trade names, trademarks, or service marks; or
   3548 
   3549        f. Requiring indemnification of licensors and authors of that
   3550           material by anyone who conveys the material (or modified
   3551           versions of it) with contractual assumptions of liability to
   3552           the recipient, for any liability that these contractual
   3553           assumptions directly impose on those licensors and authors.
   3554 
   3555      All other non-permissive additional terms are considered "further
   3556      restrictions" within the meaning of section 10.  If the Program as
   3557      you received it, or any part of it, contains a notice stating that
   3558      it is governed by this License along with a term that is a further
   3559      restriction, you may remove that term.  If a license document
   3560      contains a further restriction but permits relicensing or
   3561      conveying under this License, you may add to a covered work
   3562      material governed by the terms of that license document, provided
   3563      that the further restriction does not survive such relicensing or
   3564      conveying.
   3565 
   3566      If you add terms to a covered work in accord with this section, you
   3567      must place, in the relevant source files, a statement of the
   3568      additional terms that apply to those files, or a notice indicating
   3569      where to find the applicable terms.
   3570 
   3571      Additional terms, permissive or non-permissive, may be stated in
   3572      the form of a separately written license, or stated as exceptions;
   3573      the above requirements apply either way.
   3574 
   3575   8. Termination.
   3576 
   3577      You may not propagate or modify a covered work except as expressly
   3578      provided under this License.  Any attempt otherwise to propagate or
   3579      modify it is void, and will automatically terminate your rights
   3580      under this License (including any patent licenses granted under
   3581      the third paragraph of section 11).
   3582 
   3583      However, if you cease all violation of this License, then your
   3584      license from a particular copyright holder is reinstated (a)
   3585      provisionally, unless and until the copyright holder explicitly
   3586      and finally terminates your license, and (b) permanently, if the
   3587      copyright holder fails to notify you of the violation by some
   3588      reasonable means prior to 60 days after the cessation.
   3589 
   3590      Moreover, your license from a particular copyright holder is
   3591      reinstated permanently if the copyright holder notifies you of the
   3592      violation by some reasonable means, this is the first time you have
   3593      received notice of violation of this License (for any work) from
   3594      that copyright holder, and you cure the violation prior to 30 days
   3595      after your receipt of the notice.
   3596 
   3597      Termination of your rights under this section does not terminate
   3598      the licenses of parties who have received copies or rights from
   3599      you under this License.  If your rights have been terminated and
   3600      not permanently reinstated, you do not qualify to receive new
   3601      licenses for the same material under section 10.
   3602 
   3603   9. Acceptance Not Required for Having Copies.
   3604 
   3605      You are not required to accept this License in order to receive or
   3606      run a copy of the Program.  Ancillary propagation of a covered work
   3607      occurring solely as a consequence of using peer-to-peer
   3608      transmission to receive a copy likewise does not require
   3609      acceptance.  However, nothing other than this License grants you
   3610      permission to propagate or modify any covered work.  These actions
   3611      infringe copyright if you do not accept this License.  Therefore,
   3612      by modifying or propagating a covered work, you indicate your
   3613      acceptance of this License to do so.
   3614 
   3615  10. Automatic Licensing of Downstream Recipients.
   3616 
   3617      Each time you convey a covered work, the recipient automatically
   3618      receives a license from the original licensors, to run, modify and
   3619      propagate that work, subject to this License.  You are not
   3620      responsible for enforcing compliance by third parties with this
   3621      License.
   3622 
   3623      An "entity transaction" is a transaction transferring control of an
   3624      organization, or substantially all assets of one, or subdividing an
   3625      organization, or merging organizations.  If propagation of a
   3626      covered work results from an entity transaction, each party to that
   3627      transaction who receives a copy of the work also receives whatever
   3628      licenses to the work the party's predecessor in interest had or
   3629      could give under the previous paragraph, plus a right to
   3630      possession of the Corresponding Source of the work from the
   3631      predecessor in interest, if the predecessor has it or can get it
   3632      with reasonable efforts.
   3633 
   3634      You may not impose any further restrictions on the exercise of the
   3635      rights granted or affirmed under this License.  For example, you
   3636      may not impose a license fee, royalty, or other charge for
   3637      exercise of rights granted under this License, and you may not
   3638      initiate litigation (including a cross-claim or counterclaim in a
   3639      lawsuit) alleging that any patent claim is infringed by making,
   3640      using, selling, offering for sale, or importing the Program or any
   3641      portion of it.
   3642 
   3643  11. Patents.
   3644 
   3645      A "contributor" is a copyright holder who authorizes use under this
   3646      License of the Program or a work on which the Program is based.
   3647      The work thus licensed is called the contributor's "contributor
   3648      version".
   3649 
   3650      A contributor's "essential patent claims" are all patent claims
   3651      owned or controlled by the contributor, whether already acquired or
   3652      hereafter acquired, that would be infringed by some manner,
   3653      permitted by this License, of making, using, or selling its
   3654      contributor version, but do not include claims that would be
   3655      infringed only as a consequence of further modification of the
   3656      contributor version.  For purposes of this definition, "control"
   3657      includes the right to grant patent sublicenses in a manner
   3658      consistent with the requirements of this License.
   3659 
   3660      Each contributor grants you a non-exclusive, worldwide,
   3661      royalty-free patent license under the contributor's essential
   3662      patent claims, to make, use, sell, offer for sale, import and
   3663      otherwise run, modify and propagate the contents of its
   3664      contributor version.
   3665 
   3666      In the following three paragraphs, a "patent license" is any
   3667      express agreement or commitment, however denominated, not to
   3668      enforce a patent (such as an express permission to practice a
   3669      patent or covenant not to sue for patent infringement).  To
   3670      "grant" such a patent license to a party means to make such an
   3671      agreement or commitment not to enforce a patent against the party.
   3672 
   3673      If you convey a covered work, knowingly relying on a patent
   3674      license, and the Corresponding Source of the work is not available
   3675      for anyone to copy, free of charge and under the terms of this
   3676      License, through a publicly available network server or other
   3677      readily accessible means, then you must either (1) cause the
   3678      Corresponding Source to be so available, or (2) arrange to deprive
   3679      yourself of the benefit of the patent license for this particular
   3680      work, or (3) arrange, in a manner consistent with the requirements
   3681      of this License, to extend the patent license to downstream
   3682      recipients.  "Knowingly relying" means you have actual knowledge
   3683      that, but for the patent license, your conveying the covered work
   3684      in a country, or your recipient's use of the covered work in a
   3685      country, would infringe one or more identifiable patents in that
   3686      country that you have reason to believe are valid.
   3687 
   3688      If, pursuant to or in connection with a single transaction or
   3689      arrangement, you convey, or propagate by procuring conveyance of, a
   3690      covered work, and grant a patent license to some of the parties
   3691      receiving the covered work authorizing them to use, propagate,
   3692      modify or convey a specific copy of the covered work, then the
   3693      patent license you grant is automatically extended to all
   3694      recipients of the covered work and works based on it.
   3695 
   3696      A patent license is "discriminatory" if it does not include within
   3697      the scope of its coverage, prohibits the exercise of, or is
   3698      conditioned on the non-exercise of one or more of the rights that
   3699      are specifically granted under this License.  You may not convey a
   3700      covered work if you are a party to an arrangement with a third
   3701      party that is in the business of distributing software, under
   3702      which you make payment to the third party based on the extent of
   3703      your activity of conveying the work, and under which the third
   3704      party grants, to any of the parties who would receive the covered
   3705      work from you, a discriminatory patent license (a) in connection
   3706      with copies of the covered work conveyed by you (or copies made
   3707      from those copies), or (b) primarily for and in connection with
   3708      specific products or compilations that contain the covered work,
   3709      unless you entered into that arrangement, or that patent license
   3710      was granted, prior to 28 March 2007.
   3711 
   3712      Nothing in this License shall be construed as excluding or limiting
   3713      any implied license or other defenses to infringement that may
   3714      otherwise be available to you under applicable patent law.
   3715 
   3716  12. No Surrender of Others' Freedom.
   3717 
   3718      If conditions are imposed on you (whether by court order,
   3719      agreement or otherwise) that contradict the conditions of this
   3720      License, they do not excuse you from the conditions of this
   3721      License.  If you cannot convey a covered work so as to satisfy
   3722      simultaneously your obligations under this License and any other
   3723      pertinent obligations, then as a consequence you may not convey it
   3724      at all.  For example, if you agree to terms that obligate you to
   3725      collect a royalty for further conveying from those to whom you
   3726      convey the Program, the only way you could satisfy both those
   3727      terms and this License would be to refrain entirely from conveying
   3728      the Program.
   3729 
   3730  13. Use with the GNU Affero General Public License.
   3731 
   3732      Notwithstanding any other provision of this License, you have
   3733      permission to link or combine any covered work with a work licensed
   3734      under version 3 of the GNU Affero General Public License into a
   3735      single combined work, and to convey the resulting work.  The terms
   3736      of this License will continue to apply to the part which is the
   3737      covered work, but the special requirements of the GNU Affero
   3738      General Public License, section 13, concerning interaction through
   3739      a network will apply to the combination as such.
   3740 
   3741  14. Revised Versions of this License.
   3742 
   3743      The Free Software Foundation may publish revised and/or new
   3744      versions of the GNU General Public License from time to time.
   3745      Such new versions will be similar in spirit to the present
   3746      version, but may differ in detail to address new problems or
   3747      concerns.
   3748 
   3749      Each version is given a distinguishing version number.  If the
   3750      Program specifies that a certain numbered version of the GNU
   3751      General Public License "or any later version" applies to it, you
   3752      have the option of following the terms and conditions either of
   3753      that numbered version or of any later version published by the
   3754      Free Software Foundation.  If the Program does not specify a
   3755      version number of the GNU General Public License, you may choose
   3756      any version ever published by the Free Software Foundation.
   3757 
   3758      If the Program specifies that a proxy can decide which future
   3759      versions of the GNU General Public License can be used, that
   3760      proxy's public statement of acceptance of a version permanently
   3761      authorizes you to choose that version for the Program.
   3762 
   3763      Later license versions may give you additional or different
   3764      permissions.  However, no additional obligations are imposed on any
   3765      author or copyright holder as a result of your choosing to follow a
   3766      later version.
   3767 
   3768  15. Disclaimer of Warranty.
   3769 
   3770      THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
   3771      APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE
   3772      COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
   3773      WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
   3774      INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   3775      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE
   3776      RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
   3777      SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
   3778      NECESSARY SERVICING, REPAIR OR CORRECTION.
   3779 
   3780  16. Limitation of Liability.
   3781 
   3782      IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
   3783      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
   3784      AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
   3785      FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
   3786      CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
   3787      THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
   3788      BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
   3789      PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
   3790      PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
   3791      THE POSSIBILITY OF SUCH DAMAGES.
   3792 
   3793  17. Interpretation of Sections 15 and 16.
   3794 
   3795      If the disclaimer of warranty and limitation of liability provided
   3796      above cannot be given local legal effect according to their terms,
   3797      reviewing courts shall apply local law that most closely
   3798      approximates an absolute waiver of all civil liability in
   3799      connection with the Program, unless a warranty or assumption of
   3800      liability accompanies a copy of the Program in return for a fee.
   3801 
   3802 
   3803 END OF TERMS AND CONDITIONS
   3804 ===========================
   3805 
   3806 How to Apply These Terms to Your New Programs
   3807 =============================================
   3808 
   3809 If you develop a new program, and you want it to be of the greatest
   3810 possible use to the public, the best way to achieve this is to make it
   3811 free software which everyone can redistribute and change under these
   3812 terms.
   3813 
   3814    To do so, attach the following notices to the program.  It is safest
   3815 to attach them to the start of each source file to most effectively
   3816 state the exclusion of warranty; and each file should have at least the
   3817 "copyright" line and a pointer to where the full notice is found.
   3818 
   3819      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
   3820      Copyright (C) YEAR NAME OF AUTHOR
   3821 
   3822      This program is free software: you can redistribute it and/or modify
   3823      it under the terms of the GNU General Public License as published by
   3824      the Free Software Foundation, either version 3 of the License, or (at
   3825      your option) any later version.
   3826 
   3827      This program is distributed in the hope that it will be useful, but
   3828      WITHOUT ANY WARRANTY; without even the implied warranty of
   3829      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   3830      General Public License for more details.
   3831 
   3832      You should have received a copy of the GNU General Public License
   3833      along with this program.  If not, see `http://www.gnu.org/licenses/'.
   3834 
   3835    Also add information on how to contact you by electronic and paper
   3836 mail.
   3837 
   3838    If the program does terminal interaction, make it output a short
   3839 notice like this when it starts in an interactive mode:
   3840 
   3841      PROGRAM Copyright (C) YEAR NAME OF AUTHOR
   3842      This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
   3843      This is free software, and you are welcome to redistribute it
   3844      under certain conditions; type `show c' for details.
   3845 
   3846    The hypothetical commands `show w' and `show c' should show the
   3847 appropriate parts of the General Public License.  Of course, your
   3848 program's commands might be different; for a GUI interface, you would
   3849 use an "about box".
   3850 
   3851    You should also get your employer (if you work as a programmer) or
   3852 school, if any, to sign a "copyright disclaimer" for the program, if
   3853 necessary.  For more information on this, and how to apply and follow
   3854 the GNU GPL, see `http://www.gnu.org/licenses/'.
   3855 
   3856    The GNU General Public License does not permit incorporating your
   3857 program into proprietary programs.  If your program is a subroutine
   3858 library, you may consider it more useful to permit linking proprietary
   3859 applications with the library.  If this is what you want to do, use the
   3860 GNU Lesser General Public License instead of this License.  But first,
   3861 please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
   3862 
   3863 
   3864 File: libgomp.info,  Node: GNU Free Documentation License,  Next: Funding,  Prev: Copying,  Up: Top
   3865 
   3866 GNU Free Documentation License
   3867 ******************************
   3868 
   3869                      Version 1.3, 3 November 2008
   3870 
   3871      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
   3872      `http://fsf.org/'
   3873 
   3874      Everyone is permitted to copy and distribute verbatim copies
   3875      of this license document, but changing it is not allowed.
   3876 
   3877   0. PREAMBLE
   3878 
   3879      The purpose of this License is to make a manual, textbook, or other
   3880      functional and useful document "free" in the sense of freedom: to
   3881      assure everyone the effective freedom to copy and redistribute it,
   3882      with or without modifying it, either commercially or
   3883      noncommercially.  Secondarily, this License preserves for the
   3884      author and publisher a way to get credit for their work, while not
   3885      being considered responsible for modifications made by others.
   3886 
   3887      This License is a kind of "copyleft", which means that derivative
   3888      works of the document must themselves be free in the same sense.
   3889      It complements the GNU General Public License, which is a copyleft
   3890      license designed for free software.
   3891 
   3892      We have designed this License in order to use it for manuals for
   3893      free software, because free software needs free documentation: a
   3894      free program should come with manuals providing the same freedoms
   3895      that the software does.  But this License is not limited to
   3896      software manuals; it can be used for any textual work, regardless
   3897      of subject matter or whether it is published as a printed book.
   3898      We recommend this License principally for works whose purpose is
   3899      instruction or reference.
   3900 
   3901   1. APPLICABILITY AND DEFINITIONS
   3902 
   3903      This License applies to any manual or other work, in any medium,
   3904      that contains a notice placed by the copyright holder saying it
   3905      can be distributed under the terms of this License.  Such a notice
   3906      grants a world-wide, royalty-free license, unlimited in duration,
   3907      to use that work under the conditions stated herein.  The
   3908      "Document", below, refers to any such manual or work.  Any member
   3909      of the public is a licensee, and is addressed as "you".  You
   3910      accept the license if you copy, modify or distribute the work in a
   3911      way requiring permission under copyright law.
   3912 
   3913      A "Modified Version" of the Document means any work containing the
   3914      Document or a portion of it, either copied verbatim, or with
   3915      modifications and/or translated into another language.
   3916 
   3917      A "Secondary Section" is a named appendix or a front-matter section
   3918      of the Document that deals exclusively with the relationship of the
   3919      publishers or authors of the Document to the Document's overall
   3920      subject (or to related matters) and contains nothing that could
   3921      fall directly within that overall subject.  (Thus, if the Document
   3922      is in part a textbook of mathematics, a Secondary Section may not
   3923      explain any mathematics.)  The relationship could be a matter of
   3924      historical connection with the subject or with related matters, or
   3925      of legal, commercial, philosophical, ethical or political position
   3926      regarding them.
   3927 
   3928      The "Invariant Sections" are certain Secondary Sections whose
   3929      titles are designated, as being those of Invariant Sections, in
   3930      the notice that says that the Document is released under this
   3931      License.  If a section does not fit the above definition of
   3932      Secondary then it is not allowed to be designated as Invariant.
   3933      The Document may contain zero Invariant Sections.  If the Document
   3934      does not identify any Invariant Sections then there are none.
   3935 
   3936      The "Cover Texts" are certain short passages of text that are
   3937      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
   3938      that says that the Document is released under this License.  A
   3939      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
   3940      be at most 25 words.
   3941 
   3942      A "Transparent" copy of the Document means a machine-readable copy,
   3943      represented in a format whose specification is available to the
   3944      general public, that is suitable for revising the document
   3945      straightforwardly with generic text editors or (for images
   3946      composed of pixels) generic paint programs or (for drawings) some
   3947      widely available drawing editor, and that is suitable for input to
   3948      text formatters or for automatic translation to a variety of
   3949      formats suitable for input to text formatters.  A copy made in an
   3950      otherwise Transparent file format whose markup, or absence of
   3951      markup, has been arranged to thwart or discourage subsequent
   3952      modification by readers is not Transparent.  An image format is
   3953      not Transparent if used for any substantial amount of text.  A
   3954      copy that is not "Transparent" is called "Opaque".
   3955 
   3956      Examples of suitable formats for Transparent copies include plain
   3957      ASCII without markup, Texinfo input format, LaTeX input format,
   3958      SGML or XML using a publicly available DTD, and
   3959      standard-conforming simple HTML, PostScript or PDF designed for
   3960      human modification.  Examples of transparent image formats include
   3961      PNG, XCF and JPG.  Opaque formats include proprietary formats that
   3962      can be read and edited only by proprietary word processors, SGML or
   3963      XML for which the DTD and/or processing tools are not generally
   3964      available, and the machine-generated HTML, PostScript or PDF
   3965      produced by some word processors for output purposes only.
   3966 
   3967      The "Title Page" means, for a printed book, the title page itself,
   3968      plus such following pages as are needed to hold, legibly, the
   3969      material this License requires to appear in the title page.  For
   3970      works in formats which do not have any title page as such, "Title
   3971      Page" means the text near the most prominent appearance of the
   3972      work's title, preceding the beginning of the body of the text.
   3973 
   3974      The "publisher" means any person or entity that distributes copies
   3975      of the Document to the public.
   3976 
   3977      A section "Entitled XYZ" means a named subunit of the Document
   3978      whose title either is precisely XYZ or contains XYZ in parentheses
   3979      following text that translates XYZ in another language.  (Here XYZ
   3980      stands for a specific section name mentioned below, such as
   3981      "Acknowledgements", "Dedications", "Endorsements", or "History".)
   3982      To "Preserve the Title" of such a section when you modify the
   3983      Document means that it remains a section "Entitled XYZ" according
   3984      to this definition.
   3985 
   3986      The Document may include Warranty Disclaimers next to the notice
   3987      which states that this License applies to the Document.  These
   3988      Warranty Disclaimers are considered to be included by reference in
   3989      this License, but only as regards disclaiming warranties: any other
   3990      implication that these Warranty Disclaimers may have is void and
   3991      has no effect on the meaning of this License.
   3992 
   3993   2. VERBATIM COPYING
   3994 
   3995      You may copy and distribute the Document in any medium, either
   3996      commercially or noncommercially, provided that this License, the
   3997      copyright notices, and the license notice saying this License
   3998      applies to the Document are reproduced in all copies, and that you
   3999      add no other conditions whatsoever to those of this License.  You
   4000      may not use technical measures to obstruct or control the reading
   4001      or further copying of the copies you make or distribute.  However,
   4002      you may accept compensation in exchange for copies.  If you
   4003      distribute a large enough number of copies you must also follow
   4004      the conditions in section 3.
   4005 
   4006      You may also lend copies, under the same conditions stated above,
   4007      and you may publicly display copies.
   4008 
   4009   3. COPYING IN QUANTITY
   4010 
   4011      If you publish printed copies (or copies in media that commonly
   4012      have printed covers) of the Document, numbering more than 100, and
   4013      the Document's license notice requires Cover Texts, you must
   4014      enclose the copies in covers that carry, clearly and legibly, all
   4015      these Cover Texts: Front-Cover Texts on the front cover, and
   4016      Back-Cover Texts on the back cover.  Both covers must also clearly
   4017      and legibly identify you as the publisher of these copies.  The
   4018      front cover must present the full title with all words of the
   4019      title equally prominent and visible.  You may add other material
   4020      on the covers in addition.  Copying with changes limited to the
   4021      covers, as long as they preserve the title of the Document and
   4022      satisfy these conditions, can be treated as verbatim copying in
   4023      other respects.
   4024 
   4025      If the required texts for either cover are too voluminous to fit
   4026      legibly, you should put the first ones listed (as many as fit
   4027      reasonably) on the actual cover, and continue the rest onto
   4028      adjacent pages.
   4029 
   4030      If you publish or distribute Opaque copies of the Document
   4031      numbering more than 100, you must either include a
   4032      machine-readable Transparent copy along with each Opaque copy, or
   4033      state in or with each Opaque copy a computer-network location from
   4034      which the general network-using public has access to download
   4035      using public-standard network protocols a complete Transparent
   4036      copy of the Document, free of added material.  If you use the
   4037      latter option, you must take reasonably prudent steps, when you
   4038      begin distribution of Opaque copies in quantity, to ensure that
   4039      this Transparent copy will remain thus accessible at the stated
   4040      location until at least one year after the last time you
   4041      distribute an Opaque copy (directly or through your agents or
   4042      retailers) of that edition to the public.
   4043 
   4044      It is requested, but not required, that you contact the authors of
   4045      the Document well before redistributing any large number of
   4046      copies, to give them a chance to provide you with an updated
   4047      version of the Document.
   4048 
   4049   4. MODIFICATIONS
   4050 
   4051      You may copy and distribute a Modified Version of the Document
   4052      under the conditions of sections 2 and 3 above, provided that you
   4053      release the Modified Version under precisely this License, with
   4054      the Modified Version filling the role of the Document, thus
   4055      licensing distribution and modification of the Modified Version to
   4056      whoever possesses a copy of it.  In addition, you must do these
   4057      things in the Modified Version:
   4058 
   4059        A. Use in the Title Page (and on the covers, if any) a title
   4060           distinct from that of the Document, and from those of
   4061           previous versions (which should, if there were any, be listed
   4062           in the History section of the Document).  You may use the
   4063           same title as a previous version if the original publisher of
   4064           that version gives permission.
   4065 
   4066        B. List on the Title Page, as authors, one or more persons or
   4067           entities responsible for authorship of the modifications in
   4068           the Modified Version, together with at least five of the
   4069           principal authors of the Document (all of its principal
   4070           authors, if it has fewer than five), unless they release you
   4071           from this requirement.
   4072 
   4073        C. State on the Title page the name of the publisher of the
   4074           Modified Version, as the publisher.
   4075 
   4076        D. Preserve all the copyright notices of the Document.
   4077 
   4078        E. Add an appropriate copyright notice for your modifications
   4079           adjacent to the other copyright notices.
   4080 
   4081        F. Include, immediately after the copyright notices, a license
   4082           notice giving the public permission to use the Modified
   4083           Version under the terms of this License, in the form shown in
   4084           the Addendum below.
   4085 
   4086        G. Preserve in that license notice the full lists of Invariant
   4087           Sections and required Cover Texts given in the Document's
   4088           license notice.
   4089 
   4090        H. Include an unaltered copy of this License.
   4091 
   4092        I. Preserve the section Entitled "History", Preserve its Title,
   4093           and add to it an item stating at least the title, year, new
   4094           authors, and publisher of the Modified Version as given on
   4095           the Title Page.  If there is no section Entitled "History" in
   4096           the Document, create one stating the title, year, authors,
   4097           and publisher of the Document as given on its Title Page,
   4098           then add an item describing the Modified Version as stated in
   4099           the previous sentence.
   4100 
   4101        J. Preserve the network location, if any, given in the Document
   4102           for public access to a Transparent copy of the Document, and
   4103           likewise the network locations given in the Document for
   4104           previous versions it was based on.  These may be placed in
   4105           the "History" section.  You may omit a network location for a
   4106           work that was published at least four years before the
   4107           Document itself, or if the original publisher of the version
   4108           it refers to gives permission.
   4109 
   4110        K. For any section Entitled "Acknowledgements" or "Dedications",
   4111           Preserve the Title of the section, and preserve in the
   4112           section all the substance and tone of each of the contributor
   4113           acknowledgements and/or dedications given therein.
   4114 
   4115        L. Preserve all the Invariant Sections of the Document,
   4116           unaltered in their text and in their titles.  Section numbers
   4117           or the equivalent are not considered part of the section
   4118           titles.
   4119 
   4120        M. Delete any section Entitled "Endorsements".  Such a section
   4121           may not be included in the Modified Version.
   4122 
   4123        N. Do not retitle any existing section to be Entitled
   4124           "Endorsements" or to conflict in title with any Invariant
   4125           Section.
   4126 
   4127        O. Preserve any Warranty Disclaimers.
   4128 
   4129      If the Modified Version includes new front-matter sections or
   4130      appendices that qualify as Secondary Sections and contain no
   4131      material copied from the Document, you may at your option
   4132      designate some or all of these sections as invariant.  To do this,
   4133      add their titles to the list of Invariant Sections in the Modified
   4134      Version's license notice.  These titles must be distinct from any
   4135      other section titles.
   4136 
   4137      You may add a section Entitled "Endorsements", provided it contains
   4138      nothing but endorsements of your Modified Version by various
   4139      parties--for example, statements of peer review or that the text
   4140      has been approved by an organization as the authoritative
   4141      definition of a standard.
   4142 
   4143      You may add a passage of up to five words as a Front-Cover Text,
   4144      and a passage of up to 25 words as a Back-Cover Text, to the end
   4145      of the list of Cover Texts in the Modified Version.  Only one
   4146      passage of Front-Cover Text and one of Back-Cover Text may be
   4147      added by (or through arrangements made by) any one entity.  If the
   4148      Document already includes a cover text for the same cover,
   4149      previously added by you or by arrangement made by the same entity
   4150      you are acting on behalf of, you may not add another; but you may
   4151      replace the old one, on explicit permission from the previous
   4152      publisher that added the old one.
   4153 
   4154      The author(s) and publisher(s) of the Document do not by this
   4155      License give permission to use their names for publicity for or to
   4156      assert or imply endorsement of any Modified Version.
   4157 
   4158   5. COMBINING DOCUMENTS
   4159 
   4160      You may combine the Document with other documents released under
   4161      this License, under the terms defined in section 4 above for
   4162      modified versions, provided that you include in the combination
   4163      all of the Invariant Sections of all of the original documents,
   4164      unmodified, and list them all as Invariant Sections of your
   4165      combined work in its license notice, and that you preserve all
   4166      their Warranty Disclaimers.
   4167 
   4168      The combined work need only contain one copy of this License, and
   4169      multiple identical Invariant Sections may be replaced with a single
   4170      copy.  If there are multiple Invariant Sections with the same name
   4171      but different contents, make the title of each such section unique
   4172      by adding at the end of it, in parentheses, the name of the
   4173      original author or publisher of that section if known, or else a
   4174      unique number.  Make the same adjustment to the section titles in
   4175      the list of Invariant Sections in the license notice of the
   4176      combined work.
   4177 
   4178      In the combination, you must combine any sections Entitled
   4179      "History" in the various original documents, forming one section
   4180      Entitled "History"; likewise combine any sections Entitled
   4181      "Acknowledgements", and any sections Entitled "Dedications".  You
   4182      must delete all sections Entitled "Endorsements."
   4183 
   4184   6. COLLECTIONS OF DOCUMENTS
   4185 
   4186      You may make a collection consisting of the Document and other
   4187      documents released under this License, and replace the individual
   4188      copies of this License in the various documents with a single copy
   4189      that is included in the collection, provided that you follow the
   4190      rules of this License for verbatim copying of each of the
   4191      documents in all other respects.
   4192 
   4193      You may extract a single document from such a collection, and
   4194      distribute it individually under this License, provided you insert
   4195      a copy of this License into the extracted document, and follow
   4196      this License in all other respects regarding verbatim copying of
   4197      that document.
   4198 
   4199   7. AGGREGATION WITH INDEPENDENT WORKS
   4200 
   4201      A compilation of the Document or its derivatives with other
   4202      separate and independent documents or works, in or on a volume of
   4203      a storage or distribution medium, is called an "aggregate" if the
   4204      copyright resulting from the compilation is not used to limit the
   4205      legal rights of the compilation's users beyond what the individual
   4206      works permit.  When the Document is included in an aggregate, this
   4207      License does not apply to the other works in the aggregate which
   4208      are not themselves derivative works of the Document.
   4209 
   4210      If the Cover Text requirement of section 3 is applicable to these
   4211      copies of the Document, then if the Document is less than one half
   4212      of the entire aggregate, the Document's Cover Texts may be placed
   4213      on covers that bracket the Document within the aggregate, or the
   4214      electronic equivalent of covers if the Document is in electronic
   4215      form.  Otherwise they must appear on printed covers that bracket
   4216      the whole aggregate.
   4217 
   4218   8. TRANSLATION
   4219 
   4220      Translation is considered a kind of modification, so you may
   4221      distribute translations of the Document under the terms of section
   4222      4.  Replacing Invariant Sections with translations requires special
   4223      permission from their copyright holders, but you may include
   4224      translations of some or all Invariant Sections in addition to the
   4225      original versions of these Invariant Sections.  You may include a
   4226      translation of this License, and all the license notices in the
   4227      Document, and any Warranty Disclaimers, provided that you also
   4228      include the original English version of this License and the
   4229      original versions of those notices and disclaimers.  In case of a
   4230      disagreement between the translation and the original version of
   4231      this License or a notice or disclaimer, the original version will
   4232      prevail.
   4233 
   4234      If a section in the Document is Entitled "Acknowledgements",
   4235      "Dedications", or "History", the requirement (section 4) to
   4236      Preserve its Title (section 1) will typically require changing the
   4237      actual title.
   4238 
   4239   9. TERMINATION
   4240 
   4241      You may not copy, modify, sublicense, or distribute the Document
   4242      except as expressly provided under this License.  Any attempt
   4243      otherwise to copy, modify, sublicense, or distribute it is void,
   4244      and will automatically terminate your rights under this License.
   4245 
   4246      However, if you cease all violation of this License, then your
   4247      license from a particular copyright holder is reinstated (a)
   4248      provisionally, unless and until the copyright holder explicitly
   4249      and finally terminates your license, and (b) permanently, if the
   4250      copyright holder fails to notify you of the violation by some
   4251      reasonable means prior to 60 days after the cessation.
   4252 
   4253      Moreover, your license from a particular copyright holder is
   4254      reinstated permanently if the copyright holder notifies you of the
   4255      violation by some reasonable means, this is the first time you have
   4256      received notice of violation of this License (for any work) from
   4257      that copyright holder, and you cure the violation prior to 30 days
   4258      after your receipt of the notice.
   4259 
   4260      Termination of your rights under this section does not terminate
   4261      the licenses of parties who have received copies or rights from
   4262      you under this License.  If your rights have been terminated and
   4263      not permanently reinstated, receipt of a copy of some or all of
   4264      the same material does not give you any rights to use it.
   4265 
   4266  10. FUTURE REVISIONS OF THIS LICENSE
   4267 
   4268      The Free Software Foundation may publish new, revised versions of
   4269      the GNU Free Documentation License from time to time.  Such new
   4270      versions will be similar in spirit to the present version, but may
   4271      differ in detail to address new problems or concerns.  See
   4272      `http://www.gnu.org/copyleft/'.
   4273 
   4274      Each version of the License is given a distinguishing version
   4275      number.  If the Document specifies that a particular numbered
   4276      version of this License "or any later version" applies to it, you
   4277      have the option of following the terms and conditions either of
   4278      that specified version or of any later version that has been
   4279      published (not as a draft) by the Free Software Foundation.  If
   4280      the Document does not specify a version number of this License,
   4281      you may choose any version ever published (not as a draft) by the
   4282      Free Software Foundation.  If the Document specifies that a proxy
   4283      can decide which future versions of this License can be used, that
   4284      proxy's public statement of acceptance of a version permanently
   4285      authorizes you to choose that version for the Document.
   4286 
   4287  11. RELICENSING
   4288 
   4289      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
   4290      World Wide Web server that publishes copyrightable works and also
   4291      provides prominent facilities for anybody to edit those works.  A
   4292      public wiki that anybody can edit is an example of such a server.
   4293      A "Massive Multiauthor Collaboration" (or "MMC") contained in the
   4294      site means any set of copyrightable works thus published on the MMC
   4295      site.
   4296 
   4297      "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
   4298      license published by Creative Commons Corporation, a not-for-profit
   4299      corporation with a principal place of business in San Francisco,
   4300      California, as well as future copyleft versions of that license
   4301      published by that same organization.
   4302 
   4303      "Incorporate" means to publish or republish a Document, in whole or
   4304      in part, as part of another Document.
   4305 
   4306      An MMC is "eligible for relicensing" if it is licensed under this
   4307      License, and if all works that were first published under this
   4308      License somewhere other than this MMC, and subsequently
   4309      incorporated in whole or in part into the MMC, (1) had no cover
   4310      texts or invariant sections, and (2) were thus incorporated prior
   4311      to November 1, 2008.
   4312 
   4313      The operator of an MMC Site may republish an MMC contained in the
   4314      site under CC-BY-SA on the same site at any time before August 1,
   4315      2009, provided the MMC is eligible for relicensing.
   4316 
   4317 
   4318 ADDENDUM: How to use this License for your documents
   4319 ====================================================
   4320 
   4321 To use this License in a document you have written, include a copy of
   4322 the License in the document and put the following copyright and license
   4323 notices just after the title page:
   4324 
   4325        Copyright (C)  YEAR  YOUR NAME.
   4326        Permission is granted to copy, distribute and/or modify this document
   4327        under the terms of the GNU Free Documentation License, Version 1.3
   4328        or any later version published by the Free Software Foundation;
   4329        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
   4330        Texts.  A copy of the license is included in the section entitled ``GNU
   4331        Free Documentation License''.
   4332 
   4333    If you have Invariant Sections, Front-Cover Texts and Back-Cover
   4334 Texts, replace the "with...Texts." line with this:
   4335 
   4336          with the Invariant Sections being LIST THEIR TITLES, with
   4337          the Front-Cover Texts being LIST, and with the Back-Cover Texts
   4338          being LIST.
   4339 
   4340    If you have Invariant Sections without Cover Texts, or some other
   4341 combination of the three, merge those two alternatives to suit the
   4342 situation.
   4343 
   4344    If your document contains nontrivial examples of program code, we
   4345 recommend releasing these examples in parallel under your choice of
   4346 free software license, such as the GNU General Public License, to
   4347 permit their use in free software.
   4348 
   4349 
   4350 File: libgomp.info,  Node: Funding,  Next: Library Index,  Prev: GNU Free Documentation License,  Up: Top
   4351 
   4352 Funding Free Software
   4353 *********************
   4354 
   4355 If you want to have more free software a few years from now, it makes
   4356 sense for you to help encourage people to contribute funds for its
   4357 development.  The most effective approach known is to encourage
   4358 commercial redistributors to donate.
   4359 
   4360    Users of free software systems can boost the pace of development by
   4361 encouraging for-a-fee distributors to donate part of their selling price
   4362 to free software developers--the Free Software Foundation, and others.
   4363 
   4364    The way to convince distributors to do this is to demand it and
   4365 expect it from them.  So when you compare distributors, judge them
   4366 partly by how much they give to free software development.  Show
   4367 distributors they must compete to be the one who gives the most.
   4368 
   4369    To make this approach work, you must insist on numbers that you can
   4370 compare, such as, "We will donate ten dollars to the Frobnitz project
   4371 for each disk sold."  Don't be satisfied with a vague promise, such as
   4372 "A portion of the profits are donated," since it doesn't give a basis
   4373 for comparison.
   4374 
   4375    Even a precise fraction "of the profits from this disk" is not very
   4376 meaningful, since creative accounting and unrelated business decisions
   4377 can greatly alter what fraction of the sales price counts as profit.
   4378 If the price you pay is $50, ten percent of the profit is probably less
   4379 than a dollar; it might be a few cents, or nothing at all.
   4380 
   4381    Some redistributors do development work themselves.  This is useful
   4382 too; but to keep everyone honest, you need to inquire how much they do,
   4383 and what kind.  Some kinds of development make much more long-term
   4384 difference than others.  For example, maintaining a separate version of
   4385 a program contributes very little; maintaining the standard version of a
   4386 program for the whole community contributes much.  Easy new ports
   4387 contribute little, since someone else would surely do them; difficult
   4388 ports such as adding a new CPU to the GNU Compiler Collection
   4389 contribute more; major new features or packages contribute the most.
   4390 
   4391    By establishing the idea that supporting further development is "the
   4392 proper thing to do" when distributing free software for a fee, we can
   4393 assure a steady flow of resources into making more free software.
   4394 
   4395      Copyright (C) 1994 Free Software Foundation, Inc.
   4396      Verbatim copying and redistribution of this section is permitted
   4397      without royalty; alteration is not permitted.
   4398 
   4399 
   4400 File: libgomp.info,  Node: Library Index,  Prev: Funding,  Up: Top
   4401 
   4402 Library Index
   4403 *************
   4404 
   4405 [index]
   4406 * Menu:
   4407 
   4408 * Environment Variable <1>:              GOMP_RTEMS_THREAD_POOLS.
   4409                                                                 (line 6)
   4410 * Environment Variable <2>:              GOMP_SPINCOUNT.        (line 6)
   4411 * Environment Variable <3>:              GOMP_STACKSIZE.        (line 6)
   4412 * Environment Variable <4>:              GOMP_DEBUG.            (line 6)
   4413 * Environment Variable <5>:              GOMP_CPU_AFFINITY.     (line 6)
   4414 * Environment Variable <6>:              OMP_WAIT_POLICY.       (line 6)
   4415 * Environment Variable <7>:              OMP_THREAD_LIMIT.      (line 6)
   4416 * Environment Variable <8>:              OMP_SCHEDULE.          (line 6)
   4417 * Environment Variable <9>:              OMP_STACKSIZE.         (line 6)
   4418 * Environment Variable <10>:             OMP_PLACES.            (line 6)
   4419 * Environment Variable <11>:             OMP_PROC_BIND.         (line 6)
   4420 * Environment Variable <12>:             OMP_NUM_THREADS.       (line 6)
   4421 * Environment Variable <13>:             OMP_NESTED.            (line 6)
   4422 * Environment Variable <14>:             OMP_MAX_TASK_PRIORITY. (line 6)
   4423 * Environment Variable <15>:             OMP_MAX_ACTIVE_LEVELS. (line 6)
   4424 * Environment Variable <16>:             OMP_DYNAMIC.           (line 6)
   4425 * Environment Variable <17>:             OMP_DEFAULT_DEVICE.    (line 6)
   4426 * Environment Variable <18>:             OMP_DISPLAY_ENV.       (line 6)
   4427 * Environment Variable:                  OMP_CANCELLATION.      (line 6)
   4428 * FDL, GNU Free Documentation License:   GNU Free Documentation License.
   4429                                                                 (line 6)
   4430 * Implementation specific setting <1>:   GOMP_RTEMS_THREAD_POOLS.
   4431                                                                 (line 6)
   4432 * Implementation specific setting <2>:   GOMP_SPINCOUNT.        (line 6)
   4433 * Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
   4434 * Implementation specific setting <4>:   OMP_SCHEDULE.          (line 6)
   4435 * Implementation specific setting <5>:   OMP_NUM_THREADS.       (line 6)
   4436 * Implementation specific setting:       OMP_NESTED.            (line 6)
   4437 * Introduction:                          Top.                   (line 6)
   4438 
   4439 
   4440 
   4441 Tag Table:
   4442 Node: Top2130
   4443 Node: Enabling OpenMP4536
   4444 Node: Runtime Library Routines5323
   4445 Node: omp_get_active_level8386
   4446 Node: omp_get_ancestor_thread_num9084
   4447 Node: omp_get_cancellation10011
   4448 Node: omp_get_default_device10823
   4449 Node: omp_get_dynamic11497
   4450 Node: omp_get_level12370
   4451 Node: omp_get_max_active_levels12988
   4452 Node: omp_get_max_task_priority13691
   4453 Node: omp_get_max_threads14309
   4454 Node: omp_get_nested15064
   4455 Node: omp_get_num_devices15976
   4456 Node: omp_get_num_procs16495
   4457 Node: omp_get_num_teams17032
   4458 Node: omp_get_num_threads17546
   4459 Node: omp_get_proc_bind18633
   4460 Node: omp_get_schedule19551
   4461 Node: omp_get_team_num20500
   4462 Node: omp_get_team_size20997
   4463 Node: omp_get_thread_limit21954
   4464 Node: omp_get_thread_num22571
   4465 Node: omp_in_parallel23440
   4466 Node: omp_in_final24087
   4467 Node: omp_is_initial_device24759
   4468 Node: omp_set_default_device25450
   4469 Node: omp_set_dynamic26238
   4470 Node: omp_set_max_active_levels27121
   4471 Node: omp_set_nested27895
   4472 Node: omp_set_num_threads28784
   4473 Node: omp_set_schedule29649
   4474 Node: omp_init_lock30725
   4475 Node: omp_set_lock31375
   4476 Node: omp_test_lock32227
   4477 Node: omp_unset_lock33200
   4478 Node: omp_destroy_lock34128
   4479 Node: omp_init_nest_lock34802
   4480 Node: omp_set_nest_lock35534
   4481 Node: omp_test_nest_lock36451
   4482 Node: omp_unset_nest_lock37481
   4483 Node: omp_destroy_nest_lock38493
   4484 Node: omp_get_wtick39241
   4485 Node: omp_get_wtime39831
   4486 Node: Environment Variables40605
   4487 Node: OMP_CANCELLATION42160
   4488 Node: OMP_DISPLAY_ENV42693
   4489 Node: OMP_DEFAULT_DEVICE43396
   4490 Node: OMP_DYNAMIC44176
   4491 Node: OMP_MAX_ACTIVE_LEVELS44772
   4492 Node: OMP_MAX_TASK_PRIORITY45422
   4493 Node: OMP_NESTED46082
   4494 Node: OMP_NUM_THREADS46687
   4495 Node: OMP_PROC_BIND47376
   4496 Node: OMP_PLACES48568
   4497 Node: OMP_STACKSIZE50745
   4498 Node: OMP_SCHEDULE51569
   4499 Node: OMP_THREAD_LIMIT52267
   4500 Node: OMP_WAIT_POLICY52867
   4501 Node: GOMP_CPU_AFFINITY53559
   4502 Node: GOMP_DEBUG55290
   4503 Node: GOMP_STACKSIZE55797
   4504 Node: GOMP_SPINCOUNT56626
   4505 Node: GOMP_RTEMS_THREAD_POOLS57835
   4506 Node: Enabling OpenACC60016
   4507 Node: OpenACC Runtime Library Routines61010
   4508 Node: acc_get_num_devices64804
   4509 Node: acc_set_device_type65527
   4510 Node: acc_get_device_type66288
   4511 Node: acc_set_device_num67000
   4512 Node: acc_get_device_num67799
   4513 Node: acc_async_test68592
   4514 Node: acc_async_test_all69577
   4515 Node: acc_wait70472
   4516 Node: acc_wait_all71104
   4517 Node: acc_wait_all_async71681
   4518 Node: acc_wait_async72430
   4519 Node: acc_init73134
   4520 Node: acc_shutdown73777
   4521 Node: acc_on_device74442
   4522 Node: acc_malloc75440
   4523 Node: acc_free75937
   4524 Node: acc_copyin76363
   4525 Node: acc_present_or_copyin77464
   4526 Node: acc_create79074
   4527 Node: acc_present_or_create80220
   4528 Node: acc_copyout81838
   4529 Node: acc_delete82853
   4530 Node: acc_update_device83820
   4531 Node: acc_update_self84924
   4532 Node: acc_map_data86020
   4533 Node: acc_unmap_data86703
   4534 Node: acc_deviceptr87222
   4535 Node: acc_hostptr87791
   4536 Node: acc_is_present88354
   4537 Node: acc_memcpy_to_device89868
   4538 Node: acc_memcpy_from_device90529
   4539 Node: acc_get_current_cuda_device91211
   4540 Node: acc_get_current_cuda_context91806
   4541 Node: acc_get_cuda_stream92398
   4542 Node: acc_set_cuda_stream92952
   4543 Node: OpenACC Environment Variables93483
   4544 Node: ACC_DEVICE_TYPE93942
   4545 Node: ACC_DEVICE_NUM94178
   4546 Node: GCC_ACC_NOTIFY94435
   4547 Node: CUDA Streams Usage94658
   4548 Ref: CUDA Streams Usage-Footnote-196558
   4549 Node: OpenACC Library Interoperability96667
   4550 Ref: OpenACC Library Interoperability-Footnote-1103013
   4551 Ref: OpenACC Library Interoperability-Footnote-2103265
   4552 Node: The libgomp ABI103473
   4553 Node: Implementing MASTER construct104329
   4554 Node: Implementing CRITICAL construct104743
   4555 Node: Implementing ATOMIC construct105482
   4556 Node: Implementing FLUSH construct105963
   4557 Node: Implementing BARRIER construct106234
   4558 Node: Implementing THREADPRIVATE construct106503
   4559 Node: Implementing PRIVATE clause107155
   4560 Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses107736
   4561 Node: Implementing REDUCTION clause109060
   4562 Node: Implementing PARALLEL construct109617
   4563 Node: Implementing FOR construct110874
   4564 Node: Implementing ORDERED construct112872
   4565 Node: Implementing SECTIONS construct113178
   4566 Node: Implementing SINGLE construct113944
   4567 Node: Implementing OpenACC's PARALLEL construct114656
   4568 Node: Reporting Bugs114914
   4569 Node: Copying115276
   4570 Node: GNU Free Documentation License152841
   4571 Node: Funding177983
   4572 Node: Library Index180508
   4573 
   4574 End Tag Table
   4575