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 13:13:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!opentransit.net!wanadoo.fr!not-for-mail From: Guillaume Foliard Newsgroups: comp.lang.ada Subject: Re: Ada and vectorization Date: Tue, 18 Jun 2002 22:13:11 +0200 Organization: _^_ Message-ID: References: NNTP-Posting-Host: aboulogne-102-1-5-150.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: wanadoo.fr 1024431192 7839 193.252.195.150 (18 Jun 2002 20:13:12 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 18 Jun 2002 20:13:12 GMT User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:26300 Date: 2002-06-18T20:13:12+00:00 List-Id: Matthias Kretschmer wrote: > Having all features architectures provide accessable through a language I > think should be called assembler and has nothing to do with abstraction of > the programming of the underlying hardware. Do we really want to implement > every single feature cpu-designers provide in the language itself? SIMD concepts does not seem a cpu-designer's feature to me, but rather a different approach to problems solving... > Then we > will have some very bloated, complex language which will raise the > difficult level of programming in this language. And this is not the aim > of "higher programming languages". They should make it easy, or we all > could just use assembler. The reason why I personally use Ada is, that it > is abstract, not that I have to care about the hardware and I think this > is the way it should be. I agree with you on this. That's why, I was initially wondering if we could find a way to abstract "vectorization processing". After having read the Intel document on Pentium4 optimizations I don't think compilers can automagically perform a really efficient vectorization as a true vectorization implies algorithms different from the ones used in a sequential processing, and most importantly a different data layout. Can moderm compiler technology deal with data layout, and automatically choose the best one (switch between Arrays of Structs and Structs of Array for instance, an operation called "Data Swizzling" (1)) ? Okay, you may have some optimized loops but a sequential algorithm by its own nature may not be easely transformed to an efficient parallel one by a compiler. If vectorization processing abstraction reveals to be infeasible, we should not be disgusted by introducing some low-level features anyway. After all, there is some quite low-level stuff in the B.2 annex of the Ada95 RM (2). Bitwise operations can really be helpful sometimes. So can be SIMD instructions. (1) http://www.google.fr/search?hl=fr&q=Data+Swizzling&btnG=Recherche+Google&meta= (2) http://www.adahome.com/rm95/rm9x-B-02.html#6