Re: Automatically transform or expand do loop in a subroutine
- From: highegg <highegg@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 23:10:33 -0800 (PST)
On Jan 31, 7:06 am, nos...@xxxxxxxxxxxxx (Richard Maine) wrote:
yaqi <yaqiw...@xxxxxxxxx> wrote:
I want to save computing time as much as I can.
...
do i=1,d
c = c + i
end do
The "obvious" way to save a lot of computing time here is to replace the
loop with
c = c + d*i
certainly not. c = c + d*(d+1)/2, more likely :)
<rest snipped>.
- Follow-Ups:
- Re: Automatically transform or expand do loop in a subroutine
- From: Richard Maine
- Re: Automatically transform or expand do loop in a subroutine
- References:
- Automatically transform or expand do loop in a subroutine
- From: yaqi
- Re: Automatically transform or expand do loop in a subroutine
- From: Richard Maine
- Automatically transform or expand do loop in a subroutine
- Prev by Date: Re: Automatically transform or expand do loop in a subroutine
- Next by Date: Re: Automatically transform or expand do loop in a subroutine
- Previous by thread: Re: Automatically transform or expand do loop in a subroutine
- Next by thread: Re: Automatically transform or expand do loop in a subroutine
- Index(es):