From: Matthias Kretschmer <schreib_mir_du_spacken@gmx.de>
Subject: Re: Ada and vectorization
Date: Wed, 19 Jun 2002 06:28:56 +0200
Date: 2002-06-19T06:28:56+02:00 [thread overview]
Message-ID: <aep1a6$6nl$01$1@news.t-online.com> (raw)
In-Reply-To: aeo6g0$qb8$1@wanadoo.fr
Guillaume Foliard wrote:
> Matthias Kretschmer wrote:
>
>> As suggest in this thread using pragma for loops only isn't enough I
>> think (so making it complicated I think - bloating the language up),
>> because if you just think about something like:
>> a := a1*a2;
>> b := b1*b2;
>> c := c1*c2;
>> d := d1*d2
>> wouldn't be cool if it is vectorized? you may say, throw anything in an
>> array and then put it in a loop, but can't it happen, that these a,b,c
>> and d aren't related, so putting it together into one array wouldn't be
>> very wise.
>
> Even if there not related from a semantic point of view, they are from a
> computational point of view. For the sake of performance, if performance
> matters of course, why should not we layout data in a efficient manner ?
> This does not break data abstraction, just the layout.
Well I consider this as very ugly, I think - just looking at some compilers
I don't feel unwise or stupid - that the compiler has to care about how to
rearrange stuff, so it runs fast. Do we always want to read these nice
optimization manuals for every new CPU that comes up? I do not want it -
for C I can just wait till a new version of icc is out and magic the same
code runs much faster on the new cpu (as it was with P4 and before with P3
ans so on ...).
>
>> Btw. are there Ada compilers available (beside gcc 3.1 - yes the backend
>> is capable of using the vector units of at least x86-based cpus as stated
>> on gcc.gnu.org) which currently use vectorization and/or inter-procedure
>> optimization?
>
> Just a precision here, GCC 3.1 does not vectorize, it just uses the vector
> unit in a scalar manner as a faster x87 FPU.
> Have you got any links talking about "inter-procedure optimization" ?
ah ok - then I got something wrong - but this is of course available in
other compilers ...
for the last point just look at the icc documents - afaik it uses the same
technique, didn't found useful abstract information about this stuff :( The
Intel C Manual itself holds a short abstract what is done with these
optimizations enable (btw. inter-procedure optimization is available across
module borders - it would be nice to have it, too, for ada across package
borders).
Btw. refering to you other post - I know that it isn't really trivial to
transform a sequential program to a parallel one, but why should be going
one abstraction level back be the right step, maybe if it is getting a
problem for compiler design, we should even try to find some other
solution, even if we loose Ada on the way...
On the other hand, the parallelization of code is done in cpus today - they
are rearranging the code, so it can be executed in parallel, nothing else
has to be done now in the compiler.
--
Greetings
Matthias Kretschmer
next prev parent reply other threads:[~2002-06-19 4:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-16 9:56 Ada and vectorization Guillaume Foliard
2002-06-16 12:50 ` Dale Stanbrough
2002-06-16 20:07 ` Matthias Kretschmer
2002-06-16 22:38 ` Robert A Duff
2002-06-18 8:24 ` Matthias Kretschmer
2002-06-18 10:02 ` Dale Stanbrough
2002-06-18 16:21 ` Matthias Kretschmer
2002-06-18 19:13 ` Robert A Duff
2002-06-18 20:12 ` Matthias Kretschmer
2002-06-18 20:51 ` Guillaume Foliard
2002-06-19 4:28 ` Matthias Kretschmer [this message]
2002-06-18 20:13 ` Guillaume Foliard
2002-06-18 17:46 ` Ted Dennison
2002-06-16 22:45 ` Ted Dennison
2002-06-17 23:47 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox