public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra.loosemore@siemens.com>
To: Tobias Burnus <burnus@net-b.de>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>,
	Sandra Loosemore <sandra@codesourcery.com>
Subject: Re: [Patch] libgomp.texi: Document omp_pause_resource{,_all}
Date: Sun, 14 Jan 2024 09:52:52 -0700	[thread overview]
Message-ID: <cbf94910-f30d-8b38-7f04-fd6c29889ba8@siemens.com> (raw)
In-Reply-To: <98216ca7-6a10-4342-b510-1f362127f619@net-b.de>

On 1/14/24 07:26, Tobias Burnus wrote:
> This documents two more OpenMP (5.0) routines, omp_pause_resource and 
> omp_pause_resource_all.
> 
> Comments, remarks, suggestions - to the patch or the documentation in general?

I have some minor nits about typos and copy-editing.  I assume the formatting 
of the interface syntax
is consistent with how it's done elsewhere in the manual.

> +@node Resource Relinquishing Routines
> +@section Resource Relinquishing Routines
> +
> +Routines releasing resources used by the OpenMP runtime.
> +They have C linkage and do not throw exceptions.
> +
> +@menu
> +* omp_pause_resource:: Release OpenMP ressouces on a device
> +* omp_pause_resource_all:: Release OpenMP ressouces on all devices

s/ressouces/resources/g (there are more instances below)

> +@end menu
> +
> +
> +
> +@node omp_pause_resource
> +@subsection @code{omp_pause_resource} -- Release OpenMP ressouces on a device
> +@table @asis
> +@item @emph{Description}:
> +Free resources used by OpenMP programm and runtime library on and for the

s/OpenMP programm/an OpenMP program/g (same mistake below)

> +device specified by @var{device_num}; on success, zero is returned and non-zero
> +otherwise.
> +
> +The value of @var{device_num} must be valid device number.  The effect when

s/valid device number/a valid device number/

> +invoked from within a @code{target} region is unspecified.
> +
> +@item @emph{C/C++}:
> +@multitable @columnfractions .20 .80
> +@item @emph{Prototype}: @tab @code{int omp_pause_resource(omp_pause_resource_t kind, int device_num);}
> +@end multitable
> +
> +@item @emph{Fortran}:
> +@multitable @columnfractions .20 .80
> +@item @emph{Interface}: @tab @code{integer function omp_pause_resource(kind, device_num)}
> +@item                   @tab @code{integer (kind=omp_pause_resource_kind) kind}
> +@item                   @tab @code{integer device_num}
> +@end multitable
> +
> +@item @emph{Reference}:
> +@uref{https://www.openmp.org, OpenMP specification v5.0}, Section 3.2.43.
> +@end table
> +
> +
> +
> +@node omp_pause_resource_all
> +@subsection @code{omp_pause_resource_all} -- Release OpenMP ressouces on all devices
> +@table @asis
> +@item @emph{Description}:
> +Free resources used by OpenMP programm and runtime library on all devices, including
> +the host. On success, zero is returned and non-zero otherwise.
> +
> +The effect when invoked from within a @code{target} region is unspecified.
> +
> +@item @emph{C/C++}:
> +@multitable @columnfractions .20 .80
> +@item @emph{Prototype}: @tab @code{int omp_pause_resource(omp_pause_resource_t kind);}
> +@end multitable
> +
> +@item @emph{Fortran}:
> +@multitable @columnfractions .20 .80
> +@item @emph{Interface}: @tab @code{integer function omp_pause_resource(kind)}
> +@item                   @tab @code{integer (kind=omp_pause_resource_kind) kind}
> +@end multitable
> +
> +@item @emph{See also}:
> +@ref{omp_pause_resource}
> +
> +@item @emph{Reference}:
> +@uref{https://www.openmp.org, OpenMP specification v5.0}, Section 3.2.44.
> +@end table
> +
> +

Re the content, I see no documentation for omp_pause_resource_t or the 
equivalent in Fortran, or any hint about what the kind argument is for.  I 
understand this is in the OpenMP spec but if you're going to make users read 
the spec anyway I wonder what the purpose of the GCC documentation is.  :-S  If 
it's to explain implementation-specific features, then it should at least be 
documenting whether GCC supports additional pause kinds as permitted by the spec.

-Sandra


  reply	other threads:[~2024-01-14 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-14 14:26 Tobias Burnus
2024-01-14 16:52 ` Sandra Loosemore [this message]
2024-01-14 23:15   ` [Patch] libgomp.texi: Document omp_pause_resource{,_all} and omp_target_memcpy* (was: [Patch] libgomp.texi: Document omp_pause_resource{,_all}) Tobias Burnus
2024-01-15  4:35     ` Sandra Loosemore
2024-01-23 11:37       ` [Patch] libgomp.texi: Document omp_pause_resource{,_all} and omp_target_memcpy* Tobias Burnus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cbf94910-f30d-8b38-7f04-fd6c29889ba8@siemens.com \
    --to=sandra.loosemore@siemens.com \
    --cc=burnus@net-b.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=sandra@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).