(j3.2006) More on "contiguous"

Van Snyder van.snyder
Tue May 15 17:02:40 EDT 2007


Does "contiguous" make any sense and confer any benefit for other than
the first dimension?

I have a dummy argument array D(:,:).  I know the actual argument is
contiguous in the first dimension because it's a section A(:n,:) of an
automatic variable.

The line-by-line profile says I'm spending 8.8% of a 25 hour run on one
statement "D(:,i) = 0.0" -- unless I'm not interpreting the profiler's
output correctly.  I assume that by reporting line 312, gprof is telling
me the basic block beginning (or ending?) at that line is what's being
reported.  Since the previous line is a DO statement and the next one is
an IF statement, I assume the reported time is all spent at this line.

The array D wouldn't be contiguous as a whole according to our current
definition, but I suspect it would be helpful if the processor knew the
first dimension were contiguous.  Is it ever helpful to know that more
dimensions are contiguous?  If not, can/should we change the definition
of "contiguous" to apply only to the first dimension?

-- 
Van Snyder                    |  What fraction of Americans believe 
Van.Snyder at jpl.nasa.gov       |  Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.



More information about the J3 mailing list