🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #10691

Re: Vector vs Cache/Superscalar

#10691
From: Jim Giles
Date: Tue, 07 May 1991 22:46
27 lines
1223 bytes
In article <23348@lanl.gov>, jlg@cochiti.lanl.gov (Jim Giles) writes:
|> [...]
|> 
|>          DO 30 i = j+1, N
|>             A(i) = A(i) + A(i-j)
|>   30     continue

Whoops!  I just realized I still have a dependency here!  That's what I get
for reading articles on functional programming just before a Fortran-like
posting.

The '30' loop should be replaced with the two loops below:

         DO 30 i = j+1, N
            temp(i) = A(i) + A(i-j)
  30     continue

         DO 40 i = j+1, N
            A(i) = temp(i)
  40     continue

These vectorize and eliminate the dependency.  It's all so much simpler in
a language with whole array syntax!

Sorry for the inconvenience.

J. Giles 
Technical Details
Message-ID: <23353@lanl.gov>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!paperboy!hsdndev!cmcl2!lanl!cochiti.lanl.gov!jlg
References: <1991May4.031835.7979@midway.uchicago.edu> <1991May6.035310.26794@marlin.jcu.edu.au> <11921@mentor.cc.purdue.edu> <23348@lanl.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!paperboy!hsdndev!cmcl2!lanl!cochiti.lanl.gov!jlg
From: jlg@cochiti.lanl.gov (Jim Giles)
Newsgroups: comp.arch
Subject: Re: Vector vs Cache/Superscalar
Message-ID: <23353@lanl.gov>
Date: 7 May 91 22:46:58 GMT
References: <1991May4.031835.7979@midway.uchicago.edu> <1991May6.035310.26794@marlin.jcu.edu.au> <11921@mentor.cc.purdue.edu> <23348@lanl.gov>
Sender: news@lanl.gov
Organization: Los Alamos National Laboratory
Lines: 27