gcc autovectorize

Boudewijn Rempt boud at valdyas.org
Mon Dec 11 22:09:47 CET 2006


On Monday 11 December 2006 17:01, Tom Burdick wrote:
> I thought it worthy of mentioning, that in all of the newest GCC's (4.x and
> higher) there is an autovectorizing option. I've been using this in a
> project of my own and its made certain loops significantly faster. I'd
> suggest possibly trying krita with the flags this way to see what gcc
> vectorizes or not. Notably, it will automatically take a loop like
>
> for(int i = 0; i < 64; i++) {
> 	a[i]  = b[i]*c[i];
> }
>
> and instead use whatever simd instructions you have to eliminate a good
> number of iterations.
>
> If you've already tried this out, or are already using the simd
> instructions disregard!

That's a good point, we don't do this. What do we need to do to enable it?

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20061211/eda4e7c2/attachment.pgp 


More information about the kimageshop mailing list