[Beowulf] array shape difference
Many of your questions may have already been answered in earlier discussions or in the FAQ. The search results page will indicate current discussions as well as past list serves, articles, and papers.
Greg Lindahl lindahl at pbm.comThu Nov 12 16:46:31 PST 2009
- Previous message: [Beowulf] array shape difference
- Next message: [Beowulf] MPI Derived datatype + Persistent
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Nov 12, 2009 at 08:26:13AM -0500, Stuart Barkley wrote: > <theory> > If the fortran code is doing virtual subscripts (e.g. array2(i*2 + j)) > it would likely generate about the same code as the compiler would > generate for 2 dimensions. In theory, the compiler can generate > better subscript computation but I suspect in most reasonable (or > simple testing) cases the actual code size difference is a wash. > </theory> Putting my "I used to work near a compiler group" hat on, I suspect a good compiler guy would tell you that they've worked hard to make sure both methods generate the same code for address computation. Strength reduction and the like are elementary optimizations these days. However, there is an issue that the compiler may have a better idea of the dimensions of the 2-dimensional array at compile time, leading to better optimization. That has nothing to do with the address computations, but everything to do with loop fusion, splitting, unrolling, pipelining, SIMDizing, cache effects, etc. -- greg
- Previous message: [Beowulf] array shape difference
- Next message: [Beowulf] MPI Derived datatype + Persistent
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Beowulf mailing list
