remove unused files
[platform/upstream/gcc48.git] / libgomp / libgomp.info
1 This is libgomp.info, produced by makeinfo version 5.1 from
2 libgomp.texi.
3
4 Copyright (C) 2006-2013 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 funds
22 for GNU development.
23 INFO-DIR-SECTION GNU Libraries
24 START-INFO-DIR-ENTRY
25 * libgomp: (libgomp).                    GNU OpenMP runtime library
26 END-INFO-DIR-ENTRY
27
28    This manual documents the GNU implementation of the OpenMP API for
29 multi-platform shared-memory parallel programming in C/C++ and Fortran.
30
31    Published by the Free Software Foundation 51 Franklin Street, Fifth
32 Floor Boston, MA 02110-1301 USA
33
34    Copyright (C) 2006-2013 Free Software Foundation, Inc.
35
36    Permission is granted to copy, distribute and/or modify this document
37 under the terms of the GNU Free Documentation License, Version 1.3 or
38 any later version published by the Free Software Foundation; with the
39 Invariant Sections being "Funding Free Software", the Front-Cover texts
40 being (a) (see below), and with the Back-Cover Texts being (b) (see
41 below).  A copy of the license is included in the section entitled "GNU
42 Free Documentation License".
43
44    (a) The FSF's Front-Cover Text is:
45
46    A GNU Manual
47
48    (b) The FSF's Back-Cover Text is:
49
50    You have freedom to copy and modify this GNU Manual, like GNU
51 software.  Copies published by the Free Software Foundation raise funds
52 for GNU development.
53
54 \1f
55 File: libgomp.info,  Node: Top,  Next: Enabling OpenMP,  Up: (dir)
56
57 Introduction
58 ************
59
60 This manual documents the usage of libgomp, the GNU implementation of
61 the OpenMP (http://www.openmp.org) Application Programming Interface
62 (API) for multi-platform shared-memory parallel programming in C/C++ and
63 Fortran.
64
65 * Menu:
66
67 * Enabling OpenMP::            How to enable OpenMP for your applications.
68 * Runtime Library Routines::   The OpenMP runtime application programming
69                                interface.
70 * Environment Variables::      Influencing runtime behavior with environment
71                                variables.
72 * The libgomp ABI::            Notes on the external ABI presented by libgomp.
73 * Reporting Bugs::             How to report bugs in GNU OpenMP.
74 * Copying::                    GNU general public license says
75                                how you can copy and share libgomp.
76 * GNU Free Documentation License::
77                                How you can copy and share this manual.
78 * Funding::                    How to help assure continued work for free
79                                software.
80 * Library Index::              Index of this documentation.
81
82 \1f
83 File: libgomp.info,  Node: Enabling OpenMP,  Next: Runtime Library Routines,  Prev: Top,  Up: Top
84
85 1 Enabling OpenMP
86 *****************
87
88 To activate the OpenMP extensions for C/C++ and Fortran, the
89 compile-time flag '-fopenmp' must be specified.  This enables the OpenMP
90 directive '#pragma omp' in C/C++ and '!$omp' directives in free form,
91 'c$omp', '*$omp' and '!$omp' directives in fixed form, '!$' conditional
92 compilation sentinels in free form and 'c$', '*$' and '!$' sentinels in
93 fixed form, for Fortran.  The flag also arranges for automatic linking
94 of the OpenMP runtime library (*note Runtime Library Routines::).
95
96    A complete description of all OpenMP directives accepted may be found
97 in the OpenMP Application Program Interface (http://www.openmp.org)
98 manual, version 3.1.
99
100 \1f
101 File: libgomp.info,  Node: Runtime Library Routines,  Next: Environment Variables,  Prev: Enabling OpenMP,  Up: Top
102
103 2 Runtime Library Routines
104 **************************
105
106 The runtime routines described here are defined by section 3 of the
107 OpenMP specifications in version 3.1.  The routines are structured in
108 following three parts:
109
110    Control threads, processors and the parallel environment.
111
112 * Menu:
113
114 * omp_get_active_level::        Number of active parallel regions
115 * omp_get_ancestor_thread_num:: Ancestor thread ID
116 * omp_get_dynamic::             Dynamic teams setting
117 * omp_get_level::               Number of parallel regions
118 * omp_get_max_active_levels::   Maximum number of active regions
119 * omp_get_max_threads::         Maximum number of threads of parallel region
120 * omp_get_nested::              Nested parallel regions
121 * omp_get_num_procs::           Number of processors online
122 * omp_get_num_threads::         Size of the active team
123 * omp_get_schedule::            Obtain the runtime scheduling method
124 * omp_get_team_size::           Number of threads in a team
125 * omp_get_thread_limit::        Maximum number of threads
126 * omp_get_thread_num::          Current thread ID
127 * omp_in_parallel::             Whether a parallel region is active
128 * omp_in_final::                Whether in final or included task region
129 * omp_set_dynamic::             Enable/disable dynamic teams
130 * omp_set_max_active_levels::   Limits the number of active parallel regions
131 * omp_set_nested::              Enable/disable nested parallel regions
132 * omp_set_num_threads::         Set upper team size limit
133 * omp_set_schedule::            Set the runtime scheduling method
134
135    Initialize, set, test, unset and destroy simple and nested locks.
136
137 * Menu:
138
139 * omp_init_lock::            Initialize simple lock
140 * omp_set_lock::             Wait for and set simple lock
141 * omp_test_lock::            Test and set simple lock if available
142 * omp_unset_lock::           Unset simple lock
143 * omp_destroy_lock::         Destroy simple lock
144 * omp_init_nest_lock::       Initialize nested lock
145 * omp_set_nest_lock::        Wait for and set simple lock
146 * omp_test_nest_lock::       Test and set nested lock if available
147 * omp_unset_nest_lock::      Unset nested lock
148 * omp_destroy_nest_lock::    Destroy nested lock
149
150    Portable, thread-based, wall clock timer.
151
152 * Menu:
153
154 * omp_get_wtick::            Get timer precision.
155 * omp_get_wtime::            Elapsed wall clock time.
156
157 \1f
158 File: libgomp.info,  Node: omp_get_active_level,  Next: omp_get_ancestor_thread_num,  Up: Runtime Library Routines
159
160 2.1 'omp_get_active_level' - Number of parallel regions
161 =======================================================
162
163 _Description_:
164      This function returns the nesting level for the active parallel
165      blocks, which enclose the calling call.
166
167 _C/C++_
168      _Prototype_:   'int omp_get_active_level(void);'
169
170 _Fortran_:
171      _Interface_:   'integer function omp_get_active_level()'
172
173 _See also_:
174      *note omp_get_level::, *note omp_get_max_active_levels::, *note
175      omp_set_max_active_levels::
176
177 _Reference_:
178      OpenMP specifications v3.1 (http://www.openmp.org/), section
179      3.2.19.
180
181 \1f
182 File: libgomp.info,  Node: omp_get_ancestor_thread_num,  Next: omp_get_dynamic,  Prev: omp_get_active_level,  Up: Runtime Library Routines
183
184 2.2 'omp_get_ancestor_thread_num' - Ancestor thread ID
185 ======================================================
186
187 _Description_:
188      This function returns the thread identification number for the
189      given nesting level of the current thread.  For values of LEVEL
190      outside zero to 'omp_get_level' -1 is returned; if LEVEL is
191      'omp_get_level' the result is identical to 'omp_get_thread_num'.
192
193 _C/C++_
194      _Prototype_:   'int omp_get_ancestor_thread_num(int level);'
195
196 _Fortran_:
197      _Interface_:   'integer function omp_get_ancestor_thread_num(level)'
198                     'integer level'
199
200 _See also_:
201      *note omp_get_level::, *note omp_get_thread_num::, *note
202      omp_get_team_size::
203
204 _Reference_:
205      OpenMP specifications v3.1 (http://www.openmp.org/), section
206      3.2.17.
207
208 \1f
209 File: libgomp.info,  Node: omp_get_dynamic,  Next: omp_get_level,  Prev: omp_get_ancestor_thread_num,  Up: Runtime Library Routines
210
211 2.3 'omp_get_dynamic' - Dynamic teams setting
212 =============================================
213
214 _Description_:
215      This function returns 'true' if enabled, 'false' otherwise.  Here,
216      'true' and 'false' represent their language-specific counterparts.
217
218      The dynamic team setting may be initialized at startup by the
219      'OMP_DYNAMIC' environment variable or at runtime using
220      'omp_set_dynamic'.  If undefined, dynamic adjustment is disabled by
221      default.
222
223 _C/C++_:
224      _Prototype_:   'int omp_get_dynamic(void);'
225
226 _Fortran_:
227      _Interface_:   'logical function omp_get_dynamic()'
228
229 _See also_:
230      *note omp_set_dynamic::, *note OMP_DYNAMIC::
231
232 _Reference_:
233      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.8.
234
235 \1f
236 File: libgomp.info,  Node: omp_get_level,  Next: omp_get_max_active_levels,  Prev: omp_get_dynamic,  Up: Runtime Library Routines
237
238 2.4 'omp_get_level' - Obtain the current nesting level
239 ======================================================
240
241 _Description_:
242      This function returns the nesting level for the parallel blocks,
243      which enclose the calling call.
244
245 _C/C++_
246      _Prototype_:   'int omp_get_level(void);'
247
248 _Fortran_:
249      _Interface_:   'integer function omp_level()'
250
251 _See also_:
252      *note omp_get_active_level::
253
254 _Reference_:
255      OpenMP specifications v3.1 (http://www.openmp.org/), section
256      3.2.16.
257
258 \1f
259 File: libgomp.info,  Node: omp_get_max_active_levels,  Next: omp_get_max_threads,  Prev: omp_get_level,  Up: Runtime Library Routines
260
261 2.5 'omp_get_max_active_levels' - Maximum number of active regions
262 ==================================================================
263
264 _Description_:
265      This function obtains the maximum allowed number of nested, active
266      parallel regions.
267
268 _C/C++_
269      _Prototype_:   'int omp_get_max_active_levels(void);'
270
271 _Fortran_:
272      _Interface_:   'integer function omp_get_max_active_levels()'
273
274 _See also_:
275      *note omp_set_max_active_levels::, *note omp_get_active_level::
276
277 _Reference_:
278      OpenMP specifications v3.1 (http://www.openmp.org/), section
279      3.2.15.
280
281 \1f
282 File: libgomp.info,  Node: omp_get_max_threads,  Next: omp_get_nested,  Prev: omp_get_max_active_levels,  Up: Runtime Library Routines
283
284 2.6 'omp_get_max_threads' - Maximum number of threads of parallel region
285 ========================================================================
286
287 _Description_:
288      Return the maximum number of threads used for the current parallel
289      region that does not use the clause 'num_threads'.
290
291 _C/C++_:
292      _Prototype_:   'int omp_get_max_threads(void);'
293
294 _Fortran_:
295      _Interface_:   'integer function omp_get_max_threads()'
296
297 _See also_:
298      *note omp_set_num_threads::, *note omp_set_dynamic::, *note
299      omp_get_thread_limit::
300
301 _Reference_:
302      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.3.
303
304 \1f
305 File: libgomp.info,  Node: omp_get_nested,  Next: omp_get_num_procs,  Prev: omp_get_max_threads,  Up: Runtime Library Routines
306
307 2.7 'omp_get_nested' - Nested parallel regions
308 ==============================================
309
310 _Description_:
311      This function returns 'true' if nested parallel regions are
312      enabled, 'false' otherwise.  Here, 'true' and 'false' represent
313      their language-specific counterparts.
314
315      Nested parallel regions may be initialized at startup by the
316      'OMP_NESTED' environment variable or at runtime using
317      'omp_set_nested'.  If undefined, nested parallel regions are
318      disabled by default.
319
320 _C/C++_:
321      _Prototype_:   'int omp_get_nested(void);'
322
323 _Fortran_:
324      _Interface_:   'logical function omp_get_nested()'
325
326 _See also_:
327      *note omp_set_nested::, *note OMP_NESTED::
328
329 _Reference_:
330      OpenMP specifications v3.1 (http://www.openmp.org/), section
331      3.2.10.
332
333 \1f
334 File: libgomp.info,  Node: omp_get_num_procs,  Next: omp_get_num_threads,  Prev: omp_get_nested,  Up: Runtime Library Routines
335
336 2.8 'omp_get_num_procs' - Number of processors online
337 =====================================================
338
339 _Description_:
340      Returns the number of processors online.
341
342 _C/C++_:
343      _Prototype_:   'int omp_get_num_procs(void);'
344
345 _Fortran_:
346      _Interface_:   'integer function omp_get_num_procs()'
347
348 _Reference_:
349      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.5.
350
351 \1f
352 File: libgomp.info,  Node: omp_get_num_threads,  Next: omp_get_schedule,  Prev: omp_get_num_procs,  Up: Runtime Library Routines
353
354 2.9 'omp_get_num_threads' - Size of the active team
355 ===================================================
356
357 _Description_:
358      Returns the number of threads in the current team.  In a sequential
359      section of the program 'omp_get_num_threads' returns 1.
360
361      The default team size may be initialized at startup by the
362      'OMP_NUM_THREADS' environment variable.  At runtime, the size of
363      the current team may be set either by the 'NUM_THREADS' clause or
364      by 'omp_set_num_threads'.  If none of the above were used to define
365      a specific value and 'OMP_DYNAMIC' is disabled, one thread per CPU
366      online is used.
367
368 _C/C++_:
369      _Prototype_:   'int omp_get_num_threads(void);'
370
371 _Fortran_:
372      _Interface_:   'integer function omp_get_num_threads()'
373
374 _See also_:
375      *note omp_get_max_threads::, *note omp_set_num_threads::, *note
376      OMP_NUM_THREADS::
377
378 _Reference_:
379      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.2.
380
381 \1f
382 File: libgomp.info,  Node: omp_get_schedule,  Next: omp_get_team_size,  Prev: omp_get_num_threads,  Up: Runtime Library Routines
383
384 2.10 'omp_get_schedule' - Obtain the runtime scheduling method
385 ==============================================================
386
387 _Description_:
388      Obtain the runtime scheduling method.  The KIND argument will be
389      set to the value 'omp_sched_static', 'omp_sched_dynamic',
390      'omp_sched_guided' or 'omp_sched_auto'.  The second argument,
391      MODIFIER, is set to the chunk size.
392
393 _C/C++_
394      _Prototype_:   'void omp_schedule(omp_sched_t *kind, int *modifier);'
395
396 _Fortran_:
397      _Interface_:   'subroutine omp_schedule(kind, modifier)'
398                     'integer(kind=omp_sched_kind) kind'
399                     'integer modifier'
400
401 _See also_:
402      *note omp_set_schedule::, *note OMP_SCHEDULE::
403
404 _Reference_:
405      OpenMP specifications v3.1 (http://www.openmp.org/), section
406      3.2.12.
407
408 \1f
409 File: libgomp.info,  Node: omp_get_team_size,  Next: omp_get_thread_limit,  Prev: omp_get_schedule,  Up: Runtime Library Routines
410
411 2.11 'omp_get_team_size' - Number of threads in a team
412 ======================================================
413
414 _Description_:
415      This function returns the number of threads in a thread team to
416      which either the current thread or its ancestor belongs.  For
417      values of LEVEL outside zero to 'omp_get_level', -1 is returned; if
418      LEVEL is zero, 1 is returned, and for 'omp_get_level', the result
419      is identical to 'omp_get_num_threads'.
420
421 _C/C++_:
422      _Prototype_:   'int omp_get_team_size(int level);'
423
424 _Fortran_:
425      _Interface_:   'integer function omp_get_team_size(level)'
426                     'integer level'
427
428 _See also_:
429      *note omp_get_num_threads::, *note omp_get_level::, *note
430      omp_get_ancestor_thread_num::
431
432 _Reference_:
433      OpenMP specifications v3.1 (http://www.openmp.org/), section
434      3.2.18.
435
436 \1f
437 File: libgomp.info,  Node: omp_get_thread_limit,  Next: omp_get_thread_num,  Prev: omp_get_team_size,  Up: Runtime Library Routines
438
439 2.12 'omp_get_thread_limit' - Maximum number of threads
440 =======================================================
441
442 _Description_:
443      Return the maximum number of threads of the program.
444
445 _C/C++_:
446      _Prototype_:   'int omp_get_thread_limit(void);'
447
448 _Fortran_:
449      _Interface_:   'integer function omp_get_thread_limit()'
450
451 _See also_:
452      *note omp_get_max_threads::, *note OMP_THREAD_LIMIT::
453
454 _Reference_:
455      OpenMP specifications v3.1 (http://www.openmp.org/), section
456      3.2.13.
457
458 \1f
459 File: libgomp.info,  Node: omp_get_thread_num,  Next: omp_in_parallel,  Prev: omp_get_thread_limit,  Up: Runtime Library Routines
460
461 2.13 'omp_get_thread_num' - Current thread ID
462 =============================================
463
464 _Description_:
465      Returns a unique thread identification number within the current
466      team.  In a sequential parts of the program, 'omp_get_thread_num'
467      always returns 0.  In parallel regions the return value varies from
468      0 to 'omp_get_num_threads'-1 inclusive.  The return value of the
469      master thread of a team is always 0.
470
471 _C/C++_:
472      _Prototype_:   'int omp_get_thread_num(void);'
473
474 _Fortran_:
475      _Interface_:   'integer function omp_get_thread_num()'
476
477 _See also_:
478      *note omp_get_num_threads::, *note omp_get_ancestor_thread_num::
479
480 _Reference_:
481      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.4.
482
483 \1f
484 File: libgomp.info,  Node: omp_in_parallel,  Next: omp_in_final,  Prev: omp_get_thread_num,  Up: Runtime Library Routines
485
486 2.14 'omp_in_parallel' - Whether a parallel region is active
487 ============================================================
488
489 _Description_:
490      This function returns 'true' if currently running in parallel,
491      'false' otherwise.  Here, 'true' and 'false' represent their
492      language-specific counterparts.
493
494 _C/C++_:
495      _Prototype_:   'int omp_in_parallel(void);'
496
497 _Fortran_:
498      _Interface_:   'logical function omp_in_parallel()'
499
500 _Reference_:
501      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.6.
502
503 \1f
504 File: libgomp.info,  Node: omp_in_final,  Next: omp_set_dynamic,  Prev: omp_in_parallel,  Up: Runtime Library Routines
505
506 2.15 'omp_in_final' - Whether in final or included task region
507 ==============================================================
508
509 _Description_:
510      This function returns 'true' if currently running in a final or
511      included task region, 'false' otherwise.  Here, 'true' and 'false'
512      represent their language-specific counterparts.
513
514 _C/C++_:
515      _Prototype_:   'int omp_in_final(void);'
516
517 _Fortran_:
518      _Interface_:   'logical function omp_in_final()'
519
520 _Reference_:
521      OpenMP specifications v3.1 (http://www.openmp.org/), section
522      3.2.20.
523
524 \1f
525 File: libgomp.info,  Node: omp_set_dynamic,  Next: omp_set_max_active_levels,  Prev: omp_in_final,  Up: Runtime Library Routines
526
527 2.16 'omp_set_dynamic' - Enable/disable dynamic teams
528 =====================================================
529
530 _Description_:
531      Enable or disable the dynamic adjustment of the number of threads
532      within a team.  The function takes the language-specific equivalent
533      of 'true' and 'false', where 'true' enables dynamic adjustment of
534      team sizes and 'false' disables it.
535
536 _C/C++_:
537      _Prototype_:   'void omp_set_dynamic(int set);'
538
539 _Fortran_:
540      _Interface_:   'subroutine omp_set_dynamic(set)'
541                     'logical, intent(in) :: set'
542
543 _See also_:
544      *note OMP_DYNAMIC::, *note omp_get_dynamic::
545
546 _Reference_:
547      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.7.
548
549 \1f
550 File: libgomp.info,  Node: omp_set_max_active_levels,  Next: omp_set_nested,  Prev: omp_set_dynamic,  Up: Runtime Library Routines
551
552 2.17 'omp_set_max_active_levels' - Limits the number of active parallel regions
553 ===============================================================================
554
555 _Description_:
556      This function limits the maximum allowed number of nested, active
557      parallel regions.
558
559 _C/C++_
560      _Prototype_:   'void omp_set_max_active_levels(int max_levels);'
561
562 _Fortran_:
563      _Interface_:   'subroutine omp_set_max_active_levels(max_levels)'
564                     'integer max_levels'
565
566 _See also_:
567      *note omp_get_max_active_levels::, *note omp_get_active_level::
568
569 _Reference_:
570      OpenMP specifications v3.1 (http://www.openmp.org/), section
571      3.2.14.
572
573 \1f
574 File: libgomp.info,  Node: omp_set_nested,  Next: omp_set_num_threads,  Prev: omp_set_max_active_levels,  Up: Runtime Library Routines
575
576 2.18 'omp_set_nested' - Enable/disable nested parallel regions
577 ==============================================================
578
579 _Description_:
580      Enable or disable nested parallel regions, i.e., whether team
581      members are allowed to create new teams.  The function takes the
582      language-specific equivalent of 'true' and 'false', where 'true'
583      enables dynamic adjustment of team sizes and 'false' disables it.
584
585 _C/C++_:
586      _Prototype_:   'void omp_set_nested(int set);'
587
588 _Fortran_:
589      _Interface_:   'subroutine omp_set_nested(set)'
590                     'logical, intent(in) :: set'
591
592 _See also_:
593      *note OMP_NESTED::, *note omp_get_nested::
594
595 _Reference_:
596      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.9.
597
598 \1f
599 File: libgomp.info,  Node: omp_set_num_threads,  Next: omp_set_schedule,  Prev: omp_set_nested,  Up: Runtime Library Routines
600
601 2.19 'omp_set_num_threads' - Set upper team size limit
602 ======================================================
603
604 _Description_:
605      Specifies the number of threads used by default in subsequent
606      parallel sections, if those do not specify a 'num_threads' clause.
607      The argument of 'omp_set_num_threads' shall be a positive integer.
608
609 _C/C++_:
610      _Prototype_:   'void omp_set_num_threads(int n);'
611
612 _Fortran_:
613      _Interface_:   'subroutine omp_set_num_threads(n)'
614                     'integer, intent(in) :: n'
615
616 _See also_:
617      *note OMP_NUM_THREADS::, *note omp_get_num_threads::, *note
618      omp_get_max_threads::
619
620 _Reference_:
621      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.2.1.
622
623 \1f
624 File: libgomp.info,  Node: omp_set_schedule,  Next: omp_init_lock,  Prev: omp_set_num_threads,  Up: Runtime Library Routines
625
626 2.20 'omp_set_schedule' - Set the runtime scheduling method
627 ===========================================================
628
629 _Description_:
630      Sets the runtime scheduling method.  The KIND argument can have the
631      value 'omp_sched_static', 'omp_sched_dynamic', 'omp_sched_guided'
632      or 'omp_sched_auto'.  Except for 'omp_sched_auto', the chunk size
633      is set to the value of MODIFIER if positive, or to the default
634      value if zero or negative.  For 'omp_sched_auto' the MODIFIER
635      argument is ignored.
636
637 _C/C++_
638      _Prototype_:   'void omp_set_schedule(omp_sched_t *kind, int
639                     *modifier);'
640
641 _Fortran_:
642      _Interface_:   'subroutine omp_set_schedule(kind, modifier)'
643                     'integer(kind=omp_sched_kind) kind'
644                     'integer modifier'
645
646 _See also_:
647      *note omp_get_schedule:: *note OMP_SCHEDULE::
648
649 _Reference_:
650      OpenMP specifications v3.1 (http://www.openmp.org/), section
651      3.2.11.
652
653 \1f
654 File: libgomp.info,  Node: omp_init_lock,  Next: omp_set_lock,  Prev: omp_set_schedule,  Up: Runtime Library Routines
655
656 2.21 'omp_init_lock' - Initialize simple lock
657 =============================================
658
659 _Description_:
660      Initialize a simple lock.  After initialization, the lock is in an
661      unlocked state.
662
663 _C/C++_:
664      _Prototype_:   'void omp_init_lock(omp_lock_t *lock);'
665
666 _Fortran_:
667      _Interface_:   'subroutine omp_init_lock(lock)'
668                     'integer(omp_lock_kind), intent(out) :: lock'
669
670 _See also_:
671      *note omp_destroy_lock::
672
673 _Reference_:
674      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
675
676 \1f
677 File: libgomp.info,  Node: omp_set_lock,  Next: omp_test_lock,  Prev: omp_init_lock,  Up: Runtime Library Routines
678
679 2.22 'omp_set_lock' - Wait for and set simple lock
680 ==================================================
681
682 _Description_:
683      Before setting a simple lock, the lock variable must be initialized
684      by 'omp_init_lock'.  The calling thread is blocked until the lock
685      is available.  If the lock is already held by the current thread, a
686      deadlock occurs.
687
688 _C/C++_:
689      _Prototype_:   'void omp_set_lock(omp_lock_t *lock);'
690
691 _Fortran_:
692      _Interface_:   'subroutine omp_set_lock(lock)'
693                     'integer(omp_lock_kind), intent(inout) :: lock'
694
695 _See also_:
696      *note omp_init_lock::, *note omp_test_lock::, *note
697      omp_unset_lock::
698
699 _Reference_:
700      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
701
702 \1f
703 File: libgomp.info,  Node: omp_test_lock,  Next: omp_unset_lock,  Prev: omp_set_lock,  Up: Runtime Library Routines
704
705 2.23 'omp_test_lock' - Test and set simple lock if available
706 ============================================================
707
708 _Description_:
709      Before setting a simple lock, the lock variable must be initialized
710      by 'omp_init_lock'.  Contrary to 'omp_set_lock', 'omp_test_lock'
711      does not block if the lock is not available.  This function returns
712      'true' upon success, 'false' otherwise.  Here, 'true' and 'false'
713      represent their language-specific counterparts.
714
715 _C/C++_:
716      _Prototype_:   'int omp_test_lock(omp_lock_t *lock);'
717
718 _Fortran_:
719      _Interface_:   'logical function omp_test_lock(lock)'
720                     'integer(omp_lock_kind), intent(inout) :: lock'
721
722 _See also_:
723      *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::
724
725 _Reference_:
726      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
727
728 \1f
729 File: libgomp.info,  Node: omp_unset_lock,  Next: omp_destroy_lock,  Prev: omp_test_lock,  Up: Runtime Library Routines
730
731 2.24 'omp_unset_lock' - Unset simple lock
732 =========================================
733
734 _Description_:
735      A simple lock about to be unset must have been locked by
736      'omp_set_lock' or 'omp_test_lock' before.  In addition, the lock
737      must be held by the thread calling 'omp_unset_lock'.  Then, the
738      lock becomes unlocked.  If one or more threads attempted to set the
739      lock before, one of them is chosen to, again, set the lock to
740      itself.
741
742 _C/C++_:
743      _Prototype_:   'void omp_unset_lock(omp_lock_t *lock);'
744
745 _Fortran_:
746      _Interface_:   'subroutine omp_unset_lock(lock)'
747                     'integer(omp_lock_kind), intent(inout) :: lock'
748
749 _See also_:
750      *note omp_set_lock::, *note omp_test_lock::
751
752 _Reference_:
753      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
754
755 \1f
756 File: libgomp.info,  Node: omp_destroy_lock,  Next: omp_init_nest_lock,  Prev: omp_unset_lock,  Up: Runtime Library Routines
757
758 2.25 'omp_destroy_lock' - Destroy simple lock
759 =============================================
760
761 _Description_:
762      Destroy a simple lock.  In order to be destroyed, a simple lock
763      must be in the unlocked state.
764
765 _C/C++_:
766      _Prototype_:   'void omp_destroy_lock(omp_lock_t *lock);'
767
768 _Fortran_:
769      _Interface_:   'subroutine omp_destroy_lock(lock)'
770                     'integer(omp_lock_kind), intent(inout) :: lock'
771
772 _See also_:
773      *note omp_init_lock::
774
775 _Reference_:
776      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
777
778 \1f
779 File: libgomp.info,  Node: omp_init_nest_lock,  Next: omp_set_nest_lock,  Prev: omp_destroy_lock,  Up: Runtime Library Routines
780
781 2.26 'omp_init_nest_lock' - Initialize nested lock
782 ==================================================
783
784 _Description_:
785      Initialize a nested lock.  After initialization, the lock is in an
786      unlocked state and the nesting count is set to zero.
787
788 _C/C++_:
789      _Prototype_:   'void omp_init_nest_lock(omp_nest_lock_t *lock);'
790
791 _Fortran_:
792      _Interface_:   'subroutine omp_init_nest_lock(lock)'
793                     'integer(omp_nest_lock_kind), intent(out) :: lock'
794
795 _See also_:
796      *note omp_destroy_nest_lock::
797
798 _Reference_:
799      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.1.
800
801 \1f
802 File: libgomp.info,  Node: omp_set_nest_lock,  Next: omp_test_nest_lock,  Prev: omp_init_nest_lock,  Up: Runtime Library Routines
803
804 2.27 'omp_set_nest_lock' - Wait for and set nested lock
805 =======================================================
806
807 _Description_:
808      Before setting a nested lock, the lock variable must be initialized
809      by 'omp_init_nest_lock'.  The calling thread is blocked until the
810      lock is available.  If the lock is already held by the current
811      thread, the nesting count for the lock is incremented.
812
813 _C/C++_:
814      _Prototype_:   'void omp_set_nest_lock(omp_nest_lock_t *lock);'
815
816 _Fortran_:
817      _Interface_:   'subroutine omp_set_nest_lock(lock)'
818                     'integer(omp_nest_lock_kind), intent(inout) :: lock'
819
820 _See also_:
821      *note omp_init_nest_lock::, *note omp_unset_nest_lock::
822
823 _Reference_:
824      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.3.
825
826 \1f
827 File: libgomp.info,  Node: omp_test_nest_lock,  Next: omp_unset_nest_lock,  Prev: omp_set_nest_lock,  Up: Runtime Library Routines
828
829 2.28 'omp_test_nest_lock' - Test and set nested lock if available
830 =================================================================
831
832 _Description_:
833      Before setting a nested lock, the lock variable must be initialized
834      by 'omp_init_nest_lock'.  Contrary to 'omp_set_nest_lock',
835      'omp_test_nest_lock' does not block if the lock is not available.
836      If the lock is already held by the current thread, the new nesting
837      count is returned.  Otherwise, the return value equals zero.
838
839 _C/C++_:
840      _Prototype_:   'int omp_test_nest_lock(omp_nest_lock_t *lock);'
841
842 _Fortran_:
843      _Interface_:   'logical function omp_test_nest_lock(lock)'
844                     'integer(omp_nest_lock_kind), intent(inout) :: lock'
845
846 _See also_:
847      *note omp_init_lock::, *note omp_set_lock::, *note omp_set_lock::
848
849 _Reference_:
850      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.5.
851
852 \1f
853 File: libgomp.info,  Node: omp_unset_nest_lock,  Next: omp_destroy_nest_lock,  Prev: omp_test_nest_lock,  Up: Runtime Library Routines
854
855 2.29 'omp_unset_nest_lock' - Unset nested lock
856 ==============================================
857
858 _Description_:
859      A nested lock about to be unset must have been locked by
860      'omp_set_nested_lock' or 'omp_test_nested_lock' before.  In
861      addition, the lock must be held by the thread calling
862      'omp_unset_nested_lock'.  If the nesting count drops to zero, the
863      lock becomes unlocked.  If one ore more threads attempted to set
864      the lock before, one of them is chosen to, again, set the lock to
865      itself.
866
867 _C/C++_:
868      _Prototype_:   'void omp_unset_nest_lock(omp_nest_lock_t *lock);'
869
870 _Fortran_:
871      _Interface_:   'subroutine omp_unset_nest_lock(lock)'
872                     'integer(omp_nest_lock_kind), intent(inout) :: lock'
873
874 _See also_:
875      *note omp_set_nest_lock::
876
877 _Reference_:
878      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.4.
879
880 \1f
881 File: libgomp.info,  Node: omp_destroy_nest_lock,  Next: omp_get_wtick,  Prev: omp_unset_nest_lock,  Up: Runtime Library Routines
882
883 2.30 'omp_destroy_nest_lock' - Destroy nested lock
884 ==================================================
885
886 _Description_:
887      Destroy a nested lock.  In order to be destroyed, a nested lock
888      must be in the unlocked state and its nesting count must equal
889      zero.
890
891 _C/C++_:
892      _Prototype_:   'void omp_destroy_nest_lock(omp_nest_lock_t *);'
893
894 _Fortran_:
895      _Interface_:   'subroutine omp_destroy_nest_lock(lock)'
896                     'integer(omp_nest_lock_kind), intent(inout) :: lock'
897
898 _See also_:
899      *note omp_init_lock::
900
901 _Reference_:
902      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.3.2.
903
904 \1f
905 File: libgomp.info,  Node: omp_get_wtick,  Next: omp_get_wtime,  Prev: omp_destroy_nest_lock,  Up: Runtime Library Routines
906
907 2.31 'omp_get_wtick' - Get timer precision
908 ==========================================
909
910 _Description_:
911      Gets the timer precision, i.e., the number of seconds between two
912      successive clock ticks.
913
914 _C/C++_:
915      _Prototype_:   'double omp_get_wtick(void);'
916
917 _Fortran_:
918      _Interface_:   'double precision function omp_get_wtick()'
919
920 _See also_:
921      *note omp_get_wtime::
922
923 _Reference_:
924      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.2.
925
926 \1f
927 File: libgomp.info,  Node: omp_get_wtime,  Prev: omp_get_wtick,  Up: Runtime Library Routines
928
929 2.32 'omp_get_wtime' - Elapsed wall clock time
930 ==============================================
931
932 _Description_:
933      Elapsed wall clock time in seconds.  The time is measured per
934      thread, no guarantee can be made that two distinct threads measure
935      the same time.  Time is measured from some "time in the past",
936      which is an arbitrary time guaranteed not to change during the
937      execution of the program.
938
939 _C/C++_:
940      _Prototype_:   'double omp_get_wtime(void);'
941
942 _Fortran_:
943      _Interface_:   'double precision function omp_get_wtime()'
944
945 _See also_:
946      *note omp_get_wtick::
947
948 _Reference_:
949      OpenMP specifications v3.1 (http://www.openmp.org/), section 3.4.1.
950
951 \1f
952 File: libgomp.info,  Node: Environment Variables,  Next: The libgomp ABI,  Prev: Runtime Library Routines,  Up: Top
953
954 3 Environment Variables
955 ***********************
956
957 The variables 'OMP_DYNAMIC', 'OMP_MAX_ACTIVE_LEVELS', 'OMP_NESTED',
958 'OMP_NUM_THREADS', 'OMP_SCHEDULE', 'OMP_STACKSIZE','OMP_THREAD_LIMIT'
959 and 'OMP_WAIT_POLICY' are defined by section 4 of the OpenMP
960 specifications in version 3.1, while 'GOMP_CPU_AFFINITY' and
961 'GOMP_STACKSIZE' are GNU extensions.
962
963 * Menu:
964
965 * OMP_DYNAMIC::           Dynamic adjustment of threads
966 * OMP_MAX_ACTIVE_LEVELS:: Set the maximum number of nested parallel regions
967 * OMP_NESTED::            Nested parallel regions
968 * OMP_NUM_THREADS::       Specifies the number of threads to use
969 * OMP_STACKSIZE::         Set default thread stack size
970 * OMP_SCHEDULE::          How threads are scheduled
971 * OMP_THREAD_LIMIT::      Set the maximum number of threads
972 * OMP_WAIT_POLICY::       How waiting threads are handled
973 * OMP_PROC_BIND::         Whether theads may be moved between CPUs
974 * GOMP_CPU_AFFINITY::     Bind threads to specific CPUs
975 * GOMP_STACKSIZE::        Set default thread stack size
976
977 \1f
978 File: libgomp.info,  Node: OMP_DYNAMIC,  Next: OMP_MAX_ACTIVE_LEVELS,  Up: Environment Variables
979
980 3.1 'OMP_DYNAMIC' - Dynamic adjustment of threads
981 =================================================
982
983 _Description_:
984      Enable or disable the dynamic adjustment of the number of threads
985      within a team.  The value of this environment variable shall be
986      'TRUE' or 'FALSE'.  If undefined, dynamic adjustment is disabled by
987      default.
988
989 _See also_:
990      *note omp_set_dynamic::
991
992 _Reference_:
993      OpenMP specifications v3.1 (http://www.openmp.org/), section 4.3
994
995 \1f
996 File: libgomp.info,  Node: OMP_MAX_ACTIVE_LEVELS,  Next: OMP_NESTED,  Prev: OMP_DYNAMIC,  Up: Environment Variables
997
998 3.2 'OMP_MAX_ACTIVE_LEVELS' - Set the maximum number of nested parallel regions
999 ===============================================================================
1000
1001 _Description_:
1002      Specifies the initial value for the maximum number of nested
1003      parallel regions.  The value of this variable shall be a positive
1004      integer.  If undefined, the number of active levels is unlimited.
1005
1006 _See also_:
1007      *note omp_set_max_active_levels::
1008
1009 _Reference_:
1010      OpenMP specifications v3.1 (http://www.openmp.org/), section 4.8
1011
1012 \1f
1013 File: libgomp.info,  Node: OMP_NESTED,  Next: OMP_NUM_THREADS,  Prev: OMP_MAX_ACTIVE_LEVELS,  Up: Environment Variables
1014
1015 3.3 'OMP_NESTED' - Nested parallel regions
1016 ==========================================
1017
1018 _Description_:
1019      Enable or disable nested parallel regions, i.e., whether team
1020      members are allowed to create new teams.  The value of this
1021      environment variable shall be 'TRUE' or 'FALSE'.  If undefined,
1022      nested parallel regions are disabled by default.
1023
1024 _See also_:
1025      *note omp_set_nested::
1026
1027 _Reference_:
1028      OpenMP specifications v3.1 (http://www.openmp.org/), section 4.5
1029
1030 \1f
1031 File: libgomp.info,  Node: OMP_NUM_THREADS,  Next: OMP_SCHEDULE,  Prev: OMP_NESTED,  Up: Environment Variables
1032
1033 3.4 'OMP_NUM_THREADS' - Specifies the number of threads to use
1034 ==============================================================
1035
1036 _Description_:
1037      Specifies the default number of threads to use in parallel regions.
1038      The value of this variable shall be a comma-separated list of
1039      positive integers; the value specified the number of threads to use
1040      for the corresponding nested level.  If undefined one thread per
1041      CPU is used.
1042
1043 _See also_:
1044      *note omp_set_num_threads::
1045
1046 _Reference_:
1047      OpenMP specifications v3.1 (http://www.openmp.org/), section 4.2
1048
1049 \1f
1050 File: libgomp.info,  Node: OMP_SCHEDULE,  Next: OMP_STACKSIZE,  Prev: OMP_NUM_THREADS,  Up: Environment Variables
1051
1052 3.5 'OMP_SCHEDULE' - How threads are scheduled
1053 ==============================================
1054
1055 _Description_:
1056      Allows to specify 'schedule type' and 'chunk size'.  The value of
1057      the variable shall have the form: 'type[,chunk]' where 'type' is
1058      one of 'static', 'dynamic', 'guided' or 'auto' The optional 'chunk'
1059      size shall be a positive integer.  If undefined, dynamic scheduling
1060      and a chunk size of 1 is used.
1061
1062 _See also_:
1063      *note omp_set_schedule::
1064
1065 _Reference_:
1066      OpenMP specifications v3.1 (http://www.openmp.org/), sections 2.5.1
1067      and 4.1
1068
1069 \1f
1070 File: libgomp.info,  Node: OMP_STACKSIZE,  Next: OMP_THREAD_LIMIT,  Prev: OMP_SCHEDULE,  Up: Environment Variables
1071
1072 3.6 'OMP_STACKSIZE' - Set default thread stack size
1073 ===================================================
1074
1075 _Description_:
1076      Set the default thread stack size in kilobytes, unless the number
1077      is suffixed by 'B', 'K', 'M' or 'G', in which case the size is,
1078      respectively, in bytes, kilobytes, megabytes or gigabytes.  This is
1079      different from 'pthread_attr_setstacksize' which gets the number of
1080      bytes as an argument.  If the stack size cannot be set due to
1081      system constraints, an error is reported and the initial stack size
1082      is left unchanged.  If undefined, the stack size is system
1083      dependent.
1084
1085 _Reference_:
1086      OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.6
1087
1088 \1f
1089 File: libgomp.info,  Node: OMP_THREAD_LIMIT,  Next: OMP_WAIT_POLICY,  Prev: OMP_STACKSIZE,  Up: Environment Variables
1090
1091 3.7 'OMP_THREAD_LIMIT' - Set the maximum number of threads
1092 ==========================================================
1093
1094 _Description_:
1095      Specifies the number of threads to use for the whole program.  The
1096      value of this variable shall be a positive integer.  If undefined,
1097      the number of threads is not limited.
1098
1099 _See also_:
1100      *note OMP_NUM_THREADS:: *note omp_get_thread_limit::
1101
1102 _Reference_:
1103      OpenMP specifications v3.1 (http://www.openmp.org/), section 4.9
1104
1105 \1f
1106 File: libgomp.info,  Node: OMP_WAIT_POLICY,  Next: OMP_PROC_BIND,  Prev: OMP_THREAD_LIMIT,  Up: Environment Variables
1107
1108 3.8 'OMP_WAIT_POLICY' - How waiting threads are handled
1109 =======================================================
1110
1111 _Description_:
1112      Specifies whether waiting threads should be active or passive.  If
1113      the value is 'PASSIVE', waiting threads should not consume CPU
1114      power while waiting; while the value is 'ACTIVE' specifies that
1115      they should.
1116
1117 _Reference_:
1118      OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.7
1119
1120 \1f
1121 File: libgomp.info,  Node: OMP_PROC_BIND,  Next: GOMP_CPU_AFFINITY,  Prev: OMP_WAIT_POLICY,  Up: Environment Variables
1122
1123 3.9 'OMP_PROC_BIND' - Whether theads may be moved between CPUs
1124 ==============================================================
1125
1126 _Description_:
1127      Specifies whether threads may be moved between processors.  If set
1128      to 'true', OpenMP theads should not be moved, if set to 'false'
1129      they may be moved.
1130
1131 _See also_:
1132      *note GOMP_CPU_AFFINITY::
1133
1134 _Reference_:
1135      OpenMP specifications v3.1 (http://www.openmp.org/), sections 4.4
1136
1137 \1f
1138 File: libgomp.info,  Node: GOMP_CPU_AFFINITY,  Next: GOMP_STACKSIZE,  Prev: OMP_PROC_BIND,  Up: Environment Variables
1139
1140 3.10 'GOMP_CPU_AFFINITY' - Bind threads to specific CPUs
1141 ========================================================
1142
1143 _Description_:
1144      Binds threads to specific CPUs.  The variable should contain a
1145      space-separated or comma-separated list of CPUs.  This list may
1146      contain different kinds of entries: either single CPU numbers in
1147      any order, a range of CPUs (M-N) or a range with some stride
1148      (M-N:S). CPU numbers are zero based.  For example,
1149      'GOMP_CPU_AFFINITY="0 3 1-2 4-15:2"' will bind the initial thread
1150      to CPU 0, the second to CPU 3, the third to CPU 1, the fourth to
1151      CPU 2, the fifth to CPU 4, the sixth through tenth to CPUs 6, 8,
1152      10, 12, and 14 respectively and then start assigning back from the
1153      beginning of the list.  'GOMP_CPU_AFFINITY=0' binds all threads to
1154      CPU 0.
1155
1156      There is no GNU OpenMP library routine to determine whether a CPU
1157      affinity specification is in effect.  As a workaround,
1158      language-specific library functions, e.g., 'getenv' in C or
1159      'GET_ENVIRONMENT_VARIABLE' in Fortran, may be used to query the
1160      setting of the 'GOMP_CPU_AFFINITY' environment variable.  A defined
1161      CPU affinity on startup cannot be changed or disabled during the
1162      runtime of the application.
1163
1164      If this environment variable is omitted, the host system will
1165      handle the assignment of threads to CPUs.
1166
1167 _See also_:
1168      *note OMP_PROC_BIND::
1169
1170 \1f
1171 File: libgomp.info,  Node: GOMP_STACKSIZE,  Prev: GOMP_CPU_AFFINITY,  Up: Environment Variables
1172
1173 3.11 'GOMP_STACKSIZE' - Set default thread stack size
1174 =====================================================
1175
1176 _Description_:
1177      Set the default thread stack size in kilobytes.  This is different
1178      from 'pthread_attr_setstacksize' which gets the number of bytes as
1179      an argument.  If the stack size cannot be set due to system
1180      constraints, an error is reported and the initial stack size is
1181      left unchanged.  If undefined, the stack size is system dependent.
1182
1183 _See also_:
1184      *note OMP_STACKSIZE::
1185
1186 _Reference_:
1187      GCC Patches Mailinglist
1188      (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00493.html), GCC
1189      Patches Mailinglist
1190      (http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00496.html)
1191
1192 \1f
1193 File: libgomp.info,  Node: The libgomp ABI,  Next: Reporting Bugs,  Prev: Environment Variables,  Up: Top
1194
1195 4 The libgomp ABI
1196 *****************
1197
1198 The following sections present notes on the external ABI as presented by
1199 libgomp.  Only maintainers should need them.
1200
1201 * Menu:
1202
1203 * Implementing MASTER construct::
1204 * Implementing CRITICAL construct::
1205 * Implementing ATOMIC construct::
1206 * Implementing FLUSH construct::
1207 * Implementing BARRIER construct::
1208 * Implementing THREADPRIVATE construct::
1209 * Implementing PRIVATE clause::
1210 * Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses::
1211 * Implementing REDUCTION clause::
1212 * Implementing PARALLEL construct::
1213 * Implementing FOR construct::
1214 * Implementing ORDERED construct::
1215 * Implementing SECTIONS construct::
1216 * Implementing SINGLE construct::
1217
1218 \1f
1219 File: libgomp.info,  Node: Implementing MASTER construct,  Next: Implementing CRITICAL construct,  Up: The libgomp ABI
1220
1221 4.1 Implementing MASTER construct
1222 =================================
1223
1224      if (omp_get_thread_num () == 0)
1225        block
1226
1227    Alternately, we generate two copies of the parallel subfunction and
1228 only include this in the version run by the master thread.  Surely this
1229 is not worthwhile though...
1230
1231 \1f
1232 File: libgomp.info,  Node: Implementing CRITICAL construct,  Next: Implementing ATOMIC construct,  Prev: Implementing MASTER construct,  Up: The libgomp ABI
1233
1234 4.2 Implementing CRITICAL construct
1235 ===================================
1236
1237 Without a specified name,
1238
1239        void GOMP_critical_start (void);
1240        void GOMP_critical_end (void);
1241
1242    so that we don't get COPY relocations from libgomp to the main
1243 application.
1244
1245    With a specified name, use omp_set_lock and omp_unset_lock with name
1246 being transformed into a variable declared like
1247
1248        omp_lock_t gomp_critical_user_<name> __attribute__((common))
1249
1250    Ideally the ABI would specify that all zero is a valid unlocked
1251 state, and so we wouldn't need to initialize this at startup.
1252
1253 \1f
1254 File: libgomp.info,  Node: Implementing ATOMIC construct,  Next: Implementing FLUSH construct,  Prev: Implementing CRITICAL construct,  Up: The libgomp ABI
1255
1256 4.3 Implementing ATOMIC construct
1257 =================================
1258
1259 The target should implement the '__sync' builtins.
1260
1261    Failing that we could add
1262
1263        void GOMP_atomic_enter (void)
1264        void GOMP_atomic_exit (void)
1265
1266    which reuses the regular lock code, but with yet another lock object
1267 private to the library.
1268
1269 \1f
1270 File: libgomp.info,  Node: Implementing FLUSH construct,  Next: Implementing BARRIER construct,  Prev: Implementing ATOMIC construct,  Up: The libgomp ABI
1271
1272 4.4 Implementing FLUSH construct
1273 ================================
1274
1275 Expands to the '__sync_synchronize' builtin.
1276
1277 \1f
1278 File: libgomp.info,  Node: Implementing BARRIER construct,  Next: Implementing THREADPRIVATE construct,  Prev: Implementing FLUSH construct,  Up: The libgomp ABI
1279
1280 4.5 Implementing BARRIER construct
1281 ==================================
1282
1283        void GOMP_barrier (void)
1284
1285 \1f
1286 File: libgomp.info,  Node: Implementing THREADPRIVATE construct,  Next: Implementing PRIVATE clause,  Prev: Implementing BARRIER construct,  Up: The libgomp ABI
1287
1288 4.6 Implementing THREADPRIVATE construct
1289 ========================================
1290
1291 In _most_ cases we can map this directly to '__thread'.  Except that OMP
1292 allows constructors for C++ objects.  We can either refuse to support
1293 this (how often is it used?)  or we can implement something akin to
1294 .ctors.
1295
1296    Even more ideally, this ctor feature is handled by extensions to the
1297 main pthreads library.  Failing that, we can have a set of entry points
1298 to register ctor functions to be called.
1299
1300 \1f
1301 File: libgomp.info,  Node: Implementing PRIVATE clause,  Next: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses,  Prev: Implementing THREADPRIVATE construct,  Up: The libgomp ABI
1302
1303 4.7 Implementing PRIVATE clause
1304 ===============================
1305
1306 In association with a PARALLEL, or within the lexical extent of a
1307 PARALLEL block, the variable becomes a local variable in the parallel
1308 subfunction.
1309
1310    In association with FOR or SECTIONS blocks, create a new automatic
1311 variable within the current function.  This preserves the semantic of
1312 new variable creation.
1313
1314 \1f
1315 File: libgomp.info,  Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses,  Next: Implementing REDUCTION clause,  Prev: Implementing PRIVATE clause,  Up: The libgomp ABI
1316
1317 4.8 Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses
1318 ========================================================================
1319
1320 This seems simple enough for PARALLEL blocks.  Create a private struct
1321 for communicating between the parent and subfunction.  In the parent,
1322 copy in values for scalar and "small" structs; copy in addresses for
1323 others TREE_ADDRESSABLE types.  In the subfunction, copy the value into
1324 the local variable.
1325
1326    It is not clear what to do with bare FOR or SECTION blocks.  The only
1327 thing I can figure is that we do something like:
1328
1329      #pragma omp for firstprivate(x) lastprivate(y)
1330      for (int i = 0; i < n; ++i)
1331        body;
1332
1333    which becomes
1334
1335      {
1336        int x = x, y;
1337
1338        // for stuff
1339
1340        if (i == n)
1341          y = y;
1342      }
1343
1344    where the "x=x" and "y=y" assignments actually have different uids
1345 for the two variables, i.e.  not something you could write directly in
1346 C. Presumably this only makes sense if the "outer" x and y are global
1347 variables.
1348
1349    COPYPRIVATE would work the same way, except the structure broadcast
1350 would have to happen via SINGLE machinery instead.
1351
1352 \1f
1353 File: libgomp.info,  Node: Implementing REDUCTION clause,  Next: Implementing PARALLEL construct,  Prev: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses,  Up: The libgomp ABI
1354
1355 4.9 Implementing REDUCTION clause
1356 =================================
1357
1358 The private struct mentioned in the previous section should have a
1359 pointer to an array of the type of the variable, indexed by the thread's
1360 TEAM_ID.  The thread stores its final value into the array, and after
1361 the barrier, the master thread iterates over the array to collect the
1362 values.
1363
1364 \1f
1365 File: libgomp.info,  Node: Implementing PARALLEL construct,  Next: Implementing FOR construct,  Prev: Implementing REDUCTION clause,  Up: The libgomp ABI
1366
1367 4.10 Implementing PARALLEL construct
1368 ====================================
1369
1370        #pragma omp parallel
1371        {
1372          body;
1373        }
1374
1375    becomes
1376
1377        void subfunction (void *data)
1378        {
1379          use data;
1380          body;
1381        }
1382
1383        setup data;
1384        GOMP_parallel_start (subfunction, &data, num_threads);
1385        subfunction (&data);
1386        GOMP_parallel_end ();
1387
1388        void GOMP_parallel_start (void (*fn)(void *), void *data, unsigned num_threads)
1389
1390    The FN argument is the subfunction to be run in parallel.
1391
1392    The DATA argument is a pointer to a structure used to communicate
1393 data in and out of the subfunction, as discussed above with respect to
1394 FIRSTPRIVATE et al.
1395
1396    The NUM_THREADS argument is 1 if an IF clause is present and false,
1397 or the value of the NUM_THREADS clause, if present, or 0.
1398
1399    The function needs to create the appropriate number of threads and/or
1400 launch them from the dock.  It needs to create the team structure and
1401 assign team ids.
1402
1403        void GOMP_parallel_end (void)
1404
1405    Tears down the team and returns us to the previous
1406 'omp_in_parallel()' state.
1407
1408 \1f
1409 File: libgomp.info,  Node: Implementing FOR construct,  Next: Implementing ORDERED construct,  Prev: Implementing PARALLEL construct,  Up: The libgomp ABI
1410
1411 4.11 Implementing FOR construct
1412 ===============================
1413
1414        #pragma omp parallel for
1415        for (i = lb; i <= ub; i++)
1416          body;
1417
1418    becomes
1419
1420        void subfunction (void *data)
1421        {
1422          long _s0, _e0;
1423          while (GOMP_loop_static_next (&_s0, &_e0))
1424          {
1425            long _e1 = _e0, i;
1426            for (i = _s0; i < _e1; i++)
1427              body;
1428          }
1429          GOMP_loop_end_nowait ();
1430        }
1431
1432        GOMP_parallel_loop_static (subfunction, NULL, 0, lb, ub+1, 1, 0);
1433        subfunction (NULL);
1434        GOMP_parallel_end ();
1435
1436        #pragma omp for schedule(runtime)
1437        for (i = 0; i < n; i++)
1438          body;
1439
1440    becomes
1441
1442        {
1443          long i, _s0, _e0;
1444          if (GOMP_loop_runtime_start (0, n, 1, &_s0, &_e0))
1445            do {
1446              long _e1 = _e0;
1447              for (i = _s0, i < _e0; i++)
1448                body;
1449            } while (GOMP_loop_runtime_next (&_s0, _&e0));
1450          GOMP_loop_end ();
1451        }
1452
1453    Note that while it looks like there is trickiness to propagating a
1454 non-constant STEP, there isn't really.  We're explicitly allowed to
1455 evaluate it as many times as we want, and any variables involved should
1456 automatically be handled as PRIVATE or SHARED like any other variables.
1457 So the expression should remain evaluable in the subfunction.  We can
1458 also pull it into a local variable if we like, but since its supposed to
1459 remain unchanged, we can also not if we like.
1460
1461    If we have SCHEDULE(STATIC), and no ORDERED, then we ought to be able
1462 to get away with no work-sharing context at all, since we can simply
1463 perform the arithmetic directly in each thread to divide up the
1464 iterations.  Which would mean that we wouldn't need to call any of these
1465 routines.
1466
1467    There are separate routines for handling loops with an ORDERED
1468 clause.  Bookkeeping for that is non-trivial...
1469
1470 \1f
1471 File: libgomp.info,  Node: Implementing ORDERED construct,  Next: Implementing SECTIONS construct,  Prev: Implementing FOR construct,  Up: The libgomp ABI
1472
1473 4.12 Implementing ORDERED construct
1474 ===================================
1475
1476        void GOMP_ordered_start (void)
1477        void GOMP_ordered_end (void)
1478
1479 \1f
1480 File: libgomp.info,  Node: Implementing SECTIONS construct,  Next: Implementing SINGLE construct,  Prev: Implementing ORDERED construct,  Up: The libgomp ABI
1481
1482 4.13 Implementing SECTIONS construct
1483 ====================================
1484
1485 A block as
1486
1487        #pragma omp sections
1488        {
1489          #pragma omp section
1490          stmt1;
1491          #pragma omp section
1492          stmt2;
1493          #pragma omp section
1494          stmt3;
1495        }
1496
1497    becomes
1498
1499        for (i = GOMP_sections_start (3); i != 0; i = GOMP_sections_next ())
1500          switch (i)
1501            {
1502            case 1:
1503              stmt1;
1504              break;
1505            case 2:
1506              stmt2;
1507              break;
1508            case 3:
1509              stmt3;
1510              break;
1511            }
1512        GOMP_barrier ();
1513
1514 \1f
1515 File: libgomp.info,  Node: Implementing SINGLE construct,  Prev: Implementing SECTIONS construct,  Up: The libgomp ABI
1516
1517 4.14 Implementing SINGLE construct
1518 ==================================
1519
1520 A block like
1521
1522        #pragma omp single
1523        {
1524          body;
1525        }
1526
1527    becomes
1528
1529        if (GOMP_single_start ())
1530          body;
1531        GOMP_barrier ();
1532
1533    while
1534
1535        #pragma omp single copyprivate(x)
1536          body;
1537
1538    becomes
1539
1540        datap = GOMP_single_copy_start ();
1541        if (datap == NULL)
1542          {
1543            body;
1544            data.x = x;
1545            GOMP_single_copy_end (&data);
1546          }
1547        else
1548          x = datap->x;
1549        GOMP_barrier ();
1550
1551 \1f
1552 File: libgomp.info,  Node: Reporting Bugs,  Next: Copying,  Prev: The libgomp ABI,  Up: Top
1553
1554 5 Reporting Bugs
1555 ****************
1556
1557 Bugs in the GNU OpenMP implementation should be reported via bugzilla
1558 (http://gcc.gnu.org/bugzilla/).  For all cases, please add "openmp" to
1559 the keywords field in the bug report.
1560
1561 \1f
1562 File: libgomp.info,  Node: Copying,  Next: GNU Free Documentation License,  Prev: Reporting Bugs,  Up: Top
1563
1564 GNU General Public License
1565 **************************
1566
1567                         Version 3, 29 June 2007
1568
1569      Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
1570
1571      Everyone is permitted to copy and distribute verbatim copies of this
1572      license document, but changing it is not allowed.
1573
1574 Preamble
1575 ========
1576
1577 The GNU General Public License is a free, copyleft license for software
1578 and other kinds of works.
1579
1580    The licenses for most software and other practical works are designed
1581 to take away your freedom to share and change the works.  By contrast,
1582 the GNU General Public License is intended to guarantee your freedom to
1583 share and change all versions of a program-to make sure it remains free
1584 software for all its users.  We, the Free Software Foundation, use the
1585 GNU General Public License for most of our software; it applies also to
1586 any other work released this way by its authors.  You can apply it to
1587 your programs, too.
1588
1589    When we speak of free software, we are referring to freedom, not
1590 price.  Our General Public Licenses are designed to make sure that you
1591 have the freedom to distribute copies of free software (and charge for
1592 them if you wish), that you receive source code or can get it if you
1593 want it, that you can change the software or use pieces of it in new
1594 free programs, and that you know you can do these things.
1595
1596    To protect your rights, we need to prevent others from denying you
1597 these rights or asking you to surrender the rights.  Therefore, you have
1598 certain responsibilities if you distribute copies of the software, or if
1599 you modify it: responsibilities to respect the freedom of others.
1600
1601    For example, if you distribute copies of such a program, whether
1602 gratis or for a fee, you must pass on to the recipients the same
1603 freedoms that you received.  You must make sure that they, too, receive
1604 or can get the source code.  And you must show them these terms so they
1605 know their rights.
1606
1607    Developers that use the GNU GPL protect your rights with two steps:
1608 (1) assert copyright on the software, and (2) offer you this License
1609 giving you legal permission to copy, distribute and/or modify it.
1610
1611    For the developers' and authors' protection, the GPL clearly explains
1612 that there is no warranty for this free software.  For both users' and
1613 authors' sake, the GPL requires that modified versions be marked as
1614 changed, so that their problems will not be attributed erroneously to
1615 authors of previous versions.
1616
1617    Some devices are designed to deny users access to install or run
1618 modified versions of the software inside them, although the manufacturer
1619 can do so.  This is fundamentally incompatible with the aim of
1620 protecting users' freedom to change the software.  The systematic
1621 pattern of such abuse occurs in the area of products for individuals to
1622 use, which is precisely where it is most unacceptable.  Therefore, we
1623 have designed this version of the GPL to prohibit the practice for those
1624 products.  If such problems arise substantially in other domains, we
1625 stand ready to extend this provision to those domains in future versions
1626 of the GPL, as needed to protect the freedom of users.
1627
1628    Finally, every program is threatened constantly by software patents.
1629 States should not allow patents to restrict development and use of
1630 software on general-purpose computers, but in those that do, we wish to
1631 avoid the special danger that patents applied to a free program could
1632 make it effectively proprietary.  To prevent this, the GPL assures that
1633 patents cannot be used to render the program non-free.
1634
1635    The precise terms and conditions for copying, distribution and
1636 modification follow.
1637
1638 TERMS AND CONDITIONS
1639 ====================
1640
1641   0. Definitions.
1642
1643      "This License" refers to version 3 of the GNU General Public
1644      License.
1645
1646      "Copyright" also means copyright-like laws that apply to other
1647      kinds of works, such as semiconductor masks.
1648
1649      "The Program" refers to any copyrightable work licensed under this
1650      License.  Each licensee is addressed as "you".  "Licensees" and
1651      "recipients" may be individuals or organizations.
1652
1653      To "modify" a work means to copy from or adapt all or part of the
1654      work in a fashion requiring copyright permission, other than the
1655      making of an exact copy.  The resulting work is called a "modified
1656      version" of the earlier work or a work "based on" the earlier work.
1657
1658      A "covered work" means either the unmodified Program or a work
1659      based on the Program.
1660
1661      To "propagate" a work means to do anything with it that, without
1662      permission, would make you directly or secondarily liable for
1663      infringement under applicable copyright law, except executing it on
1664      a computer or modifying a private copy.  Propagation includes
1665      copying, distribution (with or without modification), making
1666      available to the public, and in some countries other activities as
1667      well.
1668
1669      To "convey" a work means any kind of propagation that enables other
1670      parties to make or receive copies.  Mere interaction with a user
1671      through a computer network, with no transfer of a copy, is not
1672      conveying.
1673
1674      An interactive user interface displays "Appropriate Legal Notices"
1675      to the extent that it includes a convenient and prominently visible
1676      feature that (1) displays an appropriate copyright notice, and (2)
1677      tells the user that there is no warranty for the work (except to
1678      the extent that warranties are provided), that licensees may convey
1679      the work under this License, and how to view a copy of this
1680      License.  If the interface presents a list of user commands or
1681      options, such as a menu, a prominent item in the list meets this
1682      criterion.
1683
1684   1. Source Code.
1685
1686      The "source code" for a work means the preferred form of the work
1687      for making modifications to it.  "Object code" means any non-source
1688      form of a work.
1689
1690      A "Standard Interface" means an interface that either is an
1691      official standard defined by a recognized standards body, or, in
1692      the case of interfaces specified for a particular programming
1693      language, one that is widely used among developers working in that
1694      language.
1695
1696      The "System Libraries" of an executable work include anything,
1697      other than the work as a whole, that (a) is included in the normal
1698      form of packaging a Major Component, but which is not part of that
1699      Major Component, and (b) serves only to enable use of the work with
1700      that Major Component, or to implement a Standard Interface for
1701      which an implementation is available to the public in source code
1702      form.  A "Major Component", in this context, means a major
1703      essential component (kernel, window system, and so on) of the
1704      specific operating system (if any) on which the executable work
1705      runs, or a compiler used to produce the work, or an object code
1706      interpreter used to run it.
1707
1708      The "Corresponding Source" for a work in object code form means all
1709      the source code needed to generate, install, and (for an executable
1710      work) run the object code and to modify the work, including scripts
1711      to control those activities.  However, it does not include the
1712      work's System Libraries, or general-purpose tools or generally
1713      available free programs which are used unmodified in performing
1714      those activities but which are not part of the work.  For example,
1715      Corresponding Source includes interface definition files associated
1716      with source files for the work, and the source code for shared
1717      libraries and dynamically linked subprograms that the work is
1718      specifically designed to require, such as by intimate data
1719      communication or control flow between those subprograms and other
1720      parts of the work.
1721
1722      The Corresponding Source need not include anything that users can
1723      regenerate automatically from other parts of the Corresponding
1724      Source.
1725
1726      The Corresponding Source for a work in source code form is that
1727      same work.
1728
1729   2. Basic Permissions.
1730
1731      All rights granted under this License are granted for the term of
1732      copyright on the Program, and are irrevocable provided the stated
1733      conditions are met.  This License explicitly affirms your unlimited
1734      permission to run the unmodified Program.  The output from running
1735      a covered work is covered by this License only if the output, given
1736      its content, constitutes a covered work.  This License acknowledges
1737      your rights of fair use or other equivalent, as provided by
1738      copyright law.
1739
1740      You may make, run and propagate covered works that you do not
1741      convey, without conditions so long as your license otherwise
1742      remains in force.  You may convey covered works to others for the
1743      sole purpose of having them make modifications exclusively for you,
1744      or provide you with facilities for running those works, provided
1745      that you comply with the terms of this License in conveying all
1746      material for which you do not control copyright.  Those thus making
1747      or running the covered works for you must do so exclusively on your
1748      behalf, under your direction and control, on terms that prohibit
1749      them from making any copies of your copyrighted material outside
1750      their relationship with you.
1751
1752      Conveying under any other circumstances is permitted solely under
1753      the conditions stated below.  Sublicensing is not allowed; section
1754      10 makes it unnecessary.
1755
1756   3. Protecting Users' Legal Rights From Anti-Circumvention Law.
1757
1758      No covered work shall be deemed part of an effective technological
1759      measure under any applicable law fulfilling obligations under
1760      article 11 of the WIPO copyright treaty adopted on 20 December
1761      1996, or similar laws prohibiting or restricting circumvention of
1762      such measures.
1763
1764      When you convey a covered work, you waive any legal power to forbid
1765      circumvention of technological measures to the extent such
1766      circumvention is effected by exercising rights under this License
1767      with respect to the covered work, and you disclaim any intention to
1768      limit operation or modification of the work as a means of
1769      enforcing, against the work's users, your or third parties' legal
1770      rights to forbid circumvention of technological measures.
1771
1772   4. Conveying Verbatim Copies.
1773
1774      You may convey verbatim copies of the Program's source code as you
1775      receive it, in any medium, provided that you conspicuously and
1776      appropriately publish on each copy an appropriate copyright notice;
1777      keep intact all notices stating that this License and any
1778      non-permissive terms added in accord with section 7 apply to the
1779      code; keep intact all notices of the absence of any warranty; and
1780      give all recipients a copy of this License along with the Program.
1781
1782      You may charge any price or no price for each copy that you convey,
1783      and you may offer support or warranty protection for a fee.
1784
1785   5. Conveying Modified Source Versions.
1786
1787      You may convey a work based on the Program, or the modifications to
1788      produce it from the Program, in the form of source code under the
1789      terms of section 4, provided that you also meet all of these
1790      conditions:
1791
1792        a. The work must carry prominent notices stating that you
1793           modified it, and giving a relevant date.
1794
1795        b. The work must carry prominent notices stating that it is
1796           released under this License and any conditions added under
1797           section 7.  This requirement modifies the requirement in
1798           section 4 to "keep intact all notices".
1799
1800        c. You must license the entire work, as a whole, under this
1801           License to anyone who comes into possession of a copy.  This
1802           License will therefore apply, along with any applicable
1803           section 7 additional terms, to the whole of the work, and all
1804           its parts, regardless of how they are packaged.  This License
1805           gives no permission to license the work in any other way, but
1806           it does not invalidate such permission if you have separately
1807           received it.
1808
1809        d. If the work has interactive user interfaces, each must display
1810           Appropriate Legal Notices; however, if the Program has
1811           interactive interfaces that do not display Appropriate Legal
1812           Notices, your work need not make them do so.
1813
1814      A compilation of a covered work with other separate and independent
1815      works, which are not by their nature extensions of the covered
1816      work, and which are not combined with it such as to form a larger
1817      program, in or on a volume of a storage or distribution medium, is
1818      called an "aggregate" if the compilation and its resulting
1819      copyright are not used to limit the access or legal rights of the
1820      compilation's users beyond what the individual works permit.
1821      Inclusion of a covered work in an aggregate does not cause this
1822      License to apply to the other parts of the aggregate.
1823
1824   6. Conveying Non-Source Forms.
1825
1826      You may convey a covered work in object code form under the terms
1827      of sections 4 and 5, provided that you also convey the
1828      machine-readable Corresponding Source under the terms of this
1829      License, in one of these ways:
1830
1831        a. Convey the object code in, or embodied in, a physical product
1832           (including a physical distribution medium), accompanied by the
1833           Corresponding Source fixed on a durable physical medium
1834           customarily used for software interchange.
1835
1836        b. Convey the object code in, or embodied in, a physical product
1837           (including a physical distribution medium), accompanied by a
1838           written offer, valid for at least three years and valid for as
1839           long as you offer spare parts or customer support for that
1840           product model, to give anyone who possesses the object code
1841           either (1) a copy of the Corresponding Source for all the
1842           software in the product that is covered by this License, on a
1843           durable physical medium customarily used for software
1844           interchange, for a price no more than your reasonable cost of
1845           physically performing this conveying of source, or (2) access
1846           to copy the Corresponding Source from a network server at no
1847           charge.
1848
1849        c. Convey individual copies of the object code with a copy of the
1850           written offer to provide the Corresponding Source.  This
1851           alternative is allowed only occasionally and noncommercially,
1852           and only if you received the object code with such an offer,
1853           in accord with subsection 6b.
1854
1855        d. Convey the object code by offering access from a designated
1856           place (gratis or for a charge), and offer equivalent access to
1857           the Corresponding Source in the same way through the same
1858           place at no further charge.  You need not require recipients
1859           to copy the Corresponding Source along with the object code.
1860           If the place to copy the object code is a network server, the
1861           Corresponding Source may be on a different server (operated by
1862           you or a third party) that supports equivalent copying
1863           facilities, provided you maintain clear directions next to the
1864           object code saying where to find the Corresponding Source.
1865           Regardless of what server hosts the Corresponding Source, you
1866           remain obligated to ensure that it is available for as long as
1867           needed to satisfy these requirements.
1868
1869        e. Convey the object code using peer-to-peer transmission,
1870           provided you inform other peers where the object code and
1871           Corresponding Source of the work are being offered to the
1872           general public at no charge under subsection 6d.
1873
1874      A separable portion of the object code, whose source code is
1875      excluded from the Corresponding Source as a System Library, need
1876      not be included in conveying the object code work.
1877
1878      A "User Product" is either (1) a "consumer product", which means
1879      any tangible personal property which is normally used for personal,
1880      family, or household purposes, or (2) anything designed or sold for
1881      incorporation into a dwelling.  In determining whether a product is
1882      a consumer product, doubtful cases shall be resolved in favor of
1883      coverage.  For a particular product received by a particular user,
1884      "normally used" refers to a typical or common use of that class of
1885      product, regardless of the status of the particular user or of the
1886      way in which the particular user actually uses, or expects or is
1887      expected to use, the product.  A product is a consumer product
1888      regardless of whether the product has substantial commercial,
1889      industrial or non-consumer uses, unless such uses represent the
1890      only significant mode of use of the product.
1891
1892      "Installation Information" for a User Product means any methods,
1893      procedures, authorization keys, or other information required to
1894      install and execute modified versions of a covered work in that
1895      User Product from a modified version of its Corresponding Source.
1896      The information must suffice to ensure that the continued
1897      functioning of the modified object code is in no case prevented or
1898      interfered with solely because modification has been made.
1899
1900      If you convey an object code work under this section in, or with,
1901      or specifically for use in, a User Product, and the conveying
1902      occurs as part of a transaction in which the right of possession
1903      and use of the User Product is transferred to the recipient in
1904      perpetuity or for a fixed term (regardless of how the transaction
1905      is characterized), the Corresponding Source conveyed under this
1906      section must be accompanied by the Installation Information.  But
1907      this requirement does not apply if neither you nor any third party
1908      retains the ability to install modified object code on the User
1909      Product (for example, the work has been installed in ROM).
1910
1911      The requirement to provide Installation Information does not
1912      include a requirement to continue to provide support service,
1913      warranty, or updates for a work that has been modified or installed
1914      by the recipient, or for the User Product in which it has been
1915      modified or installed.  Access to a network may be denied when the
1916      modification itself materially and adversely affects the operation
1917      of the network or violates the rules and protocols for
1918      communication across the network.
1919
1920      Corresponding Source conveyed, and Installation Information
1921      provided, in accord with this section must be in a format that is
1922      publicly documented (and with an implementation available to the
1923      public in source code form), and must require no special password
1924      or key for unpacking, reading or copying.
1925
1926   7. Additional Terms.
1927
1928      "Additional permissions" are terms that supplement the terms of
1929      this License by making exceptions from one or more of its
1930      conditions.  Additional permissions that are applicable to the
1931      entire Program shall be treated as though they were included in
1932      this License, to the extent that they are valid under applicable
1933      law.  If additional permissions apply only to part of the Program,
1934      that part may be used separately under those permissions, but the
1935      entire Program remains governed by this License without regard to
1936      the additional permissions.
1937
1938      When you convey a copy of a covered work, you may at your option
1939      remove any additional permissions from that copy, or from any part
1940      of it.  (Additional permissions may be written to require their own
1941      removal in certain cases when you modify the work.)  You may place
1942      additional permissions on material, added by you to a covered work,
1943      for which you have or can give appropriate copyright permission.
1944
1945      Notwithstanding any other provision of this License, for material
1946      you add to a covered work, you may (if authorized by the copyright
1947      holders of that material) supplement the terms of this License with
1948      terms:
1949
1950        a. Disclaiming warranty or limiting liability differently from
1951           the terms of sections 15 and 16 of this License; or
1952
1953        b. Requiring preservation of specified reasonable legal notices
1954           or author attributions in that material or in the Appropriate
1955           Legal Notices displayed by works containing it; or
1956
1957        c. Prohibiting misrepresentation of the origin of that material,
1958           or requiring that modified versions of such material be marked
1959           in reasonable ways as different from the original version; or
1960
1961        d. Limiting the use for publicity purposes of names of licensors
1962           or authors of the material; or
1963
1964        e. Declining to grant rights under trademark law for use of some
1965           trade names, trademarks, or service marks; or
1966
1967        f. Requiring indemnification of licensors and authors of that
1968           material by anyone who conveys the material (or modified
1969           versions of it) with contractual assumptions of liability to
1970           the recipient, for any liability that these contractual
1971           assumptions directly impose on those licensors and authors.
1972
1973      All other non-permissive additional terms are considered "further
1974      restrictions" within the meaning of section 10.  If the Program as
1975      you received it, or any part of it, contains a notice stating that
1976      it is governed by this License along with a term that is a further
1977      restriction, you may remove that term.  If a license document
1978      contains a further restriction but permits relicensing or conveying
1979      under this License, you may add to a covered work material governed
1980      by the terms of that license document, provided that the further
1981      restriction does not survive such relicensing or conveying.
1982
1983      If you add terms to a covered work in accord with this section, you
1984      must place, in the relevant source files, a statement of the
1985      additional terms that apply to those files, or a notice indicating
1986      where to find the applicable terms.
1987
1988      Additional terms, permissive or non-permissive, may be stated in
1989      the form of a separately written license, or stated as exceptions;
1990      the above requirements apply either way.
1991
1992   8. Termination.
1993
1994      You may not propagate or modify a covered work except as expressly
1995      provided under this License.  Any attempt otherwise to propagate or
1996      modify it is void, and will automatically terminate your rights
1997      under this License (including any patent licenses granted under the
1998      third paragraph of section 11).
1999
2000      However, if you cease all violation of this License, then your
2001      license from a particular copyright holder is reinstated (a)
2002      provisionally, unless and until the copyright holder explicitly and
2003      finally terminates your license, and (b) permanently, if the
2004      copyright holder fails to notify you of the violation by some
2005      reasonable means prior to 60 days after the cessation.
2006
2007      Moreover, your license from a particular copyright holder is
2008      reinstated permanently if the copyright holder notifies you of the
2009      violation by some reasonable means, this is the first time you have
2010      received notice of violation of this License (for any work) from
2011      that copyright holder, and you cure the violation prior to 30 days
2012      after your receipt of the notice.
2013
2014      Termination of your rights under this section does not terminate
2015      the licenses of parties who have received copies or rights from you
2016      under this License.  If your rights have been terminated and not
2017      permanently reinstated, you do not qualify to receive new licenses
2018      for the same material under section 10.
2019
2020   9. Acceptance Not Required for Having Copies.
2021
2022      You are not required to accept this License in order to receive or
2023      run a copy of the Program.  Ancillary propagation of a covered work
2024      occurring solely as a consequence of using peer-to-peer
2025      transmission to receive a copy likewise does not require
2026      acceptance.  However, nothing other than this License grants you
2027      permission to propagate or modify any covered work.  These actions
2028      infringe copyright if you do not accept this License.  Therefore,
2029      by modifying or propagating a covered work, you indicate your
2030      acceptance of this License to do so.
2031
2032   10. Automatic Licensing of Downstream Recipients.
2033
2034      Each time you convey a covered work, the recipient automatically
2035      receives a license from the original licensors, to run, modify and
2036      propagate that work, subject to this License.  You are not
2037      responsible for enforcing compliance by third parties with this
2038      License.
2039
2040      An "entity transaction" is a transaction transferring control of an
2041      organization, or substantially all assets of one, or subdividing an
2042      organization, or merging organizations.  If propagation of a
2043      covered work results from an entity transaction, each party to that
2044      transaction who receives a copy of the work also receives whatever
2045      licenses to the work the party's predecessor in interest had or
2046      could give under the previous paragraph, plus a right to possession
2047      of the Corresponding Source of the work from the predecessor in
2048      interest, if the predecessor has it or can get it with reasonable
2049      efforts.
2050
2051      You may not impose any further restrictions on the exercise of the
2052      rights granted or affirmed under this License.  For example, you
2053      may not impose a license fee, royalty, or other charge for exercise
2054      of rights granted under this License, and you may not initiate
2055      litigation (including a cross-claim or counterclaim in a lawsuit)
2056      alleging that any patent claim is infringed by making, using,
2057      selling, offering for sale, or importing the Program or any portion
2058      of it.
2059
2060   11. Patents.
2061
2062      A "contributor" is a copyright holder who authorizes use under this
2063      License of the Program or a work on which the Program is based.
2064      The work thus licensed is called the contributor's "contributor
2065      version".
2066
2067      A contributor's "essential patent claims" are all patent claims
2068      owned or controlled by the contributor, whether already acquired or
2069      hereafter acquired, that would be infringed by some manner,
2070      permitted by this License, of making, using, or selling its
2071      contributor version, but do not include claims that would be
2072      infringed only as a consequence of further modification of the
2073      contributor version.  For purposes of this definition, "control"
2074      includes the right to grant patent sublicenses in a manner
2075      consistent with the requirements of this License.
2076
2077      Each contributor grants you a non-exclusive, worldwide,
2078      royalty-free patent license under the contributor's essential
2079      patent claims, to make, use, sell, offer for sale, import and
2080      otherwise run, modify and propagate the contents of its contributor
2081      version.
2082
2083      In the following three paragraphs, a "patent license" is any
2084      express agreement or commitment, however denominated, not to
2085      enforce a patent (such as an express permission to practice a
2086      patent or covenant not to sue for patent infringement).  To "grant"
2087      such a patent license to a party means to make such an agreement or
2088      commitment not to enforce a patent against the party.
2089
2090      If you convey a covered work, knowingly relying on a patent
2091      license, and the Corresponding Source of the work is not available
2092      for anyone to copy, free of charge and under the terms of this
2093      License, through a publicly available network server or other
2094      readily accessible means, then you must either (1) cause the
2095      Corresponding Source to be so available, or (2) arrange to deprive
2096      yourself of the benefit of the patent license for this particular
2097      work, or (3) arrange, in a manner consistent with the requirements
2098      of this License, to extend the patent license to downstream
2099      recipients.  "Knowingly relying" means you have actual knowledge
2100      that, but for the patent license, your conveying the covered work
2101      in a country, or your recipient's use of the covered work in a
2102      country, would infringe one or more identifiable patents in that
2103      country that you have reason to believe are valid.
2104
2105      If, pursuant to or in connection with a single transaction or
2106      arrangement, you convey, or propagate by procuring conveyance of, a
2107      covered work, and grant a patent license to some of the parties
2108      receiving the covered work authorizing them to use, propagate,
2109      modify or convey a specific copy of the covered work, then the
2110      patent license you grant is automatically extended to all
2111      recipients of the covered work and works based on it.
2112
2113      A patent license is "discriminatory" if it does not include within
2114      the scope of its coverage, prohibits the exercise of, or is
2115      conditioned on the non-exercise of one or more of the rights that
2116      are specifically granted under this License.  You may not convey a
2117      covered work if you are a party to an arrangement with a third
2118      party that is in the business of distributing software, under which
2119      you make payment to the third party based on the extent of your
2120      activity of conveying the work, and under which the third party
2121      grants, to any of the parties who would receive the covered work
2122      from you, a discriminatory patent license (a) in connection with
2123      copies of the covered work conveyed by you (or copies made from
2124      those copies), or (b) primarily for and in connection with specific
2125      products or compilations that contain the covered work, unless you
2126      entered into that arrangement, or that patent license was granted,
2127      prior to 28 March 2007.
2128
2129      Nothing in this License shall be construed as excluding or limiting
2130      any implied license or other defenses to infringement that may
2131      otherwise be available to you under applicable patent law.
2132
2133   12. No Surrender of Others' Freedom.
2134
2135      If conditions are imposed on you (whether by court order, agreement
2136      or otherwise) that contradict the conditions of this License, they
2137      do not excuse you from the conditions of this License.  If you
2138      cannot convey a covered work so as to satisfy simultaneously your
2139      obligations under this License and any other pertinent obligations,
2140      then as a consequence you may not convey it at all.  For example,
2141      if you agree to terms that obligate you to collect a royalty for
2142      further conveying from those to whom you convey the Program, the
2143      only way you could satisfy both those terms and this License would
2144      be to refrain entirely from conveying the Program.
2145
2146   13. Use with the GNU Affero General Public License.
2147
2148      Notwithstanding any other provision of this License, you have
2149      permission to link or combine any covered work with a work licensed
2150      under version 3 of the GNU Affero General Public License into a
2151      single combined work, and to convey the resulting work.  The terms
2152      of this License will continue to apply to the part which is the
2153      covered work, but the special requirements of the GNU Affero
2154      General Public License, section 13, concerning interaction through
2155      a network will apply to the combination as such.
2156
2157   14. Revised Versions of this License.
2158
2159      The Free Software Foundation may publish revised and/or new
2160      versions of the GNU General Public License from time to time.  Such
2161      new versions will be similar in spirit to the present version, but
2162      may differ in detail to address new problems or concerns.
2163
2164      Each version is given a distinguishing version number.  If the
2165      Program specifies that a certain numbered version of the GNU
2166      General Public License "or any later version" applies to it, you
2167      have the option of following the terms and conditions either of
2168      that numbered version or of any later version published by the Free
2169      Software Foundation.  If the Program does not specify a version
2170      number of the GNU General Public License, you may choose any
2171      version ever published by the Free Software Foundation.
2172
2173      If the Program specifies that a proxy can decide which future
2174      versions of the GNU General Public License can be used, that
2175      proxy's public statement of acceptance of a version permanently
2176      authorizes you to choose that version for the Program.
2177
2178      Later license versions may give you additional or different
2179      permissions.  However, no additional obligations are imposed on any
2180      author or copyright holder as a result of your choosing to follow a
2181      later version.
2182
2183   15. Disclaimer of Warranty.
2184
2185      THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
2186      APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
2187      COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
2188      WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
2189      INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2190      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
2191      RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.
2192      SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
2193      NECESSARY SERVICING, REPAIR OR CORRECTION.
2194
2195   16. Limitation of Liability.
2196
2197      IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
2198      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
2199      AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
2200      DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
2201      CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
2202      THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
2203      BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
2204      PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2205      PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
2206      THE POSSIBILITY OF SUCH DAMAGES.
2207
2208   17. Interpretation of Sections 15 and 16.
2209
2210      If the disclaimer of warranty and limitation of liability provided
2211      above cannot be given local legal effect according to their terms,
2212      reviewing courts shall apply local law that most closely
2213      approximates an absolute waiver of all civil liability in
2214      connection with the Program, unless a warranty or assumption of
2215      liability accompanies a copy of the Program in return for a fee.
2216
2217 END OF TERMS AND CONDITIONS
2218 ===========================
2219
2220 How to Apply These Terms to Your New Programs
2221 =============================================
2222
2223 If you develop a new program, and you want it to be of the greatest
2224 possible use to the public, the best way to achieve this is to make it
2225 free software which everyone can redistribute and change under these
2226 terms.
2227
2228    To do so, attach the following notices to the program.  It is safest
2229 to attach them to the start of each source file to most effectively
2230 state the exclusion of warranty; and each file should have at least the
2231 "copyright" line and a pointer to where the full notice is found.
2232
2233      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
2234      Copyright (C) YEAR NAME OF AUTHOR
2235
2236      This program is free software: you can redistribute it and/or modify
2237      it under the terms of the GNU General Public License as published by
2238      the Free Software Foundation, either version 3 of the License, or (at
2239      your option) any later version.
2240
2241      This program is distributed in the hope that it will be useful, but
2242      WITHOUT ANY WARRANTY; without even the implied warranty of
2243      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2244      General Public License for more details.
2245
2246      You should have received a copy of the GNU General Public License
2247      along with this program.  If not, see <http://www.gnu.org/licenses/>.
2248
2249    Also add information on how to contact you by electronic and paper
2250 mail.
2251
2252    If the program does terminal interaction, make it output a short
2253 notice like this when it starts in an interactive mode:
2254
2255      PROGRAM Copyright (C) YEAR NAME OF AUTHOR
2256      This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
2257      This is free software, and you are welcome to redistribute it
2258      under certain conditions; type 'show c' for details.
2259
2260    The hypothetical commands 'show w' and 'show c' should show the
2261 appropriate parts of the General Public License.  Of course, your
2262 program's commands might be different; for a GUI interface, you would
2263 use an "about box".
2264
2265    You should also get your employer (if you work as a programmer) or
2266 school, if any, to sign a "copyright disclaimer" for the program, if
2267 necessary.  For more information on this, and how to apply and follow
2268 the GNU GPL, see <http://www.gnu.org/licenses/>.
2269
2270    The GNU General Public License does not permit incorporating your
2271 program into proprietary programs.  If your program is a subroutine
2272 library, you may consider it more useful to permit linking proprietary
2273 applications with the library.  If this is what you want to do, use the
2274 GNU Lesser General Public License instead of this License.  But first,
2275 please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
2276
2277 \1f
2278 File: libgomp.info,  Node: GNU Free Documentation License,  Next: Funding,  Prev: Copying,  Up: Top
2279
2280 GNU Free Documentation License
2281 ******************************
2282
2283                      Version 1.3, 3 November 2008
2284
2285      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
2286      <http://fsf.org/>
2287
2288      Everyone is permitted to copy and distribute verbatim copies
2289      of this license document, but changing it is not allowed.
2290
2291   0. PREAMBLE
2292
2293      The purpose of this License is to make a manual, textbook, or other
2294      functional and useful document "free" in the sense of freedom: to
2295      assure everyone the effective freedom to copy and redistribute it,
2296      with or without modifying it, either commercially or
2297      noncommercially.  Secondarily, this License preserves for the
2298      author and publisher a way to get credit for their work, while not
2299      being considered responsible for modifications made by others.
2300
2301      This License is a kind of "copyleft", which means that derivative
2302      works of the document must themselves be free in the same sense.
2303      It complements the GNU General Public License, which is a copyleft
2304      license designed for free software.
2305
2306      We have designed this License in order to use it for manuals for
2307      free software, because free software needs free documentation: a
2308      free program should come with manuals providing the same freedoms
2309      that the software does.  But this License is not limited to
2310      software manuals; it can be used for any textual work, regardless
2311      of subject matter or whether it is published as a printed book.  We
2312      recommend this License principally for works whose purpose is
2313      instruction or reference.
2314
2315   1. APPLICABILITY AND DEFINITIONS
2316
2317      This License applies to any manual or other work, in any medium,
2318      that contains a notice placed by the copyright holder saying it can
2319      be distributed under the terms of this License.  Such a notice
2320      grants a world-wide, royalty-free license, unlimited in duration,
2321      to use that work under the conditions stated herein.  The
2322      "Document", below, refers to any such manual or work.  Any member
2323      of the public is a licensee, and is addressed as "you".  You accept
2324      the license if you copy, modify or distribute the work in a way
2325      requiring permission under copyright law.
2326
2327      A "Modified Version" of the Document means any work containing the
2328      Document or a portion of it, either copied verbatim, or with
2329      modifications and/or translated into another language.
2330
2331      A "Secondary Section" is a named appendix or a front-matter section
2332      of the Document that deals exclusively with the relationship of the
2333      publishers or authors of the Document to the Document's overall
2334      subject (or to related matters) and contains nothing that could
2335      fall directly within that overall subject.  (Thus, if the Document
2336      is in part a textbook of mathematics, a Secondary Section may not
2337      explain any mathematics.)  The relationship could be a matter of
2338      historical connection with the subject or with related matters, or
2339      of legal, commercial, philosophical, ethical or political position
2340      regarding them.
2341
2342      The "Invariant Sections" are certain Secondary Sections whose
2343      titles are designated, as being those of Invariant Sections, in the
2344      notice that says that the Document is released under this License.
2345      If a section does not fit the above definition of Secondary then it
2346      is not allowed to be designated as Invariant.  The Document may
2347      contain zero Invariant Sections.  If the Document does not identify
2348      any Invariant Sections then there are none.
2349
2350      The "Cover Texts" are certain short passages of text that are
2351      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
2352      that says that the Document is released under this License.  A
2353      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
2354      be at most 25 words.
2355
2356      A "Transparent" copy of the Document means a machine-readable copy,
2357      represented in a format whose specification is available to the
2358      general public, that is suitable for revising the document
2359      straightforwardly with generic text editors or (for images composed
2360      of pixels) generic paint programs or (for drawings) some widely
2361      available drawing editor, and that is suitable for input to text
2362      formatters or for automatic translation to a variety of formats
2363      suitable for input to text formatters.  A copy made in an otherwise
2364      Transparent file format whose markup, or absence of markup, has
2365      been arranged to thwart or discourage subsequent modification by
2366      readers is not Transparent.  An image format is not Transparent if
2367      used for any substantial amount of text.  A copy that is not
2368      "Transparent" is called "Opaque".
2369
2370      Examples of suitable formats for Transparent copies include plain
2371      ASCII without markup, Texinfo input format, LaTeX input format,
2372      SGML or XML using a publicly available DTD, and standard-conforming
2373      simple HTML, PostScript or PDF designed for human modification.
2374      Examples of transparent image formats include PNG, XCF and JPG.
2375      Opaque formats include proprietary formats that can be read and
2376      edited only by proprietary word processors, SGML or XML for which
2377      the DTD and/or processing tools are not generally available, and
2378      the machine-generated HTML, PostScript or PDF produced by some word
2379      processors for output purposes only.
2380
2381      The "Title Page" means, for a printed book, the title page itself,
2382      plus such following pages as are needed to hold, legibly, the
2383      material this License requires to appear in the title page.  For
2384      works in formats which do not have any title page as such, "Title
2385      Page" means the text near the most prominent appearance of the
2386      work's title, preceding the beginning of the body of the text.
2387
2388      The "publisher" means any person or entity that distributes copies
2389      of the Document to the public.
2390
2391      A section "Entitled XYZ" means a named subunit of the Document
2392      whose title either is precisely XYZ or contains XYZ in parentheses
2393      following text that translates XYZ in another language.  (Here XYZ
2394      stands for a specific section name mentioned below, such as
2395      "Acknowledgements", "Dedications", "Endorsements", or "History".)
2396      To "Preserve the Title" of such a section when you modify the
2397      Document means that it remains a section "Entitled XYZ" according
2398      to this definition.
2399
2400      The Document may include Warranty Disclaimers next to the notice
2401      which states that this License applies to the Document.  These
2402      Warranty Disclaimers are considered to be included by reference in
2403      this License, but only as regards disclaiming warranties: any other
2404      implication that these Warranty Disclaimers may have is void and
2405      has no effect on the meaning of this License.
2406
2407   2. VERBATIM COPYING
2408
2409      You may copy and distribute the Document in any medium, either
2410      commercially or noncommercially, provided that this License, the
2411      copyright notices, and the license notice saying this License
2412      applies to the Document are reproduced in all copies, and that you
2413      add no other conditions whatsoever to those of this License.  You
2414      may not use technical measures to obstruct or control the reading
2415      or further copying of the copies you make or distribute.  However,
2416      you may accept compensation in exchange for copies.  If you
2417      distribute a large enough number of copies you must also follow the
2418      conditions in section 3.
2419
2420      You may also lend copies, under the same conditions stated above,
2421      and you may publicly display copies.
2422
2423   3. COPYING IN QUANTITY
2424
2425      If you publish printed copies (or copies in media that commonly
2426      have printed covers) of the Document, numbering more than 100, and
2427      the Document's license notice requires Cover Texts, you must
2428      enclose the copies in covers that carry, clearly and legibly, all
2429      these Cover Texts: Front-Cover Texts on the front cover, and
2430      Back-Cover Texts on the back cover.  Both covers must also clearly
2431      and legibly identify you as the publisher of these copies.  The
2432      front cover must present the full title with all words of the title
2433      equally prominent and visible.  You may add other material on the
2434      covers in addition.  Copying with changes limited to the covers, as
2435      long as they preserve the title of the Document and satisfy these
2436      conditions, can be treated as verbatim copying in other respects.
2437
2438      If the required texts for either cover are too voluminous to fit
2439      legibly, you should put the first ones listed (as many as fit
2440      reasonably) on the actual cover, and continue the rest onto
2441      adjacent pages.
2442
2443      If you publish or distribute Opaque copies of the Document
2444      numbering more than 100, you must either include a machine-readable
2445      Transparent copy along with each Opaque copy, or state in or with
2446      each Opaque copy a computer-network location from which the general
2447      network-using public has access to download using public-standard
2448      network protocols a complete Transparent copy of the Document, free
2449      of added material.  If you use the latter option, you must take
2450      reasonably prudent steps, when you begin distribution of Opaque
2451      copies in quantity, to ensure that this Transparent copy will
2452      remain thus accessible at the stated location until at least one
2453      year after the last time you distribute an Opaque copy (directly or
2454      through your agents or retailers) of that edition to the public.
2455
2456      It is requested, but not required, that you contact the authors of
2457      the Document well before redistributing any large number of copies,
2458      to give them a chance to provide you with an updated version of the
2459      Document.
2460
2461   4. MODIFICATIONS
2462
2463      You may copy and distribute a Modified Version of the Document
2464      under the conditions of sections 2 and 3 above, provided that you
2465      release the Modified Version under precisely this License, with the
2466      Modified Version filling the role of the Document, thus licensing
2467      distribution and modification of the Modified Version to whoever
2468      possesses a copy of it.  In addition, you must do these things in
2469      the Modified Version:
2470
2471        A. Use in the Title Page (and on the covers, if any) a title
2472           distinct from that of the Document, and from those of previous
2473           versions (which should, if there were any, be listed in the
2474           History section of the Document).  You may use the same title
2475           as a previous version if the original publisher of that
2476           version gives permission.
2477
2478        B. List on the Title Page, as authors, one or more persons or
2479           entities responsible for authorship of the modifications in
2480           the Modified Version, together with at least five of the
2481           principal authors of the Document (all of its principal
2482           authors, if it has fewer than five), unless they release you
2483           from this requirement.
2484
2485        C. State on the Title page the name of the publisher of the
2486           Modified Version, as the publisher.
2487
2488        D. Preserve all the copyright notices of the Document.
2489
2490        E. Add an appropriate copyright notice for your modifications
2491           adjacent to the other copyright notices.
2492
2493        F. Include, immediately after the copyright notices, a license
2494           notice giving the public permission to use the Modified
2495           Version under the terms of this License, in the form shown in
2496           the Addendum below.
2497
2498        G. Preserve in that license notice the full lists of Invariant
2499           Sections and required Cover Texts given in the Document's
2500           license notice.
2501
2502        H. Include an unaltered copy of this License.
2503
2504        I. Preserve the section Entitled "History", Preserve its Title,
2505           and add to it an item stating at least the title, year, new
2506           authors, and publisher of the Modified Version as given on the
2507           Title Page.  If there is no section Entitled "History" in the
2508           Document, create one stating the title, year, authors, and
2509           publisher of the Document as given on its Title Page, then add
2510           an item describing the Modified Version as stated in the
2511           previous sentence.
2512
2513        J. Preserve the network location, if any, given in the Document
2514           for public access to a Transparent copy of the Document, and
2515           likewise the network locations given in the Document for
2516           previous versions it was based on.  These may be placed in the
2517           "History" section.  You may omit a network location for a work
2518           that was published at least four years before the Document
2519           itself, or if the original publisher of the version it refers
2520           to gives permission.
2521
2522        K. For any section Entitled "Acknowledgements" or "Dedications",
2523           Preserve the Title of the section, and preserve in the section
2524           all the substance and tone of each of the contributor
2525           acknowledgements and/or dedications given therein.
2526
2527        L. Preserve all the Invariant Sections of the Document, unaltered
2528           in their text and in their titles.  Section numbers or the
2529           equivalent are not considered part of the section titles.
2530
2531        M. Delete any section Entitled "Endorsements".  Such a section
2532           may not be included in the Modified Version.
2533
2534        N. Do not retitle any existing section to be Entitled
2535           "Endorsements" or to conflict in title with any Invariant
2536           Section.
2537
2538        O. Preserve any Warranty Disclaimers.
2539
2540      If the Modified Version includes new front-matter sections or
2541      appendices that qualify as Secondary Sections and contain no
2542      material copied from the Document, you may at your option designate
2543      some or all of these sections as invariant.  To do this, add their
2544      titles to the list of Invariant Sections in the Modified Version's
2545      license notice.  These titles must be distinct from any other
2546      section titles.
2547
2548      You may add a section Entitled "Endorsements", provided it contains
2549      nothing but endorsements of your Modified Version by various
2550      parties--for example, statements of peer review or that the text
2551      has been approved by an organization as the authoritative
2552      definition of a standard.
2553
2554      You may add a passage of up to five words as a Front-Cover Text,
2555      and a passage of up to 25 words as a Back-Cover Text, to the end of
2556      the list of Cover Texts in the Modified Version.  Only one passage
2557      of Front-Cover Text and one of Back-Cover Text may be added by (or
2558      through arrangements made by) any one entity.  If the Document
2559      already includes a cover text for the same cover, previously added
2560      by you or by arrangement made by the same entity you are acting on
2561      behalf of, you may not add another; but you may replace the old
2562      one, on explicit permission from the previous publisher that added
2563      the old one.
2564
2565      The author(s) and publisher(s) of the Document do not by this
2566      License give permission to use their names for publicity for or to
2567      assert or imply endorsement of any Modified Version.
2568
2569   5. COMBINING DOCUMENTS
2570
2571      You may combine the Document with other documents released under
2572      this License, under the terms defined in section 4 above for
2573      modified versions, provided that you include in the combination all
2574      of the Invariant Sections of all of the original documents,
2575      unmodified, and list them all as Invariant Sections of your
2576      combined work in its license notice, and that you preserve all
2577      their Warranty Disclaimers.
2578
2579      The combined work need only contain one copy of this License, and
2580      multiple identical Invariant Sections may be replaced with a single
2581      copy.  If there are multiple Invariant Sections with the same name
2582      but different contents, make the title of each such section unique
2583      by adding at the end of it, in parentheses, the name of the
2584      original author or publisher of that section if known, or else a
2585      unique number.  Make the same adjustment to the section titles in
2586      the list of Invariant Sections in the license notice of the
2587      combined work.
2588
2589      In the combination, you must combine any sections Entitled
2590      "History" in the various original documents, forming one section
2591      Entitled "History"; likewise combine any sections Entitled
2592      "Acknowledgements", and any sections Entitled "Dedications".  You
2593      must delete all sections Entitled "Endorsements."
2594
2595   6. COLLECTIONS OF DOCUMENTS
2596
2597      You may make a collection consisting of the Document and other
2598      documents released under this License, and replace the individual
2599      copies of this License in the various documents with a single copy
2600      that is included in the collection, provided that you follow the
2601      rules of this License for verbatim copying of each of the documents
2602      in all other respects.
2603
2604      You may extract a single document from such a collection, and
2605      distribute it individually under this License, provided you insert
2606      a copy of this License into the extracted document, and follow this
2607      License in all other respects regarding verbatim copying of that
2608      document.
2609
2610   7. AGGREGATION WITH INDEPENDENT WORKS
2611
2612      A compilation of the Document or its derivatives with other
2613      separate and independent documents or works, in or on a volume of a
2614      storage or distribution medium, is called an "aggregate" if the
2615      copyright resulting from the compilation is not used to limit the
2616      legal rights of the compilation's users beyond what the individual
2617      works permit.  When the Document is included in an aggregate, this
2618      License does not apply to the other works in the aggregate which
2619      are not themselves derivative works of the Document.
2620
2621      If the Cover Text requirement of section 3 is applicable to these
2622      copies of the Document, then if the Document is less than one half
2623      of the entire aggregate, the Document's Cover Texts may be placed
2624      on covers that bracket the Document within the aggregate, or the
2625      electronic equivalent of covers if the Document is in electronic
2626      form.  Otherwise they must appear on printed covers that bracket
2627      the whole aggregate.
2628
2629   8. TRANSLATION
2630
2631      Translation is considered a kind of modification, so you may
2632      distribute translations of the Document under the terms of section
2633      4.  Replacing Invariant Sections with translations requires special
2634      permission from their copyright holders, but you may include
2635      translations of some or all Invariant Sections in addition to the
2636      original versions of these Invariant Sections.  You may include a
2637      translation of this License, and all the license notices in the
2638      Document, and any Warranty Disclaimers, provided that you also
2639      include the original English version of this License and the
2640      original versions of those notices and disclaimers.  In case of a
2641      disagreement between the translation and the original version of
2642      this License or a notice or disclaimer, the original version will
2643      prevail.
2644
2645      If a section in the Document is Entitled "Acknowledgements",
2646      "Dedications", or "History", the requirement (section 4) to
2647      Preserve its Title (section 1) will typically require changing the
2648      actual title.
2649
2650   9. TERMINATION
2651
2652      You may not copy, modify, sublicense, or distribute the Document
2653      except as expressly provided under this License.  Any attempt
2654      otherwise to copy, modify, sublicense, or distribute it is void,
2655      and will automatically terminate your rights under this License.
2656
2657      However, if you cease all violation of this License, then your
2658      license from a particular copyright holder is reinstated (a)
2659      provisionally, unless and until the copyright holder explicitly and
2660      finally terminates your license, and (b) permanently, if the
2661      copyright holder fails to notify you of the violation by some
2662      reasonable means prior to 60 days after the cessation.
2663
2664      Moreover, your license from a particular copyright holder is
2665      reinstated permanently if the copyright holder notifies you of the
2666      violation by some reasonable means, this is the first time you have
2667      received notice of violation of this License (for any work) from
2668      that copyright holder, and you cure the violation prior to 30 days
2669      after your receipt of the notice.
2670
2671      Termination of your rights under this section does not terminate
2672      the licenses of parties who have received copies or rights from you
2673      under this License.  If your rights have been terminated and not
2674      permanently reinstated, receipt of a copy of some or all of the
2675      same material does not give you any rights to use it.
2676
2677   10. FUTURE REVISIONS OF THIS LICENSE
2678
2679      The Free Software Foundation may publish new, revised versions of
2680      the GNU Free Documentation License from time to time.  Such new
2681      versions will be similar in spirit to the present version, but may
2682      differ in detail to address new problems or concerns.  See
2683      <http://www.gnu.org/copyleft/>.
2684
2685      Each version of the License is given a distinguishing version
2686      number.  If the Document specifies that a particular numbered
2687      version of this License "or any later version" applies to it, you
2688      have the option of following the terms and conditions either of
2689      that specified version or of any later version that has been
2690      published (not as a draft) by the Free Software Foundation.  If the
2691      Document does not specify a version number of this License, you may
2692      choose any version ever published (not as a draft) by the Free
2693      Software Foundation.  If the Document specifies that a proxy can
2694      decide which future versions of this License can be used, that
2695      proxy's public statement of acceptance of a version permanently
2696      authorizes you to choose that version for the Document.
2697
2698   11. RELICENSING
2699
2700      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
2701      World Wide Web server that publishes copyrightable works and also
2702      provides prominent facilities for anybody to edit those works.  A
2703      public wiki that anybody can edit is an example of such a server.
2704      A "Massive Multiauthor Collaboration" (or "MMC") contained in the
2705      site means any set of copyrightable works thus published on the MMC
2706      site.
2707
2708      "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
2709      license published by Creative Commons Corporation, a not-for-profit
2710      corporation with a principal place of business in San Francisco,
2711      California, as well as future copyleft versions of that license
2712      published by that same organization.
2713
2714      "Incorporate" means to publish or republish a Document, in whole or
2715      in part, as part of another Document.
2716
2717      An MMC is "eligible for relicensing" if it is licensed under this
2718      License, and if all works that were first published under this
2719      License somewhere other than this MMC, and subsequently
2720      incorporated in whole or in part into the MMC, (1) had no cover
2721      texts or invariant sections, and (2) were thus incorporated prior
2722      to November 1, 2008.
2723
2724      The operator of an MMC Site may republish an MMC contained in the
2725      site under CC-BY-SA on the same site at any time before August 1,
2726      2009, provided the MMC is eligible for relicensing.
2727
2728 ADDENDUM: How to use this License for your documents
2729 ====================================================
2730
2731 To use this License in a document you have written, include a copy of
2732 the License in the document and put the following copyright and license
2733 notices just after the title page:
2734
2735        Copyright (C)  YEAR  YOUR NAME.
2736        Permission is granted to copy, distribute and/or modify this document
2737        under the terms of the GNU Free Documentation License, Version 1.3
2738        or any later version published by the Free Software Foundation;
2739        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
2740        Texts.  A copy of the license is included in the section entitled ``GNU
2741        Free Documentation License''.
2742
2743    If you have Invariant Sections, Front-Cover Texts and Back-Cover
2744 Texts, replace the "with...Texts."  line with this:
2745
2746          with the Invariant Sections being LIST THEIR TITLES, with
2747          the Front-Cover Texts being LIST, and with the Back-Cover Texts
2748          being LIST.
2749
2750    If you have Invariant Sections without Cover Texts, or some other
2751 combination of the three, merge those two alternatives to suit the
2752 situation.
2753
2754    If your document contains nontrivial examples of program code, we
2755 recommend releasing these examples in parallel under your choice of free
2756 software license, such as the GNU General Public License, to permit
2757 their use in free software.
2758
2759 \1f
2760 File: libgomp.info,  Node: Funding,  Next: Library Index,  Prev: GNU Free Documentation License,  Up: Top
2761
2762 Funding Free Software
2763 *********************
2764
2765 If you want to have more free software a few years from now, it makes
2766 sense for you to help encourage people to contribute funds for its
2767 development.  The most effective approach known is to encourage
2768 commercial redistributors to donate.
2769
2770    Users of free software systems can boost the pace of development by
2771 encouraging for-a-fee distributors to donate part of their selling price
2772 to free software developers--the Free Software Foundation, and others.
2773
2774    The way to convince distributors to do this is to demand it and
2775 expect it from them.  So when you compare distributors, judge them
2776 partly by how much they give to free software development.  Show
2777 distributors they must compete to be the one who gives the most.
2778
2779    To make this approach work, you must insist on numbers that you can
2780 compare, such as, "We will donate ten dollars to the Frobnitz project
2781 for each disk sold."  Don't be satisfied with a vague promise, such as
2782 "A portion of the profits are donated," since it doesn't give a basis
2783 for comparison.
2784
2785    Even a precise fraction "of the profits from this disk" is not very
2786 meaningful, since creative accounting and unrelated business decisions
2787 can greatly alter what fraction of the sales price counts as profit.  If
2788 the price you pay is $50, ten percent of the profit is probably less
2789 than a dollar; it might be a few cents, or nothing at all.
2790
2791    Some redistributors do development work themselves.  This is useful
2792 too; but to keep everyone honest, you need to inquire how much they do,
2793 and what kind.  Some kinds of development make much more long-term
2794 difference than others.  For example, maintaining a separate version of
2795 a program contributes very little; maintaining the standard version of a
2796 program for the whole community contributes much.  Easy new ports
2797 contribute little, since someone else would surely do them; difficult
2798 ports such as adding a new CPU to the GNU Compiler Collection contribute
2799 more; major new features or packages contribute the most.
2800
2801    By establishing the idea that supporting further development is "the
2802 proper thing to do" when distributing free software for a fee, we can
2803 assure a steady flow of resources into making more free software.
2804
2805      Copyright (C) 1994 Free Software Foundation, Inc.
2806      Verbatim copying and redistribution of this section is permitted
2807      without royalty; alteration is not permitted.
2808
2809 \1f
2810 File: libgomp.info,  Node: Library Index,  Prev: Funding,  Up: Top
2811
2812 Library Index
2813 *************
2814
2815 \0\b[index\0\b]
2816 * Menu:
2817
2818 * Environment Variable:                  OMP_DYNAMIC.           (line 6)
2819 * Environment Variable <1>:              OMP_MAX_ACTIVE_LEVELS. (line 6)
2820 * Environment Variable <2>:              OMP_NESTED.            (line 6)
2821 * Environment Variable <3>:              OMP_NUM_THREADS.       (line 6)
2822 * Environment Variable <4>:              OMP_SCHEDULE.          (line 6)
2823 * Environment Variable <5>:              OMP_STACKSIZE.         (line 6)
2824 * Environment Variable <6>:              OMP_THREAD_LIMIT.      (line 6)
2825 * Environment Variable <7>:              OMP_WAIT_POLICY.       (line 6)
2826 * Environment Variable <8>:              OMP_PROC_BIND.         (line 6)
2827 * Environment Variable <9>:              GOMP_CPU_AFFINITY.     (line 6)
2828 * Environment Variable <10>:             GOMP_STACKSIZE.        (line 6)
2829 * FDL, GNU Free Documentation License:   GNU Free Documentation License.
2830                                                                 (line 6)
2831 * Implementation specific setting:       OMP_NESTED.            (line 6)
2832 * Implementation specific setting <1>:   OMP_NUM_THREADS.       (line 6)
2833 * Implementation specific setting <2>:   OMP_SCHEDULE.          (line 6)
2834 * Implementation specific setting <3>:   GOMP_STACKSIZE.        (line 6)
2835 * Introduction:                          Top.                   (line 6)
2836
2837
2838 \1f
2839 Tag Table:
2840 Node: Top\7f1992
2841 Node: Enabling OpenMP\7f3186
2842 Node: Runtime Library Routines\7f3973
2843 Node: omp_get_active_level\7f6422
2844 Node: omp_get_ancestor_thread_num\7f7128
2845 Node: omp_get_dynamic\7f8059
2846 Node: omp_get_level\7f8940
2847 Node: omp_get_max_active_levels\7f9566
2848 Node: omp_get_max_threads\7f10271
2849 Node: omp_get_nested\7f11029
2850 Node: omp_get_num_procs\7f11945
2851 Node: omp_get_num_threads\7f12465
2852 Node: omp_get_schedule\7f13552
2853 Node: omp_get_team_size\7f14479
2854 Node: omp_get_thread_limit\7f15445
2855 Node: omp_get_thread_num\7f16070
2856 Node: omp_in_parallel\7f16942
2857 Node: omp_in_final\7f17592
2858 Node: omp_set_dynamic\7f18266
2859 Node: omp_set_max_active_levels\7f19107
2860 Node: omp_set_nested\7f19890
2861 Node: omp_set_num_threads\7f20773
2862 Node: omp_set_schedule\7f21612
2863 Node: omp_init_lock\7f22691
2864 Node: omp_set_lock\7f23345
2865 Node: omp_test_lock\7f24201
2866 Node: omp_unset_lock\7f25178
2867 Node: omp_destroy_lock\7f26110
2868 Node: omp_init_nest_lock\7f26788
2869 Node: omp_set_nest_lock\7f27524
2870 Node: omp_test_nest_lock\7f28440
2871 Node: omp_unset_nest_lock\7f29468
2872 Node: omp_destroy_nest_lock\7f30484
2873 Node: omp_get_wtick\7f31236
2874 Node: omp_get_wtime\7f31829
2875 Node: Environment Variables\7f32606
2876 Node: OMP_DYNAMIC\7f33734
2877 Node: OMP_MAX_ACTIVE_LEVELS\7f34304
2878 Node: OMP_NESTED\7f34944
2879 Node: OMP_NUM_THREADS\7f35550
2880 Node: OMP_SCHEDULE\7f36238
2881 Node: OMP_STACKSIZE\7f36932
2882 Node: OMP_THREAD_LIMIT\7f37762
2883 Node: OMP_WAIT_POLICY\7f38360
2884 Node: OMP_PROC_BIND\7f38922
2885 Node: GOMP_CPU_AFFINITY\7f39481
2886 Node: GOMP_STACKSIZE\7f41026
2887 Node: The libgomp ABI\7f41839
2888 Node: Implementing MASTER construct\7f42638
2889 Node: Implementing CRITICAL construct\7f43052
2890 Node: Implementing ATOMIC construct\7f43791
2891 Node: Implementing FLUSH construct\7f44272
2892 Node: Implementing BARRIER construct\7f44543
2893 Node: Implementing THREADPRIVATE construct\7f44812
2894 Node: Implementing PRIVATE clause\7f45465
2895 Node: Implementing FIRSTPRIVATE LASTPRIVATE COPYIN and COPYPRIVATE clauses\7f46046
2896 Node: Implementing REDUCTION clause\7f47370
2897 Node: Implementing PARALLEL construct\7f47927
2898 Node: Implementing FOR construct\7f49184
2899 Node: Implementing ORDERED construct\7f51182
2900 Node: Implementing SECTIONS construct\7f51488
2901 Node: Implementing SINGLE construct\7f52254
2902 Node: Reporting Bugs\7f52916
2903 Node: Copying\7f53226
2904 Node: GNU Free Documentation License\7f90772
2905 Node: Funding\7f115894
2906 Node: Library Index\7f118420
2907 \1f
2908 End Tag Table