<?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 function returns wrongly! in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/function-returns-wrongly/m-p/826816#M5232</link>
    <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;I am implementing a class under visual studio using Intel library functions and basically there is Black function that calls Correlation function. When I output the results in the Correlation function, it is ok but when I output the results after the call in the Black function, then the output is wrong. I will appreciate if someone can help me?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the header file of Colour.h:&lt;/P&gt;&lt;P&gt;private:&lt;/P&gt;&lt;P&gt;Ipp32fc* pZero;&lt;/P&gt;&lt;P&gt;-----------------------&lt;/P&gt;&lt;P&gt;In the cpp file:&lt;/P&gt;&lt;P&gt;Colour::Colour(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;pZero = NULL;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void Colour::allocate(int nLenOr)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; pZero = ippsMalloc_32fc(5*len); &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void Colour::Black(Ipp32f *samples, Ipp32f *s, int sampleSize, int *Size)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; Correlation(pSignal, pInvZero, 2*len-2, 3*nFFTlenSegment-5, pZero );&lt;/P&gt;&lt;P&gt; for(int r=0; r&amp;lt;5*len-7; r++)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; stream&amp;lt;&lt;R&gt;&amp;lt;&amp;lt; "\\t"&amp;lt;&lt;PZERO&gt;&lt;R&gt;.re&amp;lt;&amp;lt;"\\t"&amp;lt;&lt;PZERO&gt;&lt;R&gt;.im&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;&lt;/R&gt;&lt;/PZERO&gt;&lt;/R&gt;&lt;/PZERO&gt;&lt;/R&gt;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void Colour::Correlation (Ipp32fc *sample1, Ipp32fc *sample2, int len1, int len2, Ipp32fc *pSamplesOut)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; int sumlen = len1+len2-1;&lt;/P&gt;&lt;P&gt; for(int rr = 0; rr&amp;lt; sumlen; rr++)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; pSamplesOut[rr].re = pSamplesOut[rr].re;&lt;/P&gt;&lt;P&gt; pSamplesOut[rr].im = pSamplesOut[rr].im;&lt;/P&gt;&lt;P&gt; stream&amp;lt;&lt;RR&gt;&amp;lt;&amp;lt;"\\t"&amp;lt;&lt;PSAMPLESOUT&gt;&lt;/PSAMPLESOUT&gt;&lt;/RR&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;} &lt;/P&gt;</description>
    <pubDate>Thu, 10 May 2012 09:04:48 GMT</pubDate>
    <dc:creator>calimero</dc:creator>
    <dc:date>2012-05-10T09:04:48Z</dc:date>
    <item>
      <title>function returns wrongly!</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/function-returns-wrongly/m-p/826816#M5232</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;I am implementing a class under visual studio using Intel library functions and basically there is Black function that calls Correlation function. When I output the results in the Correlation function, it is ok but when I output the results after the call in the Black function, then the output is wrong. I will appreciate if someone can help me?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the header file of Colour.h:&lt;/P&gt;&lt;P&gt;private:&lt;/P&gt;&lt;P&gt;Ipp32fc* pZero;&lt;/P&gt;&lt;P&gt;-----------------------&lt;/P&gt;&lt;P&gt;In the cpp file:&lt;/P&gt;&lt;P&gt;Colour::Colour(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;pZero = NULL;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void Colour::allocate(int nLenOr)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; pZero = ippsMalloc_32fc(5*len); &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void Colour::Black(Ipp32f *samples, Ipp32f *s, int sampleSize, int *Size)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; Correlation(pSignal, pInvZero, 2*len-2, 3*nFFTlenSegment-5, pZero );&lt;/P&gt;&lt;P&gt; for(int r=0; r&amp;lt;5*len-7; r++)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; stream&amp;lt;&lt;R&gt;&amp;lt;&amp;lt; "\\t"&amp;lt;&lt;PZERO&gt;&lt;R&gt;.re&amp;lt;&amp;lt;"\\t"&amp;lt;&lt;PZERO&gt;&lt;R&gt;.im&amp;lt;&lt;ENDL&gt;&lt;/ENDL&gt;&lt;/R&gt;&lt;/PZERO&gt;&lt;/R&gt;&lt;/PZERO&gt;&lt;/R&gt;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void Colour::Correlation (Ipp32fc *sample1, Ipp32fc *sample2, int len1, int len2, Ipp32fc *pSamplesOut)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; int sumlen = len1+len2-1;&lt;/P&gt;&lt;P&gt; for(int rr = 0; rr&amp;lt; sumlen; rr++)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt; pSamplesOut[rr].re = pSamplesOut[rr].re;&lt;/P&gt;&lt;P&gt; pSamplesOut[rr].im = pSamplesOut[rr].im;&lt;/P&gt;&lt;P&gt; stream&amp;lt;&lt;RR&gt;&amp;lt;&amp;lt;"\\t"&amp;lt;&lt;PSAMPLESOUT&gt;&lt;/PSAMPLESOUT&gt;&lt;/RR&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;} &lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2012 09:04:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/function-returns-wrongly/m-p/826816#M5232</guid>
      <dc:creator>calimero</dc:creator>
      <dc:date>2012-05-10T09:04:48Z</dc:date>
    </item>
  </channel>
</rss>

