diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2023-10-15 23:10:17 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2023-10-15 23:10:17 +0200 |
commit | 643a5223f1a1860a88c215d715f079d7f846843c (patch) | |
tree | 0f5e30d8f5c1397f090063abc6077f239d0483f7 /libgomp | |
parent | 67f5d368a5b0b63025e7f92b1936d80d4ea2b234 (diff) | |
download | gcc-643a5223f1a1860a88c215d715f079d7f846843c.zip gcc-643a5223f1a1860a88c215d715f079d7f846843c.tar.gz gcc-643a5223f1a1860a88c215d715f079d7f846843c.tar.bz2 |
libgomp.texi: Update "Enabling OpenMP" + OpenACC / invoke.texi: -fopenacc/-fopenmp update
The OpenACC specification does not mention the '!$ ' sentinel for conditional
compilation and the feature was removed in r11-5572-g1d6f6ac693a860
for PR fortran/98011; update libgomp.texi for this and update a leftover
comment. - Additionally, some other updates are done as well.
libgomp/
* libgomp.texi (Enabling OpenMP): Update for C/C++ attributes;
improve wording especially for Fortran; mention -fopenmp-simd.
(Enabling OpenACC): Minor cleanup; remove conditional compilation
sentinel.
gcc/
* doc/invoke.texi (-fopenacc, -fopenmp, -fopenmp-simd): Use @samp not
@code; document more completely the supported Fortran sentinels.
gcc/fortran
* scanner.cc (skip_free_comments, skip_fixed_comments): Remove
leftover 'OpenACC' from comments about OpenMP's conditional
compilation sentinel.
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/libgomp.texi | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index dfe96f5..02f2d0e 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -136,15 +136,22 @@ changed to GNU Offloading and Multi Processing Runtime Library. @node Enabling OpenMP @chapter Enabling OpenMP -To activate the OpenMP extensions for C/C++ and Fortran, the compile-time -flag @command{-fopenmp} must be specified. This enables the OpenMP directive -@code{#pragma omp} in C/C++ and @code{!$omp} directives in free form, -@code{c$omp}, @code{*$omp} and @code{!$omp} directives in fixed form, -@code{!$} conditional compilation sentinels in free form and @code{c$}, -@code{*$} and @code{!$} sentinels in fixed form, for Fortran. The flag also -arranges for automatic linking of the OpenMP runtime library +To activate the OpenMP extensions for C/C++ and Fortran, the compile-time +flag @option{-fopenmp} must be specified. For C and C++, this enables +the handling of the OpenMP directives using @code{#pragma omp} and, for C++, the +@code{[[omp::directive(...)]]}, @code{[[omp::sequence(...)]]} and +@code{[[omp::decl(...)]]} attributes. For Fortran, it enables for +free source form the @code{!$omp} sentinel for directives and the +@code{!$} conditional compilation sentinel and for fixed source form the +@code{c$omp}, @code{*$omp} and @code{!$omp} sentinels for directives and +the @code{c$}, @code{*$} and @code{!$} conditional compilation sentinels. +The flag also arranges for automatic linking of the OpenMP runtime library (@ref{Runtime Library Routines}). +The @option{-fopenmp-simd} flag can be used to enable a subset of +OpenMP directives that do not require the linking of either the +OpenMP runtime library or the POSIX threads library. + A complete description of all OpenMP directives may be found in the @uref{https://www.openmp.org, OpenMP Application Program Interface} manuals. See also @ref{OpenMP Implementation Status}. @@ -3697,12 +3704,10 @@ pools available and their worker threads run at priority four. To activate the OpenACC extensions for C/C++ and Fortran, the compile-time flag @option{-fopenacc} must be specified. This enables the OpenACC directive -@code{#pragma acc} in C/C++ and @code{!$acc} directives in free form, -@code{c$acc}, @code{*$acc} and @code{!$acc} directives in fixed form, -@code{!$} conditional compilation sentinels in free form and @code{c$}, -@code{*$} and @code{!$} sentinels in fixed form, for Fortran. The flag also -arranges for automatic linking of the OpenACC runtime library -(@ref{OpenACC Runtime Library Routines}). +@samp{#pragma acc} in C/C++ and, in Fortran, the @samp{!$acc} sentinel in free +source form and the @samp{c$acc}, @samp{*$acc} and @samp{!$acc} sentinels in +fixed source form. The flag also arranges for automatic linking of the OpenACC +runtime library (@ref{OpenACC Runtime Library Routines}). See @uref{https://gcc.gnu.org/wiki/OpenACC} for more information. |