<?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 Sum of powers in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800616#M3197</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I think it should be possible to achieve that with call of two IPP functions (ippsPowx and ippsSum) something like pseudo code below&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// allocate memory for vector ofresulted power values&lt;BR /&gt;// n - is lenght of vector&lt;BR /&gt;pow_a_x = ippMalloc(n*sizeof(Ipp32f))&lt;BR /&gt;&lt;BR /&gt;Ipp32f x; //value of power you want to raise elements of vector a&lt;BR /&gt;&lt;BR /&gt;//raise eachelements of vector a to power x&lt;BR /&gt;ippsPowx_32f_A24(a, x, pow_a_x);&lt;BR /&gt;&lt;BR /&gt;Ipp32f sum;&lt;BR /&gt;// compute sum of elements of array pow_a_x&lt;BR /&gt;ippsSum_32f(pow_a_x, n, ∑, ippAlgHintAccurate);&lt;BR /&gt;&lt;BR /&gt;Function ippsPowx declared in ippvm.h and function ippsSum decleared in ipps.h file. You will need to link with ipps.lib and ippvm.lib libraries.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir</description>
    <pubDate>Wed, 27 Oct 2010 17:29:56 GMT</pubDate>
    <dc:creator>Vladimir_Dudnik</dc:creator>
    <dc:date>2010-10-27T17:29:56Z</dc:date>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800609#M3190</link>
      <description>Is there any method to compute sum of powers without using extra space?&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;P.S. I need this to compute p-norm of the vector.&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 Oct 2010 14:16:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800609#M3190</guid>
      <dc:creator>Vitali_Haravy</dc:creator>
      <dc:date>2010-10-25T14:16:49Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800610#M3191</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here are list of power functions implemented in IPP as per IEEE-754 standard.&lt;/P&gt;&lt;P&gt;&lt;A href="http://software.intel.com/sites/products/documentation/hpc/ipp/ipps/ipps_ch12/ch12_Intro.html"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="http://software.intel.com/sites/products/documentation/hpc/ipp/ipps/ipps_ch12/ch12_Intro.html" target="_blank"&gt;http://software.intel.com/sites/products/documentation/hpc/ipp/ipps/ipps_ch12/ch12_Intro.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naveen Gv&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2010 15:03:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800610#M3191</guid>
      <dc:creator>Naveen_G_Intel</dc:creator>
      <dc:date>2010-10-25T15:03:00Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800611#M3192</link>
      <description>Thanks.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;But I need to compute the following:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;s = pow(a[0], p) + pow(a[1], p) + ... + pow(a[n - 1], p)&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;To calculate such a sum I need an extra space because I can't destroy the original content of the array:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;1. Use &lt;B&gt;Powx&lt;/B&gt; function to compute powers:&lt;/DIV&gt;&lt;DIV&gt;    b&lt;I&gt; = pow(a&lt;I&gt;, p), i = 0 .. n - 1&lt;/I&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;2. Use &lt;B&gt;Sum&lt;/B&gt;function to compute sum:&lt;/DIV&gt;&lt;DIV&gt;    s = b[0] + b[1] + ... + b[n - 1]&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;In certain situations I should also compute absolute values before computing powers.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The question was whether I could compute such sums without utilizing an extra space. Do you have any suggestions how to do it?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 Oct 2010 15:21:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800611#M3192</guid>
      <dc:creator>Vitali_Haravy</dc:creator>
      <dc:date>2010-10-25T15:21:26Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800612#M3193</link>
      <description>Hello, &lt;BR /&gt;&lt;BR /&gt;It does not look easy with IPP function call. If the code cares about the memory use it will cause, can it use a small temporary data block, for example, 128size ofdata? Calculate the first 128 data first, then next 128 data,etc.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao</description>
      <pubDate>Tue, 26 Oct 2010 02:08:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800612#M3193</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2010-10-26T02:08:04Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800613#M3194</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=21699" class="basic" href="https://community.intel.com/en-us/profile/21699/"&gt;Chao Y (Intel)&lt;/A&gt;&lt;/DIV&gt;
                &lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px; border-style: inset; margin-left: 2px; margin-right: 2px;"&gt;&lt;I&gt;Hello, &lt;BR /&gt;&lt;BR /&gt;It does not look easy with IPP function call. If the code cares about the memory use it will cause, can it use a small temporary data block, for example, 128size ofdata? Calculate the first 128 data first, then next 128 data,etc.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;What about MKL + IPP? Maybe using these two libraries it's possible to accomplish the required result?</description>
      <pubDate>Tue, 26 Oct 2010 15:18:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800613#M3194</guid>
      <dc:creator>Vitali_Haravy</dc:creator>
      <dc:date>2010-10-26T15:18:02Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800614#M3195</link>
      <description>&lt;P&gt;&lt;BR /&gt;MKL vdPowx( n, a, b, y ) support in-place operation. You may call this function, put the out-put value into a&lt;I&gt;, then sum the a&lt;I&gt; value. &lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Chao &lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2010 02:44:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800614#M3195</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2010-10-27T02:44:14Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800615#M3196</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=21699" class="basic" href="https://community.intel.com/en-us/profile/21699/"&gt;Chao Y (Intel)&lt;/A&gt;&lt;/DIV&gt;
                &lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px; border-style: inset; margin-left: 2px; margin-right: 2px;"&gt;&lt;I&gt;&lt;P&gt;&lt;BR /&gt;MKL vdPowx( n, a, b, y ) support in-place operation. You may call this function, put the out-put value into a&lt;I&gt;, then sum the a&lt;I&gt; value. &lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Chao &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;I know about this, but this function will destroy the original content of the array. I'd like to find a way to compute sum of powers without using additional buffer. Of course, I can do it in the following manner:&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;double sum = 0.0;&lt;/DIV&gt;&lt;DIV&gt;for (int i = 0; i &amp;lt; n; ++i)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt; sum += pow(a&lt;I&gt;, x);&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;But I was hoping to find a way to do it faster by using MKL and IPP.&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Oct 2010 12:02:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800615#M3196</guid>
      <dc:creator>Vitali_Haravy</dc:creator>
      <dc:date>2010-10-27T12:02:06Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800616#M3197</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I think it should be possible to achieve that with call of two IPP functions (ippsPowx and ippsSum) something like pseudo code below&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// allocate memory for vector ofresulted power values&lt;BR /&gt;// n - is lenght of vector&lt;BR /&gt;pow_a_x = ippMalloc(n*sizeof(Ipp32f))&lt;BR /&gt;&lt;BR /&gt;Ipp32f x; //value of power you want to raise elements of vector a&lt;BR /&gt;&lt;BR /&gt;//raise eachelements of vector a to power x&lt;BR /&gt;ippsPowx_32f_A24(a, x, pow_a_x);&lt;BR /&gt;&lt;BR /&gt;Ipp32f sum;&lt;BR /&gt;// compute sum of elements of array pow_a_x&lt;BR /&gt;ippsSum_32f(pow_a_x, n, ∑, ippAlgHintAccurate);&lt;BR /&gt;&lt;BR /&gt;Function ippsPowx declared in ippvm.h and function ippsSum decleared in ipps.h file. You will need to link with ipps.lib and ippvm.lib libraries.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir</description>
      <pubDate>Wed, 27 Oct 2010 17:29:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800616#M3197</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2010-10-27T17:29:56Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800617#M3198</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=336498" class="basic" href="https://community.intel.com/en-us/profile/336498/"&gt;Vladimir Dudnik (Intel)&lt;/A&gt;&lt;/DIV&gt;
                &lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px; border-style: inset; margin-left: 2px; margin-right: 2px;"&gt;&lt;I&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I think it should be possible to achieve that with call of two IPP functions (ippsPowx and ippsSum) something like pseudo code below&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// allocate memory for vector ofresulted power values&lt;BR /&gt;// n - is lenght of vector&lt;BR /&gt;pow_a_x = ippMalloc(n*sizeof(Ipp32f))&lt;BR /&gt;&lt;BR /&gt;Ipp32f x; //value of power you want to raise elements of vector a&lt;BR /&gt;&lt;BR /&gt;//raise eachelements of vector a to power x&lt;BR /&gt;ippsPowx_32f_A24(a, x, pow_a_x);&lt;BR /&gt;&lt;BR /&gt;Ipp32f sum;&lt;BR /&gt;// compute sum of elements of array pow_a_x&lt;BR /&gt;ippsSum_32f(pow_a_x, n, ∑, ippAlgHintAccurate);&lt;BR /&gt;&lt;BR /&gt;Function ippsPowx declared in ippvm.h and function ippsSum decleared in ipps.h file. You will need to link with ipps.lib and ippvm.lib libraries.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt; Vladimir&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;Thanks. But you have not read my posts carefully. The question is &lt;B&gt;if I can compute sum of powers without allocating extra array and without destroying the content of original array&lt;/B&gt;.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Currently I have several alternatives:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;1. Allocate full length array and use MKL/IPP in the way similar to the one you proposed.&lt;/DIV&gt;&lt;DIV&gt;2. Do it manually. No extra space is required.&lt;/DIV&gt;&lt;DIV&gt;3. Allocate small array and compute the sum of powers by blocks (thanks to Chao Y for proposition).&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;It seems strange that such libraries like MKL and IPP doesn't have required functionality.&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Oct 2010 17:52:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800617#M3198</guid>
      <dc:creator>Vitali_Haravy</dc:creator>
      <dc:date>2010-10-27T17:52:41Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800618#M3199</link>
      <description>Oh, yes. I did not notice you already consider that variant. But I do not thinkit is really strange that libraries does not have this particular variant implemented as single call. More important they provide you with building blocks which are primitive enough that you may construct any variant. That is more flexible approach, I think.&lt;BR /&gt;&lt;BR /&gt;Vladimir</description>
      <pubDate>Wed, 27 Oct 2010 18:07:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800618#M3199</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2010-10-27T18:07:10Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800619#M3200</link>
      <description>You are right, but in some situations (i.e. like this) there are not enough building blocks to perform required operations efficiently.&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;P. S. By the way, Intel IPP library has routines for computing L1, L2 or infinity norm, but has no routine to compute the general case (I mean p-norm).&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Oct 2010 18:20:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800619#M3200</guid>
      <dc:creator>Vitali_Haravy</dc:creator>
      <dc:date>2010-10-27T18:20:55Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800620#M3201</link>
      <description>Vitali,&lt;BR /&gt;&lt;BR /&gt;are you bound to MKL/IPP?? Otherwise you could program a simple loop using intrinsics and short vector math library, see compiler documentation. You only need _mm_pow_pd, _mm_add_pd and a final _mm_hadd_pd.&lt;BR /&gt;&lt;BR /&gt;Best regards, TJ</description>
      <pubDate>Thu, 28 Oct 2010 07:42:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800620#M3201</guid>
      <dc:creator>Thomas_B_3</dc:creator>
      <dc:date>2010-10-28T07:42:33Z</dc:date>
    </item>
    <item>
      <title>Sum of powers</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800621#M3202</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=412460" class="basic" href="https://community.intel.com/en-us/profile/412460/"&gt;TJ04&lt;/A&gt;&lt;/DIV&gt;
                &lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px; border-style: inset; margin-left: 2px; margin-right: 2px;"&gt;&lt;I&gt;Vitali,&lt;BR /&gt;&lt;BR /&gt;are you bound to MKL/IPP?? Otherwise you could program a simple loop using intrinsics and short vector math library, see compiler documentation. You only need _mm_pow_pd, _mm_add_pd and a final _mm_hadd_pd.&lt;BR /&gt;&lt;BR /&gt;Best regards, TJ&lt;/I&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;TJ,&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I am afraid that I'm bound to MKL+IPP (we don't use Intel Compiler), but in any case thanks for information.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Best regards,&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Vitali.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Oct 2010 08:37:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Sum-of-powers/m-p/800621#M3202</guid>
      <dc:creator>Vitali_Haravy</dc:creator>
      <dc:date>2010-10-28T08:37:49Z</dc:date>
    </item>
  </channel>
</rss>

