I ask this question to be clear on the behaviour of these two clauses when in nested data environment.
When I first read the openACC API, I thought that if I had the following code:
#pragma acc create(a[0:20])
{
#pragma acc pcopyin(a[0:20])
{
...
}
}
the first clause allocated the necessary memory on the accelerator, and then the pcopyin
clause copied the data from the host to the accelerator (without allocating).
Now reading the draft for the v2 of th API, what I understand is that the second pcopyin
clause do absolutely nothing because the data is already allocated on the accelerator, and since the data are already present on the accelerator, no allocation nor transfer should take place. Is that right?
When I tested the CAPS compiler with this sort of example, I think I obtained the behaviour I expected. Was that right due to some ambiguity in the API? With v2, if I want to do this sort of stuff, should I replace my copyin clause by an update?