public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias@codesourcery.com>
To: Sandra Loosemore <sandra@codesourcery.com>, <gcc-patches@gcc.gnu.org>
Cc: <jakub@redhat.com>, <julian@codesourcery.com>
Subject: Re: [PATCH V2 3/3] OpenMP: Use enumerators for names of trait-sets and traits
Date: Mon, 27 Nov 2023 19:18:51 +0100	[thread overview]
Message-ID: <3fd0695b-a521-43af-9c5a-2ea15723c5dd@codesourcery.com> (raw)
In-Reply-To: <7913e015-6eb6-44d5-bea1-39282c4039ed@codesourcery.com>

On 27.11.23 18:19, Tobias Burnus wrote:
>> +   { "unified_address",
>> +     (1 << OMP_TRAIT_SET_IMPLEMENTATION),
>> +     OMP_TRAIT_PROPERTY_NONE, true,
>> +     NULL
>> +   },
>
> I don't understand this code. This looks as if "requires" and
> "unified_address"
> are on the same level but in my understanding they have to be used as in:
>
>  match(implementation = {requires(unified_address,
> atomic_default_mem_order_properties(release)})
>
> while from the syntax, it looks as if this would permit:
>
>  match(implementation = {unified_address,
> atomic_default_mem_order_properties(release))


Sandra pointed me to the spec: OpenMP 5.0 only permits the latter, i.e.
using the clause names of 'requires' directly. Since OpenMP 5.1, this
use is deprecated (removed in TR11/TR12) - in favor of the first syntax,
i.e. using them as argument to 'requires()'.

Thus, the code is fine. — And shows all the joy needing to read multiple
spec versions at the same time without getting confused.

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

      reply	other threads:[~2023-11-27 18:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-19  9:21 [PATCH 0/3] OpenMP: Improve data abstractions for context selectors Sandra Loosemore
2023-11-19  9:21 ` [PATCH 1/3] OpenMP: Introduce accessor macros and constructors " Sandra Loosemore
2023-11-19  9:21 ` [PATCH 2/3] OpenMP: Unify representation of name-list properties Sandra Loosemore
2023-11-19  9:21 ` [PATCH 3/3] OpenMP: Use enumerators for names of trait-sets and traits Sandra Loosemore
2023-11-21 20:48   ` Sandra Loosemore
2023-11-20 10:32 ` [PATCH 0/3] OpenMP: Improve data abstractions for context selectors Julian Brown
2023-11-22 16:22 ` [PATCH V2 3/3] OpenMP: Use enumerators for names of trait-sets and traits Sandra Loosemore
2023-11-27 17:19   ` Tobias Burnus
2023-11-27 18:18     ` Tobias Burnus [this message]

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=3fd0695b-a521-43af-9c5a-2ea15723c5dd@codesourcery.com \
    --to=tobias@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=julian@codesourcery.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).