[J3] Problem with contiguous

Vipul Parekh parekhvs at gmail.com
Tue Dec 11 13:25:13 EST 2018


On Mon, Dec 10, 2018 at 9:50 PM Van Snyder via J3
<j3 at mailman.j3-fortran.org> wrote:
>
> ,,
> The work arrays are still automatic in the calling routine (now
> routines), still declared something like
>
>   real(rp) :: Sps_Path(max_f,n_sps)
>
> ..
> They can't be declared CONTIGUOUS -- ..
> But every section with stride = 1 in the first dimension is contiguous.
> For some four-dimensional arrays, it's every such section in the first
> three dimensions that are contiguous.
>
> I suspect others have had the same or a similar problem.
>
> ..
> PROPOSAL:
>
> Change CONTIGUOUS to
>
>   R802 <attr-spec> <<is>> ...
>                    <<or>> CONTIGUOUS [ ( <scalar-int-constant-expr> ) ]
>
> with a constraint that the value of <scalar-int-constant-expr> shall not
> exceed the rank of the array.
> ..

Van,

You would know better than anyone else of those who claim for
themselves "progressive" and every other self-serving, sanctimonious,
virtue-signaling labels and for whom there just ain't a tax hike they
don't like!  I'm kinda like that *but only* when it comes to feature
proposals to improve Fortran; there are few, if any, that I would be
against! :-)

But reading your note I fail to understand how your paragraphs on the
background of your routines using large automatic arrays translates to
any proposal, least of all the one you list.  Now I will gladly accept
any charge of ignorance on my part but I will also request a use case
that is comprehensible enough for someone like me.  For the situation
you describe, a minimal working example will be most useful.

You write, "I suspect others have had the same or a similar problem."
In my case, the answer is clearly no - the language offers enough
facilities with simply-contiguous objects and object-oriented features
toward efficient design of library code operating on (large) data and
also with remapping of pointers with CONTIGUOUS attributes, etc. to
not have such issues at any discernible levels.

Thanks,
Vipul


More information about the J3 mailing list