Optimizing vectorized array operations

As a Fortran programmer who has embraced F90’s addition of automatic and allocate, I have found F03’s inclusion of auto (re-) allocate to be a tricky inclusion for (what is only F90) legacy codes.
One way I have tried to avoid the problem is by using “F90 wrapper” routines where the allocatable attribute is not included in the wrapper routine.
Use of array sections may help, but the main development Fortran compiler I am using has inefficiencies associated with array sections ( due to creating unnecessary temporary copies)

The problem is not just that you need to be careful with array syntax in new code, but the uncertainty of array syntax used in previous F90 codes.

1 Like