On Thu, 25 Jun 2020 12:52:23 +0200 Thomas Schwinge <tho...@codesourcery.com> wrote:
> Hi Julian! > > On 2020-05-22T15:16:06-0700, Julian Brown <jul...@codesourcery.com> > wrote: > > Since goacc_enter_datum only maps a single data item now, there is > > no need to pass "kinds" as an array. Passing as a scalar allows > > for some simplification in the function's callers. > > You'd hope (didn't verify) that the compiler can do the same > transformation/optimization. ;-) > > But, au contraire: in my opinion (but please tell if you disagree), we > should instead get (back) to the state where the runtime API and the > pragma variants of the respective OpenACC functionality map to the > same libgomp implementation. It's a little ugly for "enter data" because the API routines return the device pointer, but the directive implementation may involve several mappings and a single "device pointer" return doesn't really make sense in that case. I didn't much like the previous approach of returning NULL. We can still try to factor out the duplicated code though. I've posted a new approach here (see the parent "0/2" patch also): https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549773.html Julian