Since I started a minor ruckus, I'll explain the problem.
I help maintain the port of a large mostly-pre-f77 application to various Cray
platforms.
We traditionally have created a file containing the O(10) routines that we
inline to improve performance, and then use the Cray F90 flag
-Oinlinefrom=/path/to/inline.f
to include those files.
One problem that crops up is the mixing of f77 and f90-type interfaces. The
application is replete with locations in integer arrays being passed as the
starting location of a real or double precision array, or visa-versa. To get
proper interfaces, generic interface blocks must be defined.
It is possible to put the inlined functions into a module, and then inline
that module (using different compiler options), but then I have the problem
that there are many EXTERNAL declarations in the code that conflict with the
interfaces provided by the USEd module.
I was wondering if there might be a way around the problem by INCLUDE'ing the
inline file into a CONTAINS block, but it appears that won't work either.
At the moment, I just accept less-than-optimal inlining performance. If it
becomes critical again, I will work on a solution with the compiler people.
I'm not sure if inlining is an issue that the standard committee even
considers, especially with f77 (or pre-f77) style coding. Forcing a rewrite
is not really an option in this case.
Ted
--
============================================================
Ted Stern Engineering Applications
Cray Inc. http://www.cray.com
411 First Avenue South, Suite 600 206-701-2182
Seattle, WA 98104-2860 FAX: 206-701-2500
============================================================
|