Xref: utzoo comp.lang.c:20249 comp.unix.cray:26 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uakari.primate.wisc.edu!indri!ames!elroy.jpl.nasa.gov!ucla-cs!uci-ics!zardoz!tgate!ka3ovk!drilex!axiom!linus!alliant!lewitt From: lewitt@Alliant.COM (Martin E. Lewitt) Newsgroups: comp.lang.c,comp.unix.cray Subject: Re: Vectorizing C compilers Message-ID: <3297@alliant.Alliant.COM> Date: 27 Jul 89 07:43:26 GMT References: <15388@ut-emx.UUCP> Reply-To: lewitt@alliant.Alliant.COM (Martin E. Lewitt) Organization: Alliant Computer Systems, Littleton, MA Lines: 41 In article <15388@ut-emx.UUCP> eric@chaos.utexas.edu (Eric Kostelich) writes: >What is the state of the art regarding vectorizing C compilers >for Crays and other "minisuper" machines like Alliant, Convex, etc.? >I have seen one or two C compilers (on a Unicos Cray) that vectorize >loops like > > for(j = 0; j < n; j++) > y[j] = x[j] + z[j]; > >but never a C compiler that can vectorize something like > > for(j = 0; j < n; j++) > y[j] = sqrt(x[j]); > I'm not a C programmer myself, but Mark Buxbaum (buxbaum@alliant.com) of our compiler group informs me that " the FX/C compiler V2.1 not only runs that sqrt concurrent, but vector-concurrent. I believe that FX/C version 2.0 ran it concurrently. " For those not familiar with Alliant, our vector-concurrent compiler optimization, is where a loop has been vectorized and then spread either horizontally or vertically across multiple processors, utilizing the vector capability of each. The compiler selects the horizontal or vertical strip mining based upon which accessing pattern will perform best when multiple processors are accessing the memory system simultaneously. Special hardware support facilitates this break-up, a separate concurrency bus and a group of instructions (known within Alliant as "do the right thing instructions") which implicitly "know" how many other processors are working on this job and which processor they are on in this multi-processor strip mine scheme. Sweet stuff. I expect that other vendor's C compilers have also progressed since your experience with them. Its a competitive marketplace and none of us is standing still (a cliche, but apropos). :-) -- Phone: (206) 931-8364 Martin E. Lewitt My opinions are Domain: lewitt@alliant.COM 2945 Scenic Dr. SE my own, not my UUCP: {linus|mit-eddie}!alliant!lewitt Auburn, WA 98002 employer's.