[PATCH] Fix oacc kernels default mapping for scalars
Tom de Vries
Tom_deVries@mentor.com
Fri Nov 27 11:30:00 GMT 2015
Hi,
The OpenACC 2.0a standard says this about the default mapping for
variables used in a kernels region:
...
An array or variable of aggregate data type referenced in the kernels
construct that does not appear in a data clause for the construct or
any enclosing data construct will be treated as if it appeared in a
present_or_copy clause for the kernels construct.
A scalar variable referenced in the kernels construct that does not
appear in a data clause for the construct or any enclosing data
construct will be treated as if it appeared in a copy clause.
...
But atm, all variables including the scalar ones have 'present_or_copy'
defaults.
This patch makes sure scalar variables get the 'copy' default.
Bootstrapped and reg-tested on x86_64. OK for stage3 trunk?
Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Fix-oacc-kernels-default-mapping-for-scalars.patch
Type: text/x-patch
Size: 3261 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151127/77a2a6d7/attachment.bin>
More information about the Gcc-patches
mailing list