public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Kwok Cheung Yeung <kcy@codesourcery.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] openmp: Implement support for OMP_TARGET_OFFLOAD
Date: Mon, 19 Oct 2020 20:21:47 +0200	[thread overview]
Message-ID: <20201019182147.GR2176@tucnak> (raw)
In-Reply-To: <1cea58e5-a32b-0f7d-03b8-d443c280186f@codesourcery.com>

On Mon, Oct 19, 2020 at 06:57:49PM +0100, Kwok Cheung Yeung wrote:
> --- a/libgomp/env.c
> +++ b/libgomp/env.c
> @@ -75,6 +75,7 @@ struct gomp_task_icv gomp_global_icv = {
>  
>  unsigned long gomp_max_active_levels_var = gomp_supported_active_levels;
>  bool gomp_cancel_var = false;
> +enum gomp_target_offload_t gomp_target_offload_var = GOMP_TARGET_OFFLOAD_DEFAULT;

Too long line.

> --- a/libgomp/target.c
> +++ b/libgomp/target.c
> @@ -116,7 +116,13 @@ resolve_device (int device_id)
>      }
>  
>    if (device_id < 0 || device_id >= gomp_get_num_devices ())
> -    return NULL;
> +    {
> +      if (gomp_target_offload_var == GOMP_TARGET_OFFLOAD_MANDATORY
> +	  && device_id != GOMP_DEVICE_HOST_FALLBACK)
> +	gomp_fatal ("OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found.");

No full stop at the end of gomp_fatal messages (everywhere in your patch)
for consistency with other gomp_fatal calls.  Also, too long line (similarly
other gomp_fatal calls).  Just use
	gomp_fatal (" .....                                           ... "
		    "..........");

Otherwise LGTM.

	Jakub


  reply	other threads:[~2020-10-19 18:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 20:32 Kwok Cheung Yeung
2020-10-15 10:50 ` Jakub Jelinek
2020-10-15 11:02   ` Jakub Jelinek
2020-10-19 17:57     ` Kwok Cheung Yeung
2020-10-19 18:21       ` Jakub Jelinek [this message]
2020-10-20 12:11         ` Tobias Burnus
2020-10-20 12:17           ` Tobias Burnus
2020-10-20 12:57             ` Jakub Jelinek
2020-10-20 21:28               ` Kwok Cheung Yeung
2020-10-20 16:39           ` Rainer Orth
2020-10-20 16:45             ` Jakub Jelinek
2020-10-22 10:44               ` Rainer Orth
2020-10-21 11:52     ` [PATCH] openmp: Change omp_get_initial_device () to match OpenMP 5.1 requirements 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=20201019182147.GR2176@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kcy@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).