Re: Array subsetting



<L.Spadavecchia@xxxxxxxxxxxxxx> wrote:


(I understand
all the arrays in the where statement must be of the same type?)

Others have pointed out the likely reason that you are getting stack
overflows and how to work around that.

Let me just note that the above statement about being the same type is
incorrect. There is no requirement even vaguely related to that. All the
arrays must be the same shape (well, I assume there's a requirement like
that; didn't bother to check, but it sure seems like there would be).
But type isn't an issue.

P.S. I might also note that it seems pretty darned inefficient for the
compiler to create a temporary array for something quite that simple.
For more complicated cases. It suggests to me that the compiler isn't
paying much attention to the efficiency of WHERE statements. Perhaps it
wasn't very high on their priority list.

--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.



Relevant Pages

  • Re: bug or mistake?
    ... It isn't exactly a bug in the compiler. ... The compiler is almost surely putting the automatic arrays (which is ... what all your arrays other than the pointer one are) on the stack. ... difference between automatic objects and allocatable arrays, ...
    (comp.lang.fortran)
  • Re: bug or mistake?
    ... It isn't exactly a bug in the compiler. ... The compiler is almost surely putting the automatic arrays (which is ... what all your arrays other than the pointer one are) on the stack. ... difference between automatic objects and allocatable arrays, ...
    (comp.lang.fortran)
  • Re: OO programming - illumination? - whoopsie
    ... > represented by a host of loosely related arrays. ... > compiler and the memory allocators. ... A pointer is usually a word. ... organs can be further modeled to include cells and so on and so forth. ...
    (comp.lang.java.programmer)
  • Re: bug or mistake?
    ... It isn't exactly a bug in the compiler. ... Compilers are allowed to have limitations. ... The compiler is almost surely putting the automatic arrays (which is ... what all your arrays other than the pointer one are) on the stack. ...
    (comp.lang.fortran)
  • Re: OO programming - illumination? - whoopsie
    ... represented by a host of loosely related arrays. ... compiler and the memory allocators. ... As a matter of fact there is no such thing as a pointer. ... memory that just holds a terminator, which is 0 by convention. ...
    (comp.lang.java.programmer)