On 04/11/2012 06:30 PM, Oliver Fuhrer wrote:
> Thanks for the hint. Altough, that's not really an option. I am working in a 250'000 lines code where changing the dimensionality of a field potentially impacts _a lot_ of lines to change (switching (i,j) to (i,j,1) throughout the whole program). I am looking for a way for p(:,:,1:1) to point to a(:,:) somehow.
Well, you could also use GCC/gfortran 4.6 (or later) which supports
Fortran 2008's rank remapping (i.e. remapping also for simply contiguous
data targets; F2003 required a rank-1 target).
A quick test showed that all my other compilers do not support this
feature, yet. Thus, I am not sure whether you like this alternative more.
Tobias
|