Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
79 Views

Compilation error in icc

the following code is being compiled properly with gcc but giving error with icc in windows.

#ifdef CPUKIND_IA

 typedef int _v4si __attribute__ ((vector_size(16)));

Error : expected a ';' before __attribute__

Options :  /Z7 /c /O3 /QxSSSE3_ATOM /Qfreestanding -DCPUKIND_IA -DLMT_CORE0

I am new to this compiler. Can anyone help ?

0 Kudos
1 Reply
Highlighted
Employee
79 Views

 

attributes in general and in particular GNU vector attributes are a GNU extension and thus they are not supported on Windows where we are Microsoft compatible.

The Microsoft/Windows equivalents are the built-in SIMD types on Windows – i.e. those defined in the *mmintin.h header files (e.g. __m128).

For more info see:

http://stackoverflow.com/questions/8290177/what-is-the-equivalent-of-v4sf-and-attribute-in-visual-st...

https://felix.abecassis.me/2011/09/cpp-getting-started-with-sse/

I think the v4si type with GNU is roughly equivalent to the __m128i type on Windows. The Windows types are not predefined, you need to include the appropriate mmintrin.h header to get the declarations.

Judy

 

 

0 Kudos