c++ - Matrix vectorization using SIMD -


i'm trying vectorized following loop (only inner) :

for (int =0; i<n; i++){     const int line = * width;     (int j = 0; j < n; j++){         a[line + j] = 3;     } } 

but i'm getting following error:

not vectorized: not suitable gather d.38226_277 = *d.38225_276;

i googled around , it's seems compiler not vectorize because, not know data contiguous. i'm sure data ([line + j]) contiguous. how can tell compiler trust me , vectorize loop ?

i'm using gcc 4.7


edit:

i able vetorize loop without change in code using intel compiler.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -