This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [1/3] OpenACC reductions
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Cesar Philippidis <cesar_philippidis at mentor dot com>
- Date: Wed, 4 Nov 2015 15:08:41 +0100
- Subject: Re: [1/3] OpenACC reductions
- Authentication-results: sourceware.org; auth=none
- References: <56378AE9 dot 2020905 at acm dot org> <56378CDD dot 3060804 at acm dot org> <20151103154631 dot GS478 at tucnak dot redhat dot com> <5638DA75 dot 8010900 at acm dot org> <20151104103150 dot GD478 at tucnak dot redhat dot com> <563A0F02 dot 9030907 at acm dot org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 04, 2015 at 08:58:26AM -0500, Nathan Sidwell wrote:
> On 11/04/15 05:31, Jakub Jelinek wrote:
> >On Tue, Nov 03, 2015 at 11:01:57AM -0500, Nathan Sidwell wrote:
> >>On 11/03/15 10:46, Jakub Jelinek wrote:
> >>>On Mon, Nov 02, 2015 at 11:18:37AM -0500, Nathan Sidwell wrote:
> >>>>This is the core execution bits of OpenACC reductions.
> >>>>
> >>>>We have a new internal fn 'IFN_GOACC_REDUCTION' and a new target hook
> >>>>goacc.reduction, to lower it on the target compiler.
> >>>
> >>>So, let me start with a few questions:
> >>>1) does OpenACC allow UDRs or only the built-in reductions? If it
> >>> does not allow UDRs, do you have it covered by testcases that you
> >>> disallow parsing of them (e.g. when you have
> >>
> >>no UDR reductions. Will check test cases for that.
> >
> >BTW, what about min/max reductions for C/C++? Those were added in OpenMP
> >3.1, so perhaps OpenACC copied them.
>
> OpenACC has min/max, and this is exercised on gomp4. we'll get to porting
> more testcases after this rush is done, ok? (Or is there something specific
> about min/max?)
No, just wanted to know what you need to disable in the reduction clause
parsing...
For e.g. C it might be enough to add
if (!openacc)
{
and } around:
reduc_id = c_parser_peek_token (parser)->value;
break;
Jakub