public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sandra at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114596] [OpenMP] "declare variant" scoring seems incorrect for construct selectors Date: Fri, 05 Apr 2024 14:55:33 +0000 [thread overview] Message-ID: <bug-114596-4-BSWOHFQ6ex@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114596-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114596 --- Comment #5 from sandra at gcc dot gnu.org --- Tobias, it looks to me like you missed the connection between the first half of item (1) in 7.3 (I'm still looking at the 5.2 spec): "Each trait selector for which the corresponding trait appears in the construct trait set in the OpenMP context is given the value 2**(p−1) where p is the position of the corresponding trait, cp, in the context construct trait set..." And this part of section 7.1: "Specifically, the ordering of the set of constructs is c1 , ... , cN , where c1 is the construct at the outermost nesting level and cN is the construct at the innermost nesting level." So, the outermost construct has the *lowest* position and *lowest* score. In this case, the "teams" construct is outermost, has p=1, and contributes 2**0 to the score. And to get the highest score for the duplicated construct traits, it should prefer the innermost ones. Re the adding one to the final score, that is also explicit in the spec, item 6 at the very end of section 7.3.
next prev parent reply other threads:[~2024-04-05 14:55 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-05 3:02 [Bug middle-end/114596] New: " sandra at gcc dot gnu.org 2024-04-05 3:03 ` [Bug middle-end/114596] " sandra at gcc dot gnu.org 2024-04-05 8:06 ` burnus at gcc dot gnu.org 2024-04-05 9:10 ` burnus at gcc dot gnu.org 2024-04-05 9:46 ` burnus at gcc dot gnu.org 2024-04-05 14:55 ` sandra at gcc dot gnu.org [this message] 2024-04-05 15:26 ` burnus at gcc dot gnu.org 2024-04-05 16:06 ` sandra at gcc dot gnu.org 2024-05-13 17:48 ` sandra at gcc dot gnu.org
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=bug-114596-4-BSWOHFQ6ex@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).