Commit 1cb62d16 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/68850 (Coarray events: EVENT_QUERY not documented as intrinsic subroutine)

2014-12-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/68850
        * gfortran.texi (Standards): Mention TS 18508.
        (Fortran 2003 and 2008 Status): Add section on TS 18508 status.
        * intrinsic.texi (EVENT_QUERY): Add.

From-SVN: r231631
parent 0482b001
2014-12-14 Tobias Burnus <burnus@net-b.de>
PR fortran/68850
* gfortran.texi (Standards): Mention TS 18508.
(Fortran 2003 and 2008 Status): Add section on TS 18508 status.
* intrinsic.texi (EVENT_QUERY): Add.
2014-12-12 Tobias Burnus <burnus@net-b.de> 2014-12-12 Tobias Burnus <burnus@net-b.de>
PR fortran/45859 PR fortran/45859
......
...@@ -532,8 +532,8 @@ GNU Fortran also have a partial support for ISO/IEC 1539-1:2004 (Fortran ...@@ -532,8 +532,8 @@ GNU Fortran also have a partial support for ISO/IEC 1539-1:2004 (Fortran
@code{Further Interoperability of Fortran with C} (ISO/IEC TS 29113:2012). @code{Further Interoperability of Fortran with C} (ISO/IEC TS 29113:2012).
Full support of those standards and future Fortran standards is planned. Full support of those standards and future Fortran standards is planned.
The current status of the support is can be found in the The current status of the support is can be found in the
@ref{Fortran 2003 status}, @ref{Fortran 2008 status} and @ref{Fortran 2003 status}, @ref{Fortran 2008 status}, @ref{TS 29113 status}
@ref{TS 29113 status} sections of the documentation. and @ref{TS 18508 status} sections of the documentation.
Additionally, the GNU Fortran compilers supports the OpenMP specification Additionally, the GNU Fortran compilers supports the OpenMP specification
(version 4.0, @url{http://openmp.org/@/wp/@/openmp-specifications/}). (version 4.0, @url{http://openmp.org/@/wp/@/openmp-specifications/}).
...@@ -801,6 +801,7 @@ compile option was used. ...@@ -801,6 +801,7 @@ compile option was used.
* Fortran 2003 status:: * Fortran 2003 status::
* Fortran 2008 status:: * Fortran 2008 status::
* TS 29113 status:: * TS 29113 status::
* TS 18508 status::
@end menu @end menu
@node Fortran 2003 status @node Fortran 2003 status
...@@ -1130,6 +1131,23 @@ of the TS is not yet supported. ...@@ -1130,6 +1131,23 @@ of the TS is not yet supported.
@end itemize @end itemize
@node TS 18508 status
@section Technical Specification 18508 Status
GNU Fortran supports the following new features of the Technical
Specification 18508 on Additional Parallel Features in Fortran:
@itemize
@item The new atomic ADD, CAS, FETCH and ADD/OR/XOR, OR and XOR intrinsics.
@item The @code{CO_MIN} and @code{CO_MAX} and @code{SUM} reduction intrinsics.
And the @code{CO_BROADCAST} and @code{CO_REDUCE} intrinsic, except that those
do not support polymorphic types or types with allocatable, pointer or
polymorphic components.
@item Events (@code{EVENT POST}, @code{EVENT WAIT}, @code{EVENT_QUERY})
@end itemize
@c --------------------------------------------------------------------- @c ---------------------------------------------------------------------
@c Compiler Characteristics @c Compiler Characteristics
......
...@@ -128,6 +128,7 @@ Some basic guidelines for editing this document: ...@@ -128,6 +128,7 @@ Some basic guidelines for editing this document:
* @code{ERFC}: ERFC, Complementary error function * @code{ERFC}: ERFC, Complementary error function
* @code{ERFC_SCALED}: ERFC_SCALED, Exponentially-scaled complementary error function * @code{ERFC_SCALED}: ERFC_SCALED, Exponentially-scaled complementary error function
* @code{ETIME}: ETIME, Execution time subroutine (or function) * @code{ETIME}: ETIME, Execution time subroutine (or function)
* @code{EVENT_QUERY}: EVENT_QUERY, Query whether a coarray event has occurred
* @code{EXECUTE_COMMAND_LINE}: EXECUTE_COMMAND_LINE, Execute a shell command * @code{EXECUTE_COMMAND_LINE}: EXECUTE_COMMAND_LINE, Execute a shell command
* @code{EXIT}: EXIT, Exit the program with status. * @code{EXIT}: EXIT, Exit the program with status.
* @code{EXP}: EXP, Exponential function * @code{EXP}: EXP, Exponential function
...@@ -5063,6 +5064,57 @@ end program test_etime ...@@ -5063,6 +5064,57 @@ end program test_etime
@node EVENT_QUERY
@section @code{EVENT_QUERY} --- Query whether a coarray event has occurred
@fnindex EVENT_QUERY
@cindex Events, EVENT_QUERY
@table @asis
@item @emph{Description}:
@code{EVENT_QUERY} assignes the number of events to @var{COUNT} which have been
posted to the @var{EVENT} variable and not yet been removed by calling
@code{EVENT WAIT}. When @var{STAT} is present and the invokation was successful,
it is assigned the value 0. If it is present and the invokation has failed,
it is assigned a positive value and @var{COUNT} is assigned the value @math{-1}.
@item @emph{Standard}:
TS 18508 or later
@item @emph{Class}:
subroutine
@item @emph{Syntax}:
@code{CALL EVENT_QUERY (EVENT, COUNT [, STAT])}
@item @emph{Arguments}:
@multitable @columnfractions .15 .70
@item @var{EVENT} @tab (intent(IN)) Scalar of type @code{EVENT_TYPE},
defined in @code{ISO_FORTRAN_ENV}; shall not be coindexed.
@item @var{COUNT} @tab (intent(out))Scalar integer with at least the
precision of default integer.
@item @var{STAT} @tab (optional) Scalar default-kind integer variable.
@end multitable
@item @emph{Example}:
@smallexample
program atomic
use iso_fortran_env
implicit none
type(event_type) :: event_value_has_been_set[*]
integer :: cnt
if (this_image() == 1) then
call event_query (event_value_has_been_set, cnt)
if (cnt > 0) write(*,*) "Value has been set"
elseif (this_image() == 2) then
event post (event_value_has_been_set[1])
end if
end program atomic
@end smallexample
@end table
@node EXECUTE_COMMAND_LINE @node EXECUTE_COMMAND_LINE
@section @code{EXECUTE_COMMAND_LINE} --- Execute a shell command @section @code{EXECUTE_COMMAND_LINE} --- Execute a shell command
@fnindex EXECUTE_COMMAND_LINE @fnindex EXECUTE_COMMAND_LINE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment