comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Creem <jeff@thecreems.com>
Subject: Re: Ada and SIMD
Date: Mon, 17 Sep 2007 23:15:01 GMT
Date: 2007-09-17T23:15:01+00:00	[thread overview]
Message-ID: <71d3s4-ob9.ln1@newserver.thecreems.com> (raw)
In-Reply-To: <1189996579.648567.17960@w3g2000hsg.googlegroups.com>

Adrian Hoe wrote:
> Hi,
> 
> Does anyone have any idea or experience with Ada on SIMD (Singe
> Instruction, Multiple Data)? And also multi-stage pipelining and of
> course SIMD (e.g. 128-bit integer) on Intel Core 2 Duo and equivalent
> processors?
> 
> Has anybody done any kind of such implementation and how Ada is doing
> with SIMD?
> 
> Thanks.
> --
> Adrian Hoe
> http://adrianhoe.net
> 

I don't know about Ada in general on this topic but I can tell you that 
GNAT (at least in terms of the FSF GCC version)  is not doing at all well.

A few thoughts

1) To really get SIMD bang it helps to write code that is fully SIMD 
aware. Most compilers support some sort of intrinsic types/procedures to 
support SIMD in one flavor or another. GNAT does have support (not that 
I have used) for Altivec intrinsics and further, it emulates them as 
scalar ops on non-altivec platforms.

2) Last I checked, there was not an equivalent version of the intrinsics 
for GNAT x86 SSE style SIMD.

3) Newer GCC versions also support auto vectorization where the compiler 
attempts to discover vectorizable loops. You will almost certainly never 
achieve the same level of performance with this approach as you can by 
structuring the application to use intrinsics...But it can be enough at 
times. Unfortunately, there is been a GCC bug open for almost a year 
indicating that even the most trivial loops will not vectorize from GNAT 
code. (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29533)

As for multi-stage pipelining...I am not exactly sure what you are 
looking for on this topic. GNAT (and most other Ada compilers I've used) 
  typically are aware of pipeline depth and do attempt to schedule 
instructions around it to some extent.

On a related (but not the same topic) I can also confirm that the 
Greenhills compiler appears capable of emitting fused multiply add 
instructions..

I have not attempted to use Greenhills Ada on any target processor that 
has SIMD so i can't really comment on its ability to autovectorize. I 
vaguely recall seeing some libraries that looked like they might support 
altivec via something like the intrinsics....but I never used it.




  reply	other threads:[~2007-09-17 23:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17  2:36 Ada and SIMD Adrian Hoe
2007-09-17 23:15 ` Jeffrey Creem [this message]
2007-09-18 10:22 ` anon
2007-09-19  3:26   ` Adrian Hoe
2007-09-19  5:24     ` anon
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox