Community
cancel
Showing results for 
Search instead for 
Did you mean: 
meldaproduction
Beginner
115 Views

_Pragma("vector always") errors

_Pragma("vector always") causes compilation errors with the newest ICC. I'm not explicitly enabling C++11 or anything.

0 Kudos
6 Replies
TimP
Black Belt
115 Views

According to MSDN, __pragma (double leading underscore) is a Microsoft specific equivalent of #pragma for use within a macro definition.  I haven't seen any evidence they support it for the purpose of replacing ICL #pragma vector always; my experience has been that MSVC++ ignores ICL pragmas.  So you'd have to explain further why you would try to merge Intel and Microsoft-specific pragmas.

Even the interoperability of __restrict between ICL and MSVC++ is limited in ways I don't fully understand.  I suppose ICL would follow linux practice on extensions which don't have equivalent MSVC++ support.  It's annoying enough that alignment attributes aren't portable between Windows and linux compilation.

meldaproduction
Beginner
115 Views

Nope, apparently _Pragma (single underscore) is part of the standard. I enabled C++11 and it seems to work now (whether it does something, that I don't know :D ).

http://stackoverflow.com/questions/3030099/pragma-in-define-macro

Kittur_G_Intel
Employee
115 Views

Hi,
I tried on a small test case on Linux with ICC and it works fine:

void vec_always(int *a, int *b, int m) {
int i;
 _Pragma("vector always")
//#pragma vector always
for(i = 0; i <= m; i++)
   a[32*i] = b[99*i];
}

Need to find out how it works with ICL and confirm as well from the product team and let you know
_Kittur

Kittur_G_Intel
Employee
115 Views

Hi,
The same is true for ICL as well. Let me know if you still has any further questions/clarifications?
_Kittur 

meldaproduction
Beginner
115 Views

It's fine, it seems that enabling C++11 does the trick, perhaps some eariler version would do the trick as well.

Kittur_G_Intel
Employee
115 Views

I agree, that's correct. Thanks for confirming the same.

_Kittur 

Reply