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] OpenACC 2.6 manual deep copy support (attach/detach)


On Fri, Dec 14, 2018 at 07:00:30PM +0000, Julian Brown wrote:
>     OpenACC 2.6 manual deep copy support (attach/detach)
>     
>     	gcc/c-family/
>     	* c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH,
>     	PRAGMA_OACC_CLAUSE_DETACH.

and instead of , ?
> --- a/gcc/c-family/c-common.h
> +++ b/gcc/c-family/c-common.h
> @@ -1176,6 +1176,7 @@ extern void c_omp_split_clauses (location_t, enum tree_code, omp_clause_mask,
>  extern tree c_omp_declare_simd_clauses_to_numbers (tree, tree);
>  extern void c_omp_declare_simd_clauses_to_decls (tree, tree);
>  extern enum omp_clause_default_kind c_omp_predetermined_sharing (tree);
> +extern const char * c_omp_map_clause_name (tree, bool);

No space after * in this case.

> +const char *
> +c_omp_map_clause_name (tree clause, bool oacc)
> +{
> +  if (oacc && OMP_CLAUSE_CODE (clause) == OMP_CLAUSE_MAP)
> +    switch (OMP_CLAUSE_MAP_KIND (clause))
> +    {
> +    case GOMP_MAP_FORCE_ALLOC:
> +    case GOMP_MAP_ALLOC: return "create";
> +    case GOMP_MAP_FORCE_TO:
> +    case GOMP_MAP_TO: return "copyin";
> +    case GOMP_MAP_FORCE_FROM:
> +    case GOMP_MAP_FROM: return "copyout";
> +    case GOMP_MAP_FORCE_TOFROM:
> +    case GOMP_MAP_TOFROM: return "copy";
> +    case GOMP_MAP_RELEASE: return "delete";
> +    case GOMP_MAP_FORCE_PRESENT: return "present";
> +    case GOMP_MAP_ATTACH: return "attach";
> +    case GOMP_MAP_FORCE_DETACH:
> +    case GOMP_MAP_DETACH: return "detach";
> +    case GOMP_MAP_DEVICE_RESIDENT: return "device_resident";
> +    case GOMP_MAP_LINK: return "link";
> +    case GOMP_MAP_FORCE_DEVICEPTR: return "deviceptr";
> +    default:;

Please use default: break; instead.

>    for (i = 0; i < tgt->list_count; i++)
>      {
>        splay_tree_key k = tgt->list[i].key;
> +
>        if (k == NULL)
>  	continue;

Why the blank change?

Otherwise LGTM, if Thomas is ok with it.

	Jakub


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