Hi! On 2019-11-26T22:49:21+0800, Chung-Lin Tang wrote: > this is a reorg of the last non-contiguous arrays patch. (Sorry, this is still not the master branch integration email...) Just a small clean-up, to simplify other changes that I'm working on: On 2019-11-26T22:49:21+0800, Chung-Lin Tang wrote: > --- libgomp/oacc-parallel.c (revision 278656) > +++ libgomp/oacc-parallel.c (working copy) > +void * > +goacc_noncontig_array_create_ptrblock (struct goacc_ncarray *nca, > + void *tgt_ptrblock_addr) > +{ > + [...] > + void *ptrblock = gomp_malloc (nca->ptrblock_size); > --- libgomp/target.c (revision 278656) > +++ libgomp/target.c (working copy) > @@ -1044,6 +1114,98 @@ gomp_map_vars_internal (struct gomp_device_descr * > + /* Now we have the target memory allocated, and target offsets of all > + row blocks assigned and calculated, we can construct the > + accelerator side ptrblock and copy it in. */ > + if (nca->ptrblock_size) > + { > + void *ptrblock = goacc_noncontig_array_create_ptrblock > + (nca, target_ptrblock); > + gomp_copy_host2dev (devicep, aq, target_ptrblock, ptrblock, > + nca->ptrblock_size, cbufp); > + free (ptrblock); > + } Pushed to devel/omp/gcc-12 branch commit c58b28cb650995a41e1ab0166169799f3991bdd6 "OpenACC: Pass pre-allocated 'ptrblock' to 'goacc_noncontig_array_create_ptrblock' [PR76739]", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955