From patchwork Wed Jul 26 09:57:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 126243 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp289020vqo; Wed, 26 Jul 2023 02:58:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlFi3KYTEptN1G7FfWQ/6msPEk6Dpv7KbXS/oXl4Aj7m1fPvZ1nqWHv7NasiUnZYORlvzV2s X-Received: by 2002:aa7:c1d1:0:b0:521:7a5e:ab1e with SMTP id d17-20020aa7c1d1000000b005217a5eab1emr1191277edp.21.1690365501169; Wed, 26 Jul 2023 02:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690365501; cv=none; d=google.com; s=arc-20160816; b=esDbu6gLFCkEZMuNoM0/K5DCp8HI7OOGlMpDQhDAvehtZqFgpAbGADHOm1AiXSc23j FGe3FO+o7JhalxKWJL8Ypiczp1PVob90Zck48DImfnyvVMCM7ZliXWw3agQTzzOlKJ2n J4vhmqHceM8y0VgGoO+dgsNeku/NJ6KX9MeqMLQO/5hx8rVlYGdrsoyBbSVL/MCeJzTI 3NsXIP4KDazGoFVpsvsgzXgjcQMVx9hizgEnx0RGZlc9Qk2FeT28ZIY/KvMXtejL32HY GqCSGfxo+bdawoT2uaNHpbSwnllr8gLaVxBndJAkyjhftJG74p753xumVRICMuI+8pqM XSMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:from:to :content-language:user-agent:mime-version:date:message-id :ironport-sdr:dmarc-filter:delivered-to; bh=IYqSRcuFq0uaWLAUI+DR4fhdhhcMhRolQoMG53vJZ7Q=; fh=Xz8JE6K+6E1As9jdHgaguavAB6ZaEp+JYefs2vhOVs4=; b=CFDVFRwedGG3n9K5OUinMGG2ARxS57CJzPyharaD3fODxq2TqooJjJEDVRQqcXvhGl U/3pt+eXkBaOzgO7TTnGnEexwPTuot+z7BvzzPuzvzcJ0/qhdrNaf9EILyEo9Z2Jfj4O TSOAYldP165beC5y5SW5GguoGWJN5tMh3wPZGNorWPozACjWXEy76Wo2iLVP4noTSeA3 m++x6bfeJ6OG685jecx+6j7RYHnrGdG0JWoB/rPl7wXKua2UXBVHogrJDfxy/EJcKhr7 pCyCOW6g11sl4dwV/ICP9Qs80GlJpJ6KQsRQrvdWc1ZSzn0g0FMq3oKgcaae6gpLXXMe 2VoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id bf28-20020a0564021a5c00b0052277c4d767si463605edb.334.2023.07.26.02.58.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 02:58:21 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0657C3856DF2 for ; Wed, 26 Jul 2023 09:58:18 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id B56AF3858C53 for ; Wed, 26 Jul 2023 09:57:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B56AF3858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="6.01,231,1684828800"; d="diff'?scan'208";a="12761146" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 26 Jul 2023 01:57:30 -0800 IronPort-SDR: p+69HoOvRwPWGpZqZ67cXsy9dOnp3XKa0YeQsrP1A8PIWACDAEk4O0bEr2pc7cdkONsDIFugDA jAFR7ScmJame53bGcEJEBCqQ8Z6KkU2crTG9iwA92P+iKMoOSgTVnA2v2/MI6/5t2gqgnY0I8E dPNccJgIfXtvaSnaLKlQOtDmUf10D/CktOal4bmHMqAfY3t5+k7z5EFb594TkCl8gJVstQ2l3r tKD4CAvpy9Pph++rr9QWXgX4IIdbMpoZZnliVT1uInanFYTIxLfqM9c3IqDPSLrClA+U1w8cmg xQg= Message-ID: <30b8d6f8-00c6-1ac9-1ab7-a8692f383e74@codesourcery.com> Date: Wed, 26 Jul 2023 11:57:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: gcc-patches From: Tobias Burnus Subject: [committed] libgomp.texi: Add status item, @ref and document omp_in_explicit_task X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772476695999141234 X-GMAIL-MSGID: 1772476695999141234 I stumbled recently over: (a) 'omp target defaultmap(to: all)' - now added to the impl.status (as 'N') (b) a @code that should have been @ref in our .texi (c) while being there, I completed the 'Tasking Routines' section by adding the missing, third routine omp_in_explicit_task. (Documentation is still missing for about 20 already implemented routines.) Committed as Rev. r14-2784-g819f3d3692cbfe Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 commit 819f3d3692cbfe69ed7861da6ef47805914bb0b8 Author: Tobias Burnus Date: Wed Jul 26 11:52:20 2023 +0200 libgomp.texi: Add status item, @ref and document omp_in_explicit_task libgomp/ChangeLog: * libgomp.texi (OpenMP 5.2 features): Add 'all' for 'defaultmap' as 'N'. (Tasking Routines): Document omp_in_explicit_task. (Implementation-defined ICV Initialization): Use @ref not @code. --- libgomp/libgomp.texi | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index 9d3b2ae54cb..4ac01e977ec 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -426,6 +426,7 @@ to address of matching mapped list item per 5.1, Sect. 2.21.7.2 @tab N @tab @code{omp_invalid_device} enum/PARAMETER @tab Y @tab @item Initial value of @var{default-device-var} ICV with @code{OMP_TARGET_OFFLOAD=mandatory} @tab Y @tab +@item @code{all} as @emph{implicit-behavior} for @code{defaultmap} @tab N @tab @item @emph{interop_types} in any position of the modifier list for the @code{init} clause of the @code{interop} construct @tab N @tab @end multitable @@ -1370,7 +1371,7 @@ They have C linkage and do not throw exceptions. @menu * omp_get_max_task_priority:: Maximum task priority value that can be set -@c * omp_in_explicit_task:: +* omp_in_explicit_task:: Whether a given task is an explicit task * omp_in_final:: Whether in final or included task region @end menu @@ -1399,6 +1400,32 @@ This function obtains the maximum allowed priority number for tasks. +@node omp_in_explicit_task +@subsection @code{omp_in_explicit_task} -- Whether a given task is an explicit task +@table @asis +@item @emph{Description}: +The function returns the @var{explicit-task-var} ICV; it returns true when the +encountering task was generated by a task-generating construct such as +@code{target}, @code{task} or @code{taskloop}. Otherwise, the encountering task +is in an implicit task region such as generated by the implicit or explicit +@code{parallel} region and @code{omp_in_explicit_task} returns false. + +@item @emph{C/C++} +@multitable @columnfractions .20 .80 +@item @emph{Prototype}: @tab @code{int omp_in_explicit_task(void);} +@end multitable + +@item @emph{Fortran}: +@multitable @columnfractions .20 .80 +@item @emph{Interface}: @tab @code{logical function omp_in_explicit_task()} +@end multitable + +@item @emph{Reference}: +@uref{https://www.openmp.org, OpenMP specification v5.2}, Section 18.5.2. +@end table + + + @node omp_in_final @subsection @code{omp_in_final} -- Whether in final or included task region @table @asis @@ -4802,7 +4829,7 @@ offloading devices (it's not clear if they should be): @item @var{def-allocator-var} @tab See @ref{OMP_ALLOCATOR}. @item @var{max-active-levels-var} @tab See @ref{OMP_MAX_ACTIVE_LEVELS}. @item @var{dyn-var} @tab See @ref{OMP_DYNAMIC}. -@item @var{nthreads-var} @tab See @code{OMP_NUM_THREADS}. +@item @var{nthreads-var} @tab See @ref{OMP_NUM_THREADS}. @item @var{num-devices-var} @tab Number of non-host devices found by GCC's run-time library @item @var{num-procs-var} @tab The number of CPU cores on the