public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tburnus@baylibre.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch] OpenMP: Add -fopenmp-force-usm mode
Date: Wed, 29 May 2024 08:41:04 +0200	[thread overview]
Message-ID: <d2a4cd5a-bd99-4f58-85f4-26531b41ccff@baylibre.com> (raw)
In-Reply-To: <ZlbKfByE9HLn490Y@tucnak>

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

Jakub Jelinek wrote:
> How is that option different from
> echo '#pragma omp requires unified_shared_memory' > omp-usm.h
> gcc -include omp-usm.h
> ?
> I mean with -include you can add anything you want, not just one particular
> directive, and adding a separate option for each is just weird.

For C/C++, -include seems to be indeed sufficient (albeit not widely 
known). For Fortran, there at two issues: One placement/semantic issue: 
it has to be added per "compilation unit", i.e. to the specification 
part of a module, subprogram or main program. And a practical issue, 
gfortran shows:

error: command-line option '-include !$omp requires' is valid for 
C/C++/ObjC/ObjC++ but not for Fortran

Thus, for Fortran it is still intrinsically useful – even if one can 
argue whether that feature is needed at all / whether it should be added 
as command-line argument.

Tobias

  parent reply	other threads:[~2024-05-29  6:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28 19:23 Tobias Burnus
2024-05-29  6:26 ` Jakub Jelinek
2024-05-29  6:32   ` Jakub Jelinek
2024-05-29  6:49     ` Tobias Burnus
2024-05-29  6:52       ` Jakub Jelinek
2024-05-29  6:41   ` Tobias Burnus [this message]
2024-05-29  6:50     ` Jakub Jelinek

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=d2a4cd5a-bd99-4f58-85f4-26531b41ccff@baylibre.com \
    --to=tburnus@baylibre.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.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).