On May 14, 10:20am, [log in to unmask] wrote:
> Subject: Re: Extension of {MIN,MAX}{LOC,VAL} to LOGICAL arrays?
> Peter Shenkin writes:
> > Thanks for both suggestions. Both, however, are likely to
> > create large temporary arrays and be considerably slower than
> > DO i=1,SIZE(array)
> > IF( .NOT. array(i) )EXIT
> > END DO
> >
> > -P.
> >
>
> I don't think that those are safe assumptions. Some f90 compilers now
> do a good job of loop fusion and CSE. I haven't done any tests on
> this particular case, however.
I'd be surprised if temporaries would be optimized away for the
solutions given, but I've been surprised before.
-P.
--
*********** How can we have ethnic music without ethnic hatred? ***********
* Peter S. Shenkin; Chemistry, Columbia U.; 3000 Broadway, Mail Code 3153 *
** NY, NY 10027; [log in to unmask]; (212)854-5143; FAX: 678-9039 ***
*MacroModel WWW page: http://www.columbia.edu/cu/chemistry/mmod/mmod.html *
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|