From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2ac7208e3d69354f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-18 10:46:19 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dennison@telepath.com (Ted Dennison) Newsgroups: comp.lang.ada Subject: Re: Ada and vectorization Date: 18 Jun 2002 10:46:17 -0700 Organization: http://groups.google.com/ Message-ID: <4519e058.0206180946.2bbb9ac1@posting.google.com> References: NNTP-Posting-Host: 65.115.221.98 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1024422379 7132 127.0.0.1 (18 Jun 2002 17:46:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 18 Jun 2002 17:46:19 GMT Xref: archiver1.google.com comp.lang.ada:26270 Date: 2002-06-18T17:46:19+00:00 List-Id: Dale Stanbrough wrote in message news:... > It would be nice if we let the compiler discover all of the possible > vectorisations possible. I've got no idea what the current state > of the art is in this respect, however I would imagine that it would > still be -cheaper- to build a simple compiler that took hints or > directions from the programmer about possible vectorisation. > > Does anyone have real info instead of my speculation? > I took a graduate-level compiler optimzation course a couple of years ago that dealt almost entirely with this. Apparently most reasearch done into compiler optimizations of this sort is done using Fortran, as most of the folks who need that kind of number-cruching power have Fortran code they want it done with. Fortran's solution to this issue was to use the "hint" approach by introducing new loop constructs (and a new dialect - HPF) for this. So clearly they think it isn't feasable for normal Fortran. Actually, I think the real issue may be that some operations will give different results when done in parallel, and there has to be a way of saying that's OK (or not OK) for your particular app. So I really think the best way to do this in Ada would be via a pragma on the loop name. The main drawback here is that if you put such code through a compiler that doesn't support the pragma, then you may end up with an incorrect calculation (in addition to a slower one).