This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch,gomp-4_0-branch] openacc collapse clause


Hi Cesar!

On Thu, 10 Jul 2014 11:47:42 -0700, Cesar Philippidis <cesar@codesourcery.com> wrote:
> These patch enables the collapse clause with a value greater than one.

Thanks!

> Is this patch OK for gomp-4_0-branch?

OK with the following addressed:

> --- a/gcc/c/c-parser.c
> +++ b/gcc/c/c-parser.c
> @@ -11260,6 +11260,10 @@ c_parser_oacc_all_clauses (c_parser *parser, omp_clause_mask mask,
>  
>        switch (c_kind)
>  	{
> +	case PRAGMA_OMP_CLAUSE_COLLAPSE:
> +	  clauses = c_parser_omp_clause_collapse (parser, clauses);
> +	  c_name = "collapse";
> +	  break;

Annotate c_parser_omp_clause_collapse that it is now used for OpenACC,
too.


>  #define OACC_LOOP_CLAUSE_MASK						\
> -	(OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_REDUCTION)
> +	( (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_COLLAPSE)		\
> +	| (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_REDUCTION))

Given the syntax generally used, add a space between the two closing
parens.


Even though we're re-using OpenMP's tested implementation, please add
some basic front end test coverage for OpenACC: reject invalid, accept
valid syntax.


GrÃÃe,
 Thomas

Attachment: pgpzQb2ZKYK7s.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]