comp.lang.ada
 help / color / mirror / Atom feed
* Ada and SIMD
@ 2007-09-17  2:36 Adrian Hoe
  2007-09-17 23:15 ` Jeffrey Creem
  2007-09-18 10:22 ` anon
  0 siblings, 2 replies; 5+ messages in thread
From: Adrian Hoe @ 2007-09-17  2:36 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada and SIMD
  2007-09-17  2:36 Ada and SIMD Adrian Hoe
@ 2007-09-17 23:15 ` Jeffrey Creem
  2007-09-18 10:22 ` anon
  1 sibling, 0 replies; 5+ messages in thread
From: Jeffrey Creem @ 2007-09-17 23:15 UTC (permalink / raw)


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.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada and SIMD
  2007-09-17  2:36 Ada and SIMD Adrian Hoe
  2007-09-17 23:15 ` Jeffrey Creem
@ 2007-09-18 10:22 ` anon
  2007-09-19  3:26   ` Adrian Hoe
  1 sibling, 1 reply; 5+ messages in thread
From: anon @ 2007-09-18 10:22 UTC (permalink / raw)


Ada does have the ability to use SIMD, the only problem is the underlying 
packages. The standard Ada packages do not include a vectorization 
package. But with that understanding, Ada 83 as been use to preform 
vectorization since 83/84.

Anyone can create a SIMD package with the constructs for Ada, To fully 
use the Intel Core-2 multi-core processing all it takes is to use 
System.Machine_code package for the assembly code and create a package 
that would contain the types and procedures to preform the vectorization. 
Like:
   type Vector_Integer is range -( 2 ** 127 ) .. ( 2 ** 127 - 1 ) ;


Also, there may be a doctoral project or two that may perform some SIMD 
or vectorization in Ada with the Pentium-D, that can be either used or 
updated to the Core-2 Dual.

In <1189996579.648567.17960@w3g2000hsg.googlegroups.com>,  Adrian Hoe <abyhoe@gmail.com> writes:
>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
>




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada and SIMD
  2007-09-18 10:22 ` anon
@ 2007-09-19  3:26   ` Adrian Hoe
  2007-09-19  5:24     ` anon
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Hoe @ 2007-09-19  3:26 UTC (permalink / raw)


Thanks for the information. I am looking for SIMD support to port a
PRNG to Ada.

Is there any Ada packages out there for SIMD support?
--
Adrian Hoe
http://adrianhoe.net


On Sep 18, 6:22 pm, a...@anon.org (anon) wrote:
> Ada does have the ability to use SIMD, the only problem is the underlying
> packages. The standard Ada packages do not include a vectorization
> package. But with that understanding, Ada 83 as been use to preform
> vectorization since 83/84.
>
> Anyone can create a SIMD package with the constructs for Ada, To fully
> use the Intel Core-2 multi-core processing all it takes is to use
> System.Machine_code package for the assembly code and create a package
> that would contain the types and procedures to preform the vectorization.
> Like:
>    type Vector_Integer is range -( 2 ** 127 ) .. ( 2 ** 127 - 1 ) ;
>
> Also, there may be a doctoral project or two that may perform some SIMD
> or vectorization in Ada with the Pentium-D, that can be either used or
> updated to the Core-2 Dual.
>
> In <1189996579.648567.17...@w3g2000hsg.googlegroups.com>,  Adrian Hoe <aby...@gmail.com> writes:
>
> >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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Ada and SIMD
  2007-09-19  3:26   ` Adrian Hoe
@ 2007-09-19  5:24     ` anon
  0 siblings, 0 replies; 5+ messages in thread
From: anon @ 2007-09-19  5:24 UTC (permalink / raw)


Adacore created the Altivec packages set back in 2005 for GNAT PRO and 
now you can find some of these packages in GNU GNAT 4.2.0 and 4.3.0 
and future.  

Note: These packages are designed for PowerPC processor.


 File          Package Name
-------------  ------------------------------------------------
 g-allein.ads  GNAT.Altivec.Low_Level_Interface

 g-alleve.adb  GNAT.Altivec.Low_Level_Vectors
 g-alleve.ads

 g-altcon.adb  GNAT.Altivec.Conversions
 g-altcon.ads

 g-altive.ads  GNAT.Altivec -- contains sone doc and a sanple 
                               program in the comments

 g-alveop.adb  GNAT.Altivec.Vector_Operations
 g-alveop.ads

 g-alvety.ads GNAT.Altivec.Vector_Types

 g-alvevi.ads GNAT.Altivec.Vector_Views


In <1190172383.802381.274670@v23g2000prn.googlegroups.com>,  Adrian Hoe <abyhoe@gmail.com> writes:
>Thanks for the information. I am looking for SIMD support to port a
>PRNG to Ada.
>
>Is there any Ada packages out there for SIMD support?
>--
>Adrian Hoe
>http://adrianhoe.net
>
>
>On Sep 18, 6:22 pm, a...@anon.org (anon) wrote:
>> Ada does have the ability to use SIMD, the only problem is the underlying
>> packages. The standard Ada packages do not include a vectorization
>> package. But with that understanding, Ada 83 as been use to preform
>> vectorization since 83/84.
>>
>> Anyone can create a SIMD package with the constructs for Ada, To fully
>> use the Intel Core-2 multi-core processing all it takes is to use
>> System.Machine_code package for the assembly code and create a package
>> that would contain the types and procedures to preform the vectorization.
>> Like:
>>    type Vector_Integer is range -( 2 ** 127 ) .. ( 2 ** 127 - 1 ) ;
>>
>> Also, there may be a doctoral project or two that may perform some SIMD
>> or vectorization in Ada with the Pentium-D, that can be either used or
>> updated to the Core-2 Dual.
>>
>> In <1189996579.648567.17...@w3g2000hsg.googlegroups.com>,  Adrian Hoe <aby...@gmail.com> writes:
>>
>> >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
>
>




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-19  5:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-17  2:36 Ada and SIMD Adrian Hoe
2007-09-17 23:15 ` Jeffrey Creem
2007-09-18 10:22 ` anon
2007-09-19  3:26   ` Adrian Hoe
2007-09-19  5:24     ` anon

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