I have found that there is some PGI compiler extension function to get the id of a gang/vector, like ‘omp_get_thread_num’ in openmp. This is __pgi_gangidx. I could find a example from:
But what is the corresponding syntex in Fortran?
The reason I want to use it is that I need to make a allocatable array private to gang. I need to append a additional dimension to the array and create on device. It 's pretty similar to https://stackoverflow.com/questions/44029157/openacc-private-2d-array
Instead of making the addition dimension to the the number of trip count, I just want it to be number of gangs. Could some one help?