Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Auto-vectorization

Name: Anonymous 2007-02-03 23:05

So I decided to mess around with the auto-vectorization in gcc and I must say, it sucks balls. I certainly didn't expect it to generate decent code, but I kinda expected to, you know, vectorize easily vectorizable loops? Like

for(i=0; i<512; i++)
    samples[i] *= window[i];

Seriously, it doesn't get much simpler than this. And gcc leaves it as scalar. So, /prog/, is auto-vectorization good for anything now other than marketing fodder?

Name: Anonymous 2007-02-03 23:34

>>1
If it didn't vectorize that, you fucked something up.

Name: Anonymous 2007-02-04 1:42

>>2
It looks like gcc will happily vectorize the loop when it's

for(i=0; i<512; i++)
    samples[i] = window[i] * 2;

Is there some good reason why gcc can't vectorize it when samples[i] is on both the left and right of the assignment?

Name: Anonymous 2007-02-04 2:52

What the fuck is vectorization?

Name: Anonymous 2007-02-04 3:59

>>4
Making the compiler unroll your loops into SSE instructions.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List