@@ -1,5 +1,8 @@
2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
+ * invoke.texi: Update for OpenACC.
+ * sourcebuild.texi: Likewise.
+
* tree.def (OACC_WAIT): Remove. Update all users.
* omp-builtins.def (BUILT_IN_OMP_SET_NUM_THREADS): Remove.
@@ -1872,8 +1872,8 @@ freestanding and hosted environments.
@item -fopenacc
@opindex fopenacc
@cindex OpenACC accelerator programming
-Enable handling of OpenACC directives @code{#pragma acc} in C.
-When @option{-fopenacc} is specified, the
+Enable handling of OpenACC directives @code{#pragma acc} in C/C++ and
+@code{!$acc} in Fortran. When @option{-fopenacc} is specified, the
compiler generates accelerated code according to the OpenACC Application
Programming Interface v2.0 @w{@uref{http://www.openacc.org/}}. This option
implies @option{-pthread}, and thus is only supported on targets that
@@ -89,7 +89,7 @@ The Go runtime library. The bulk of this library is mirrored from the
@uref{http://code.google.com/@/p/@/go/, master Go repository}.
@item libgomp
-The GNU OpenMP runtime library.
+The GNU OpenACC and OpenMP runtime library.
@item libiberty
The @code{libiberty} library, used for portability and for some
@@ -1,3 +1,9 @@
+2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gfortran.texi: Update for OpenACC.
+ * intrinsic.texi: Likewise.
+ * invoke.texi: Likewise.
+
2014-11-04 Cesar Philippidis <cesar@codesourcery.com>
* gfortran.h (ST_OACC_ROUTINE): New statement enum.
@@ -474,7 +474,8 @@ The GNU Fortran compiler is able to compile nearly all
standard-compliant Fortran 95, Fortran 90, and Fortran 77 programs,
including a number of standard and non-standard extensions, and can be
used on real-world programs. In particular, the supported extensions
-include OpenMP, Cray-style pointers, and several Fortran 2003 and Fortran
+include OpenACC, OpenMP, Cray-style pointers, and several Fortran 2003
+and Fortran
2008 features, including TR 15581. However, it is still under
development and has a few remaining rough edges.
@@ -531,7 +532,8 @@ The current status of the support is can be found in the
@ref{Fortran 2003 status}, @ref{Fortran 2008 status} and
@ref{TS 29113 status} sections of the documentation.
-Additionally, the GNU Fortran compilers supports the OpenMP specification
+Additionally, the GNU Fortran compilers supports the OpenACC specification
+(version 2.0, @url{http://www.openacc.org/}), and OpenMP specification
(version 4.0, @url{http://openmp.org/@/wp/@/openmp-specifications/}).
@node Varying Length Character Strings
@@ -963,7 +965,8 @@ module.
@cindex statement, @code{ISO_FORTRAN_ENV}
@code{USE} statement with @code{INTRINSIC} and @code{NON_INTRINSIC}
attribute; supported intrinsic modules: @code{ISO_FORTRAN_ENV},
-@code{ISO_C_BINDING}, @code{OMP_LIB} and @code{OMP_LIB_KINDS}.
+@code{ISO_C_BINDING}, @code{OMP_LIB} and @code{OMP_LIB_KINDS},
+and @code{OPENACC}.
@item
Renaming of operators in the @code{USE} statement.
@@ -1358,6 +1361,7 @@ without warning.
* Hollerith constants support::
* Cray pointers::
* CONVERT specifier::
+* OpenACC::
* OpenMP::
* Argument list functions::
@end menu
@@ -1873,6 +1877,32 @@ carries a significant speed overhead. If speed in this area matters
to you, it is best if you use this only for data that needs to be
portable.
+@node OpenACC
+@subsection OpenACC
+@cindex OpenACC
+
+OpenACC is an application programming interface (API) that supports
+offloading of code to accelerator devices. It consists of a set of
+compiler directives, library routines, and environment variables that
+influence run-time behavior.
+
+GNU Fortran strives to be compatible to the
+@uref{http://www.openacc.org/, OpenACC Application Programming
+Interface v2.0}.
+
+To enable the processing of the OpenACC directive @code{!$acc} in
+free-form source code; the @code{c$acc}, @code{*$acc} and @code{!$acc}
+directives in fixed form; the @code{!$} conditional compilation
+sentinels in free form; and the @code{c$}, @code{*$} and @code{!$}
+sentinels in fixed form, @command{gfortran} needs to be invoked with
+the @option{-fopenacc}. This also arranges for automatic linking of
+the GNU OpenACC runtime library @ref{Top,,libgomp,libgomp,GNU OpenACC
+and OpenMP runtime library}.
+
+The OpenACC Fortran runtime library routines are provided both in a
+form of a Fortran 90 module named @code{openacc} and in a form of a
+Fortran @code{include} file named @file{openacc_lib.h}.
+
@node OpenMP
@subsection OpenMP
@cindex OpenMP
@@ -1894,7 +1924,7 @@ directives in fixed form; the @code{!$} conditional compilation sentinels
in free form; and the @code{c$}, @code{*$} and @code{!$} sentinels
in fixed form, @command{gfortran} needs to be invoked with the
@option{-fopenmp}. This also arranges for automatic linking of the
-GNU OpenMP runtime library @ref{Top,,libgomp,libgomp,GNU OpenMP
+GNU OpenMP runtime library @ref{Top,,libgomp,libgomp,GNU OpenACC and OpenMP
runtime library}.
The OpenMP Fortran runtime library routines are provided both in a
@@ -13773,6 +13773,7 @@ Fortran 95 elemental function: @ref{IEOR}
* ISO_FORTRAN_ENV::
* ISO_C_BINDING::
* IEEE modules::
+* OpenACC Module OPENACC::
* OpenMP Modules OMP_LIB and OMP_LIB_KINDS::
@end menu
@@ -14018,6 +14019,33 @@ with the following options: @code{-fno-unsafe-math-optimizations
-frounding-math -fsignaling-nans}.
+
+@node OpenACC Module OPENACC
+@section OpenACC Module @code{OPENACC}
+@table @asis
+@item @emph{Standard}:
+OpenACC Application Programming Interface v2.0
+@end table
+
+
+The OpenACC Fortran runtime library routines are provided both in a
+form of a Fortran 90 module, named @code{OPENACC}, and in form of a
+Fortran @code{include} file named @file{openacc_lib.h}. The
+procedures provided by @code{OPENACC} can be found in the
+@ref{Top,,Introduction,libgomp,GNU OpenACC and OpenMP runtime library}
+manual, the named constants defined in the modules are listed below.
+
+For details refer to the actual
+@uref{http://www.openacc.org/,
+OpenACC Application Programming Interface v2.0}.
+
+@code{OPENACC} provides the scalar default-integer
+named constant @code{openacc_version} with a value of the form
+@var{yyyymm}, where @code{yyyy} is the year and @var{mm} the month
+of the OpenACC version; for OpenACC v2.0 the value is @code{201306}.
+
+
+
@node OpenMP Modules OMP_LIB and OMP_LIB_KINDS
@section OpenMP Modules @code{OMP_LIB} and @code{OMP_LIB_KINDS}
@table @asis
@@ -14030,7 +14058,8 @@ The OpenMP Fortran runtime library routines are provided both in
a form of two Fortran 90 modules, named @code{OMP_LIB} and
@code{OMP_LIB_KINDS}, and in a form of a Fortran @code{include} file named
@file{omp_lib.h}. The procedures provided by @code{OMP_LIB} can be found
-in the @ref{Top,,Introduction,libgomp,GNU OpenMP runtime library} manual,
+in the @ref{Top,,Introduction,libgomp,GNU OpenACC and OpenMP runtime
+library} manual,
the named constants defined in the modules are listed
below.
@@ -305,7 +305,12 @@ functionality.
@item -fopenacc
@opindex @code{fopenacc}
@cindex OpenACC
-Enable the OpenACC extensions.
+Enable the OpenACC extensions. This includes OpenACC @code{!$acc}
+directives in free form and @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, and when linking arranges for the
+OpenACC runtime library to be linked in.
@item -fopenmp
@opindex @code{fopenmp}
@@ -1,5 +1,7 @@
2014-11-05 Thomas Schwinge <thomas@codesourcery.com>
+ * libgomp.texi: Update for OpenACC.
+
* target.h (struct ACC_dispatch_t): Remove avail_func. Update all
users.
* oacc-host.c (openacc_avail): Likewise.
@@ -122,9 +122,13 @@ for multi-platform shared-memory parallel programming in C/C++ and Fortran.
@chapter Enabling OpenACC
To activate the OpenACC extensions for C/C++ and Fortran, the compile-time
-flag @command{-fopenacc} must be specified. This enables OpenACC, and
+flag @command{-fopenacc} must be specified. This enables the OpenACC directive
+@code{#pragma acc} in C/C++ and @code{!$accp} 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{Runtime Library Routines}).
+(@ref{OpenACC Runtime Library Routines}).
A complete description of all OpenACC directives accepted may be found in
the @uref{http://www.openacc.org/, OpenMP Application Programming
@@ -171,11 +175,9 @@ acceleration device.
* acc_is_present::
* acc_memcpy_to_device::
* acc_memcpy_from_device::
-@end menu
API routines for target platforms.
-@menu
* acc_get_current_cuda_device::
* acc_get_current_cuda_context::
* acc_get_cuda_stream::