Hi Thomas,

Thomas Schwinge wrote:

To allow me to progress with other work items, is the attached
"OpenACC: Support GCC/C++-special 'default(_GCC_firstprivate)' clause 
[PR119692]"
OK to push to trunk branch, with a few test cases added?

I assume this patch has been withdrawn.
(Collateral from your follow-up comment in the PR).

* * *

I have to admit that I do not understand the idea of this patch, possibly
except for using it with some testcases.

Your patch email also does not really describe this - nor does the PR.

However, IMHO, the real solution is -- a language hook.

Namely, by using the existing 'omp_predetermined_mapping' langhook,
modified as needed.

It seems as if you concur, given what you point to this langhook
in the PR.  (After sending this patch/hack.)

->https://gcc.gnu.org/PR119692

* * *

(I might also suggest OpenACC 'default(firstprivate)' for standardization
by the OpenACC Technical Committee.)

Speaking more from the OpenMP side than OpenACC side, but presumably applying
to either: I find the default most useful - or default(none). The default
settings are rather sensible while 'default(none)' avoids some gotchas.

As a user, the most confusing bit is that scalars are firstprivatized
(omp target, acc parallel), even if there are semantic and technical reasons
that it often makes sense

Hence, I am not sure how useful a 'default(firstprivate)' is. But I guess for
some corner case, it is.

In OpenMP, the defaultmap also permits to specify the preferred mapping per
category (scalar, pointer, aggregate, allocatable - and 'all'), which IMHO
is useful to avoid some confusions (how are scalars handled?) and permits
finetuning.

BTW: At least in OpenMP, some default features are not representable by
mapping flags - like pointer mapping, which are privatized but the pointer
target (pointee) is updated if already mapped.

Tobias

Reply via email to