- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have recently started with SIMD and SSE instructions coding. To access individual elements of the 128 bits register, I do like this xml.m128i_i8. But it gives compilation error :-
1>.outline_correct_C.cpp(65): error: union "__m128i" has no member "m128i_i8"
1> if(xm1.m128i_i8)
1> ^
1>
1>.outline_correct_C.cpp(65): error: expression must have class type
1> if(xm1.m128i_i8)
But, I have checked similar uses in the manuals also. Can you please clarify.
With regards.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The __m128i type is definedas the following - please see the emmintrin.h include file
typedef union { char c[16]; } __m128i;
and therefore the error that you get is actuallyOK froma compiler ppoint of view and does not have anything to do with the SSE or SIMD per se.Could you please post your source code so that we can get you started?
Cheers,
Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your prompt reply.. I was using Intel's Compiler 10.1 with this which was giving this error. But, on using VC++ compiler, it does not give.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is because Intel Compiler xmmintrin.h has different definition for __m128i than MSVC compiler.
![](/skins/images/872293744008A34B36F8ABF94A46CC66/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page