<?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 Vector find optimize routine in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Vector-find-optimize-routine/m-p/884397#M9911</link>
    <description>&lt;P&gt;Luis,&lt;/P&gt;
&lt;P&gt;there are no such routines into MKL, but you can find similar functionality in Intel IPP.&lt;/P&gt;
&lt;P&gt;Please see into signal processing functionality - threshold functions, which performs the threshold operation on the elements of a vector by limiting the  element values by specified value.&lt;/P&gt;
&lt;P&gt;as an example:&lt;/P&gt;
&lt;P&gt;IppStatus ippsThreshold_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f level, IppCmpOp relOp);&lt;/P&gt;
&lt;P&gt;where Ipp64f == double precison&lt;/P&gt;
&lt;P&gt;Please let us know if any furher guiestions or example .&lt;/P&gt;
&lt;P&gt;--Gennady&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2010 15:57:51 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2010-02-24T15:57:51Z</dc:date>
    <item>
      <title>Vector find optimize routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Vector-find-optimize-routine/m-p/884396#M9910</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;How can I write the following code using the mkl (or other Intel library) optimized vector routines? The main idea is to remove the &lt;B&gt;for&lt;/B&gt; in the "main" code.&lt;/P&gt;
&lt;P&gt;for (v=vsize;v--;){&lt;BR /&gt; &lt;BR /&gt; if (estimate&lt;V&gt; &amp;gt; 0.05) {&lt;BR /&gt; estimate&lt;V&gt; = 200.0;&lt;BR /&gt; } else {&lt;BR /&gt; estimate&lt;V&gt; = 1.0;&lt;BR /&gt; }&lt;/V&gt;&lt;/V&gt;&lt;/V&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;Luis&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2010 15:32:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Vector-find-optimize-routine/m-p/884396#M9910</guid>
      <dc:creator>lgmendes</dc:creator>
      <dc:date>2010-02-24T15:32:43Z</dc:date>
    </item>
    <item>
      <title>Vector find optimize routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Vector-find-optimize-routine/m-p/884397#M9911</link>
      <description>&lt;P&gt;Luis,&lt;/P&gt;
&lt;P&gt;there are no such routines into MKL, but you can find similar functionality in Intel IPP.&lt;/P&gt;
&lt;P&gt;Please see into signal processing functionality - threshold functions, which performs the threshold operation on the elements of a vector by limiting the  element values by specified value.&lt;/P&gt;
&lt;P&gt;as an example:&lt;/P&gt;
&lt;P&gt;IppStatus ippsThreshold_64f(const Ipp64f* pSrc, Ipp64f* pDst, int len, Ipp64f level, IppCmpOp relOp);&lt;/P&gt;
&lt;P&gt;where Ipp64f == double precison&lt;/P&gt;
&lt;P&gt;Please let us know if any furher guiestions or example .&lt;/P&gt;
&lt;P&gt;--Gennady&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2010 15:57:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Vector-find-optimize-routine/m-p/884397#M9911</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2010-02-24T15:57:51Z</dc:date>
    </item>
    <item>
      <title>Vector find optimize routine</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Vector-find-optimize-routine/m-p/884398#M9912</link>
      <description>&lt;DIV id="tiny_quote"&gt;
&lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=465246" class="basic" href="https://community.intel.com/en-us/profile/465246/"&gt;lgmendes&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px inset; margin-left: 2px; margin-right: 2px;"&gt;The main idea is to remove the &lt;B&gt;for&lt;/B&gt; in the "main" code.&lt;I&gt;
&lt;P&gt;for (v=vsize;v--;){&lt;BR /&gt; &lt;BR /&gt; if (estimate&lt;V&gt; &amp;gt; 0.05) {&lt;BR /&gt; estimate&lt;V&gt; = 200.0;&lt;BR /&gt; } else {&lt;BR /&gt; estimate&lt;V&gt; = 1.0;&lt;BR /&gt; }&lt;/V&gt;&lt;/V&gt;&lt;/V&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/I&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;You should be able to vectorize this with icc, something along the line of&lt;/P&gt;
&lt;P&gt;#pragma vector always&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&lt;I&gt;for (v=0; v&lt;VSIZE&gt;&lt;/VSIZE&gt;&lt;/I&gt;&lt;I&gt;&lt;I&gt;estimate&lt;V&gt; = (&lt;/V&gt;&lt;/I&gt;&lt;/I&gt;&lt;I&gt;&lt;I&gt;estimate&lt;V&gt; &amp;gt; 0.05) ? 200. : 1.&lt;/V&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&lt;I&gt;If you don't like for() you should be using Fortran:&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;estimate(0:vsize-1) = merge(200d0,1d0,estimate(0:vsize-1) &amp;gt; .05d0)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2010 16:08:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Vector-find-optimize-routine/m-p/884398#M9912</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-02-24T16:08:39Z</dc:date>
    </item>
  </channel>
</rss>

