- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I hope this is the right forum because I couldn't find any SIMD subforum here.
My problem:
I want to optimize the following code with SSE2 (_mm_cmpgt_epi8):
[bash]int16 kr = 16; for(x = 0; x < xr; x++) { if(*inPtr > this->m_SaturationMin) col--; else col = kr-1; inPtr++; }[/bash]
col is an array in which resulting indices are stored, inPtr is an image, this->m_SaturationMin is an integer value (0 most of the time). I thought I could use_mm_cmpgt_epi8 (http://msdn.microsoft.com/en-us/library/wf45zt2b(v=VS.80).aspx) where a is the pointer from inPtrand bis this->m_SaturationMin. The output would be 255 or 0 for the elements and I would need col-- and kr-1 as output. I had some ideas to work around with shifting bits and such, but in the end it wouldn't be much of a performance increase. Is there any function which does something similar what I need (SSE,SSE2,SSE3,SSE4)? I don't own the ipp, but maybe someone knows a function which does exactly what I described - then I could read in the manual how to do it.
Thanks in advance.
Swoncen
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Swoncen,
To discuss about CPU instruction, we have a separate forum Intel AVX and CPU Instructions , please submit it there, this forum is only for Intel Performance library(Intel IPP) related discussion.
Thank you,
Naveen Gv
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