This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [1/2] OpenACC routine support
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Cesar Philippidis <cesar at codesourcery dot com>
- Cc: Nathan Sidwell <nathan at acm dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Nov 2015 09:16:03 +0100
- Subject: Re: [1/2] OpenACC routine support
- Authentication-results: sourceware.org; auth=none
- References: <5637B1CF dot 5060408 at acm dot org> <5637B7C7 dot 70901 at acm dot org> <20151103153533 dot GQ478 at tucnak dot redhat dot com> <56413AF1 dot 8070101 at acm dot org> <5641808F dot 10302 at codesourcery dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Nov 09, 2015 at 09:28:47PM -0800, Cesar Philippidis wrote:
> Here's the patch that Nathan was referring to. I ended up introducing a
> boolean variable named first in the various functions which call
> finalize_oacc_routines. The problem the original approach was having was
> that the routine clauses is only applied to the first function
> declarator in a declaration list. By using 'first', which is set to true
> if the current declarator is the first in a sequence of declarators, I
> was able to defer setting parser->oacc_routine to NULL.
The #pragma omp declare simd has identical restrictions, but doesn't need
to add any of the first parameters to the C++ parser.
So, what are you doing differently that you need it? Handling both
differently is a consistency issue, and unnecessary additional complexity to
the parser.
Jakub