if i have
#pragma acc parallel loop gang num_gangs(4) \
num_workers(5) vector_length(6) private(arrayB)
{
for(j=0; j<len; j++)
{
...
}
}
region, i assume each of the 4 gangs will have a separate copy of arrayB (for this example, you can assume that arrayB is an integer array with 5 elements).
- am i right in assuming that in above case each of 4 gangs has a private copy of arrayB (and that workers and vectors, i.e., 5 workers in a gang will see the single private copy of arrayB as shared among these 5 workers, and similarly vectors)? also, would
#pragma acc parallel loop num_gangs(4) \
num_workers(5) vector_length(6)
{
for(j=0; j<len; j++)
{
...
}
}
be same in terms of private copies of arrayB to the one above?
- now assume,
#pragma acc parallel loop gang worker \
num_gangs(4) num_workers(5) \
vector_length(6) private(arrayB)
{
for(j=0; j<len; j++)
{
...
}
}
then, who has private copy of arrayB and who shares single private copy of arrayB? how many private copies of arrayB there are in total?
- now assume,
#pragma acc parallel loop gang vector \
num_gangs(4) num_workers(5) \
vector_length(6) private(arrayB)
{
for(j=0; j<len; j++)
{
...
}
}
then, who has private copy of arrayB and who shares single private copy of arrayB? how many private copies of arrayB there are in total?
also, plz let me know if i am missing any other combinations that are possible.