- Firstly, for example,
if you ran code like
#pragma acc parallel loop
for (…) {
for (…) {
}
}
Without any directive ahead of the inner for loop, will the compiler tried to automatically
parallelize this loop ?
- What should I do if I want to declare an array A as private for each thread ?
Just add private(A) would work or should also create space by using copy|create ?
Thanks.
Without any directive ahead of the inner for loop, will the compiler tried to automatically parallelize this loop ?
The PGI compiler will.
- What should I do if I want to declare an array A as private for each thread ?
Just add private(A) would work or should also create space by using copy|create ?
You would use private(A[0:size]). The copy/create data clauses create global memory that is shared across all threads.