[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: subscript array question
This kind of thing comes up in a number of contexts, e.g., the
thread a couple of months ago for calculating cumulative totals
in arrays. The solution I've suggested to RSI is a new equality
operator (e.g., :=) which does not implicitly parallelize
In this case one could just write
array[subs] := array[subs]+1
in a very natural way rather than use devious if clever subterfuges.
This simple syntax can solve a variety of problems rather cleanly. E.g.,
the cumulative total looks something like:
cum[1:n-1] := cum[0:n-2] + cum[1:n-1]
Although the loops would not be parallelized, they could still be
compiled into very efficient code (since temporaries would be less
necessary perhaps faster in some cases than the parallel versions).
Haven't heard anything back alas...