Quantcast
Channel: Intel® C++-Compiler
Viewing all articles
Browse latest Browse all 1665

simple vector addition

$
0
0

 

Hello,

I have a question w.r.t below scenario on Intel Sandy Bridge,

For simple vector addition code in C,

If I do dynamic memory allocation it vectorizes the main addition loop

    C[i] = A[i] + B[i]

even if I do not use any restrict keyword (icc 13)

But if I statically allocate arrays, it does not vectorize loop nor it specifies something about it in vectorization report.

Even if I do allocation using declspec(align) it does not vectorize.

What can be the causes ?

Thanks in advance,

  Chaitali

 


Viewing all articles
Browse latest Browse all 1665

Trending Articles