On Wed, Dec 19, 2018 at 01:46:06PM +0100, Thomas Schwinge wrote: > > Or, I had the idea that we could avoid that, instead continue using > > "GOMP_MAP_USE_DEVICE_PTR", and transmit the "if_present" flag through the > > "int device" argument of "GOACC_data_start" (making sure that old > > executables continue to function as before). For OpenACC, that argument > > is only ever set to "GOMP_DEVICE_ICV" or "GOMP_DEVICE_HOST_FALLBACK" (for > > "if" clause evaluating to "false"), so has some bits to spare for that. > > However, I've not been able to convince myself that this solution would > > be any much prettier than adding a new mapping kind... ;-) > > Having thought about it some more, the idea doesn't actually seem so bad > anymore. :-) Just don't think of it as 'merging stuff into "int > device"', but rather 'for OpenACC libgomp entry points, redefine the "int > device" argument to "unsigned int flags"' -- see attached WIP (for GCC > trunk, testing). > > Jakub, what do you think?
So, what values you were passing in before as the argument? Just 0 or -1 or something similar and nothing else? Just wondering if the change isn't an ABI change. In OpenMP we are passing a device number (from device clause), or -1, if no device clause was used and so ICV should be checked and -2 if it is if (false) and therefore should be always host fallback. Jakub