(j3.2006) contiguous sections

Bill Long longb
Mon Jul 7 17:26:30 EDT 2008

Consider this example:

Integer a(10)

Print *, is_contiguous(a(10:1:-1))

Does this print T or F?  In 5.3.7, 6(c) we say "the elements of the 
section in array element order [here a(10), a(9), ..., a(1)], are a 
subset of the base object elements that are consecutive in array element 
order [here a(1), a(2), ..., a(10)]."  As a collection of elements, 
these two sets are the same, so the condition of "subset" seems to be 
satisfied.  But did we intend that the ordering of the two sets also has 
to to the the same?  I think so, considering that we disallowed vector 
subscripts.  But it is not clear that the current wording clearly 
supports that claim.  Another way to ask the question is whether the 
goal is "adjacent in memory", or "stride-1 access".  From the 
optimization point of view, the stride-1 access is the valuable objective.


Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120


More information about the J3 mailing list