Re: [WIP, OpenMP] OpenMP metadirectives support

2021-12-10 Thread Kwok Cheung Yeung
Hello It has been several months since I posted my WIP patch, and my current patch set (which I will post separately) has evolved considerably since then. I have added C++ and Fortran support, as well as dynamic selectors from the OpenMP 5.1 spec (currently only the 'user={condition()}' selec

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
On 26/07/2021 10:23 pm, Jakub Jelinek wrote: On Mon, Jul 26, 2021 at 10:19:35PM +0100, Kwok Cheung Yeung wrote: In that comment, Deepak says: So, we decided to keep the target trait static, requiring that the declare target directive must be explicit and that the function version must be differ

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Jakub Jelinek via Gcc-patches
On Mon, Jul 26, 2021 at 10:19:35PM +0100, Kwok Cheung Yeung wrote: > > Yes, that is a target variant, but I'm pretty sure we've decided that > > the target construct added for declare target is actually not a dynamic > > property. So basically mostly return to the 5.0 wording with clarifications >

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
Hello On 26/07/2021 8:56 pm, Jakub Jelinek wrote: On Mon, Jul 26, 2021 at 08:28:16PM +0100, Kwok Cheung Yeung wrote: In Section 1.2.2 of the OpenMP TR10 spec, 'target variant' is defined as: A version of a device routine that can only be executed as part of a target region. Yes, that is a t

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Jakub Jelinek via Gcc-patches
On Mon, Jul 26, 2021 at 08:28:16PM +0100, Kwok Cheung Yeung wrote: > In Section 1.2.2 of the OpenMP TR10 spec, 'target variant' is defined as: > > A version of a device routine that can only be executed as part of a target > region. Yes, that is a target variant, but I'm pretty sure we've decide

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
Hello Thanks for your reply. On 26/07/2021 3:29 pm, Jakub Jelinek wrote: On Fri, Jul 09, 2021 at 12:16:15PM +0100, Kwok Cheung Yeung wrote: 3) In the OpenMP examples (version 5.0.1), section 9.7, the example metadirective.3.c does not work as expected. #pragma omp declare target void exp_pi_d

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 09, 2021 at 12:16:15PM +0100, Kwok Cheung Yeung wrote: > This is a WIP implementation of metadirectives as defined in the OpenMP 5.0 > spec. I intend to add support for metadirectives as specified in OpenMP 5.1 > later (where the directive can be selected dynamically at runtime), but am

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
Ping? Does anyone have any opinions on how this issue should be resolved? On 09/07/2021 12:16 pm, Kwok Cheung Yeung wrote: 3) In the OpenMP examples (version 5.0.1), section 9.7, the example metadirective.3.c does not work as expected. #pragma omp declare target void exp_pi_diff(double *d, dou

[WIP, OpenMP] OpenMP metadirectives support

2021-07-09 Thread Kwok Cheung Yeung
Hello This is a WIP implementation of metadirectives as defined in the OpenMP 5.0 spec. I intend to add support for metadirectives as specified in OpenMP 5.1 later (where the directive can be selected dynamically at runtime), but am concentrating on the static part for now. Parsing has only be