Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Compilation error in icc

Abhisek_P_Intel
Employee
529 Views

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
Judith_W_Intel
Employee
529 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-studio-c

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
Reply