<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Compare functions in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Compare-functions/m-p/773603#M1017</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Swoncen,&lt;/P&gt;&lt;P&gt;To discuss about CPU instruction, we have a separate forum &lt;A href="-http:/software.intel.com/en-us/forums/intel-avx-and-cpu-instructions/"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Intel AVX and CPU Instructions&lt;/SPAN&gt;&lt;/A&gt; , please submit it there, this forum is only for Intel Performance library(Intel IPP) related discussion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Naveen Gv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2010 10:48:39 GMT</pubDate>
    <dc:creator>Naveen_G_Intel</dc:creator>
    <dc:date>2010-08-12T10:48:39Z</dc:date>
    <item>
      <title>Compare functions</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Compare-functions/m-p/773602#M1016</link>
      <description>Hi,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I hope this is the right forum because I couldn't find any SIMD subforum here.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;My problem:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I want to optimize the following code with SSE2 (_mm_cmpgt_epi8):&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[bash]int16 kr = 16;
for(x = 0; x &amp;lt; xr; x++)
{
	if(*inPtr &amp;gt; this-&amp;gt;m_SaturationMin)
		col&lt;X&gt;--;
	else
		col&lt;X&gt; = kr-1;
	inPtr++;
}[/bash]&lt;/X&gt;&lt;/X&gt;&lt;/PRE&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;B&gt;col&lt;/B&gt; is an array in which resulting indices are stored, &lt;B&gt;inPtr &lt;/B&gt;is an image,&lt;B&gt; this-&amp;gt;m_SaturationMin&lt;/B&gt; is an integer value (0 most of the time). I thought I could use&lt;I&gt;_mm_cmpgt_epi8 &lt;/I&gt;(&lt;A href="http://msdn.microsoft.com/en-us/library/wf45zt2b(v=VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/wf45zt2b(v=VS.80).aspx&lt;/A&gt;) where &lt;B&gt;a &lt;/B&gt;is the pointer from &lt;B&gt;inPtr&lt;/B&gt;and &lt;B&gt;b&lt;/B&gt;is &lt;B&gt;this-&amp;gt;m_SaturationMin&lt;/B&gt;. The output would be 255 or 0 for the elements and I would need col&lt;X&gt;-- 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.&lt;/X&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance.&lt;/DIV&gt;&lt;DIV&gt;Swoncen&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Jul 2010 16:19:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Compare-functions/m-p/773602#M1016</guid>
      <dc:creator>swoncen</dc:creator>
      <dc:date>2010-07-26T16:19:15Z</dc:date>
    </item>
    <item>
      <title>Compare functions</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Compare-functions/m-p/773603#M1017</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Swoncen,&lt;/P&gt;&lt;P&gt;To discuss about CPU instruction, we have a separate forum &lt;A href="-http:/software.intel.com/en-us/forums/intel-avx-and-cpu-instructions/"&gt;&lt;SPAN style="text-decoration: underline;"&gt;Intel AVX and CPU Instructions&lt;/SPAN&gt;&lt;/A&gt; , please submit it there, this forum is only for Intel Performance library(Intel IPP) related discussion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Naveen Gv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2010 10:48:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Compare-functions/m-p/773603#M1017</guid>
      <dc:creator>Naveen_G_Intel</dc:creator>
      <dc:date>2010-08-12T10:48:39Z</dc:date>
    </item>
  </channel>
</rss>

