- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please can anyone suggest if there is any way to set, compare and add 16 unsigned 8-bit data elements of two XMM __m128i registers. What I am finding isthe signed operations and that everything after 127 is turned around and made to start from negative end. But I wish to do set, add and compare two __m128i registers having unsigned values more than 127.
Any suggestions on this is greatly appreciable.
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use an offset of -128 for all your data. As long as you only add and compare numbers, this will work.
Alternatively, you can convert the 8bit values to 16bit values for processing using pmovzxbw or pshufb. This way, you can only process 8 values in parallel but it is still better than not using SSE at all.
Kind regards
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page