On Wed, Nov 04, 2020 at 02:03:27AM +0800, Chung-Lin Tang wrote:
> >      libgomp/
> >      * libgomp.h (enum gomp_map_vars_kind): Adjust enum values to be 
> > bit-flag
> >      usable.
> >      * oacc-mem.c (acc_map_data): Adjust gomp_map_vars argument flags to
> >      'GOMP_MAP_VARS_OPENACC | GOMP_MAP_VARS_ENTER_DATA'.
> >      (goacc_enter_datum): Likewise for call to gomp_map_vars_async.
> >      (goacc_enter_data_internal): Likewise.
> > 
> >      * target.c (gomp_map_vars_internal): Change checks of 
> > GOMP_MAP_VARS_ENTER_DATA
> >      to use bit-and (&). Adjust use of gomp_attach_pointer for OpenMP 
> > cases.
> >      (gomp_exit_data): Add handling of GOMP_MAP_DETACH.
> >      (GOMP_target_enter_exit_data): Add handling of GOMP_MAP_ATTACH.
> >      * testsuite/libgomp.c-c++-common/ptr-attach-1.c: New testcase.

Ok, with two nits fixed.

> @@ -572,7 +573,8 @@ goacc_enter_datum (void **hostaddrs, size_t *sizes, void 
> *kinds, int async)
>  
>        struct target_mem_desc *tgt
>       = gomp_map_vars_async (acc_dev, aq, mapnum, hostaddrs, NULL, sizes,
> -                            kinds, true, GOMP_MAP_VARS_ENTER_DATA);
> +                            kinds, true,
> +                            GOMP_MAP_VARS_OPENACC | 
> GOMP_MAP_VARS_ENTER_DATA);

This line is too long.

>        assert (tgt);
>        assert (tgt->list_count == 1);
>        n = tgt->list[0].key;
> @@ -1202,7 +1204,7 @@ goacc_enter_data_internal (struct gomp_device_descr 
> *acc_dev, size_t mapnum,
>         struct target_mem_desc *tgt
>           = gomp_map_vars_async (acc_dev, aq, groupnum, &hostaddrs[i], NULL,
>                                  &sizes[i], &kinds[i], true,
> -                                GOMP_MAP_VARS_ENTER_DATA);
> +                                GOMP_MAP_VARS_OPENACC | 
> GOMP_MAP_VARS_ENTER_DATA);

And this one too.
Please wrap them.

        Jakub

Reply via email to