I am asking this here for the possibility that someone here is familiar with OpenMP offloading. Is there some other way to parallelise Fortran array operations outside of unrolling the loops of the array operations? I know for multithreading !$omp workshare seems to work but not for target regions.
An example piece of code would be something like this:
omp target
a(:,:) = a(:,:) + b(:,:)
omp end target
Which can be done by unrolling the loop:
omp teams distribute parallel do
do i=1,10;
do j=1,10
a(i,j) = a(i,j) + b(i,j)
end do;
end do;
omp end teams distribute parallel do
And this parallizes nicely. I would want to avoid unrolling all the array operations but that seems to be necessary