- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 = A + B
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The forum you originally posted this to is specifically for the Intel® Xeon Phi™ coprocessor. Although you would undoubtedly have received an answer there, I decided to split your post off from the thread you had add this as a comment to and sent it off as it's own thread to what I believe is a more appropriate forum. But my first question to you would be - what level of vectorization report did you generate? Since you are still using the Intel C compiler version 13, you probably used -vec-report to generate your report. Saying '-vec-report' is the same as saying '-vec-report=2' which only tells you what loops vectorized. You will probably want to make that '-vec-report=3'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wrote a reply but was blocked possibly due to frances starting to move it. As she said, you must choose a high enough report level for the diagnostics you want, and current compilers may give better information.
A difference with static declaration is the requirement to provide for the possibility of data set in an earlier instance of the function, possibly preventing local analysis of aliasing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chaitali,
The vectorization report generated depends on the level you use for reporting like Tim/Frances opined. The link below should give you a detailed info on how best you can use the new optimization report options starting with 15.X versions:
_Kittur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello...
I have used -vec-report=6 for it. It supposed to give details of loops which are vectorized
or not vectorized with possible causes.
As I understand alignment of data is necessary for vectorization to succeed.
It does it successfully for dynamic memory allocation but not with static memory allocation even if I do alignment
nor does it gives statement like "vectorization is not possible".
Regards,
Chaitali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chaitali,
Could you please attach the test reproducer to this issue? Thanks
_Kittur

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page