<?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 thanks Ken, we will  check in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1143190#M26162</link>
    <description>&lt;P&gt;thanks Ken, we will&amp;nbsp; check the problem on our side&lt;/P&gt;</description>
    <pubDate>Thu, 19 Mar 2020 09:41:50 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2020-03-19T09:41:50Z</dc:date>
    <item>
      <title>ipprCopyConstBorder_16u_C1V returns ippStsOK when it should return ippStsSizeErr</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1143189#M26161</link>
      <description>&lt;P&gt;My environment:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;IPP 2020&lt;/LI&gt;&lt;LI&gt;Windows 10&lt;/LI&gt;&lt;LI&gt;VS 2019&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'm testing&amp;nbsp;ipprCopyConstBorder_16u_C1V.&lt;/P&gt;&lt;P&gt;It looks like it is&amp;nbsp;designed to place a small image VOI into a large image.&lt;/P&gt;&lt;P&gt;The following code should return a ippStsSizeErr ( since dstRoiVolume.width = 7&amp;nbsp; &amp;lt; srcRoiVolume.width = 5&amp;nbsp; + leftBorderWidth 3 ), but it returns ippStsOk.&lt;/P&gt;&lt;P&gt;Please confirm:&lt;/P&gt;
&lt;PRE class="brush:cpp;"&gt;void TestCopy()
{
	using namespace std;

	const IpprVolume srcSize = { 5,5,5 };
	const IpprVolume dstSize = { 7,7,7 };

	const int numSrc = srcSize.width * srcSize.height * srcSize.depth;
	const int numDst = dstSize.width * dstSize.height * dstSize.depth;

	const int srcStep = srcSize.width * sizeof(unsigned short);
	const int srcPlaneStep = srcSize.width * srcSize.height * sizeof(unsigned short);

	const int dstStep = dstSize.width * sizeof(unsigned short);
	const int dstPlaneStep = dstSize.width * dstSize.height * sizeof(unsigned short);

	vector&amp;lt;unsigned short&amp;gt; srcVol(numSrc), dstVol(numDst);

	memset(dstVol.data(), 0, numDst * sizeof(unsigned short));

	//Set src image.
	int i = 0;
	for (int z = 0; z &amp;lt; srcSize.depth; z++) {
		for (int y = 0; y &amp;lt; srcSize.height; y++) {
			for (int x = 0; x &amp;lt; srcSize.width; x++) {
				cout &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; i;
				srcVol[i++] = i;
			}
			cout &amp;lt;&amp;lt; endl;
		}
		cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;
	}

	cout &amp;lt;&amp;lt; "End outputting src volume" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;
	cout &amp;lt;&amp;lt; "Begin outputting dst volume" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;

	//Using xBorder = 3 should result in a ippStsSizeErr per the documentation!
	int xBorder = 3, yBorder = 2, zBorder = 2;

	unsigned short val = numeric_limits&amp;lt;unsigned short&amp;gt;::max();

	IppStatus sts = ipprCopyConstBorder_16u_C1V(srcVol.data(), srcPlaneStep, srcStep, srcSize, dstVol.data(), dstPlaneStep, dstStep, dstSize, xBorder, yBorder, zBorder, &amp;amp;val);
	assert(sts == ippStsSizeErr);

	i = 0;
	for (int z = 0; z &amp;lt; dstSize.depth; z++) {
		for (int y = 0; y &amp;lt; dstSize.height; y++) {
			for (int x = 0; x &amp;lt; dstSize.width; x++) {
				unsigned val = dstVol[i++];
				cout &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; val;
			}
			cout &amp;lt;&amp;lt; endl;
		}
		cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;
	}

}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 14:37:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1143189#M26161</guid>
      <dc:creator>Ken_Thornton</dc:creator>
      <dc:date>2020-03-17T14:37:58Z</dc:date>
    </item>
    <item>
      <title>thanks Ken, we will  check</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1143190#M26162</link>
      <description>&lt;P&gt;thanks Ken, we will&amp;nbsp; check the problem on our side&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 09:41:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1143190#M26162</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-03-19T09:41:50Z</dc:date>
    </item>
    <item>
      <title>Yes, we confirmed the issue</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1143191#M26163</link>
      <description>&lt;P&gt;Yes, we confirmed the issue with IPP v.2020 and will try to fix it into one of the next updates. We will keep this thread updated with our progress.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 10:52:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1143191#M26163</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-03-19T10:52:54Z</dc:date>
    </item>
    <item>
      <title>Thanks!</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1143192#M26164</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 18:23:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1143192#M26164</guid>
      <dc:creator>Ken_Thornton</dc:creator>
      <dc:date>2020-03-20T18:23:37Z</dc:date>
    </item>
    <item>
      <title>ipprCopyConstBorder</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1193472#M27367</link>
      <description>&lt;P&gt;Was testing this routine again today. What it seems to do is copy an entire source volume into a destination volume. The destination volume is required to be large enough to accommodate the source volume.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;The border width arguments make sense to me as the starting voxel in the destination volume, i.e. {int leftBorder, int topBorder, int forwardBorder} should be replaced by a single argument "IpprPoint startVoxel".&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;My experiments show that all voxels in the destination volume not covered by the copied source volume will be set to the last argument "val".&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;using namespace std;
void OutputVolume(const vector&amp;lt;unsigned short&amp;gt;&amp;amp; vol, IpprVolume size)
{
	int num = static_cast&amp;lt;int&amp;gt;(vol.size());
	if (size.depth * size.height * size.width != num) {
		assert(false);
		return;
	}

	int i = 0;
	for (int z = 0; z &amp;lt; size.depth; z++) {
		cout &amp;lt;&amp;lt; "Begin Slice " &amp;lt;&amp;lt; z &amp;lt;&amp;lt; endl;
		for (int y = 0; y &amp;lt; size.height; y++) {
			for (int x = 0; x &amp;lt; size.width; x++) {
				cout &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; vol[i++];
			}
			cout &amp;lt;&amp;lt; endl;
		}
		cout &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;
	}
}

void TestCopy()
{
	const IpprVolume srcSize = { 3,3,3 };
	const IpprVolume dstSize = { 7,7,7 };

	const int numsrc=srcSize.width * srcSize.height * srcSize.depth;
	const int numDst = dstSize.width * dstSize.height * dstSize.depth;

	const int srcStep = srcSize.width * sizeof(unsigned short);
	const int srcPlaneStep = srcSize.width * srcSize.height * sizeof(unsigned short);

	const int dstStep = dstSize.width * sizeof(unsigned short);
	const int dstPlaneStep = dstSize.width * dstSize.height * sizeof(unsigned short);

	vector&amp;lt;unsigned short&amp;gt; srcVol(numSrc), dstVol(numDst);

	for (int i = 0; i &amp;lt; numSrc; i++) srcVol[i] = i + 1;

	cout &amp;lt;&amp;lt; "Begin outputting src volume" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;
	OutputVolume(srcVol, srcSize);

	//ipprCopyConstBorder copies an entire source volume to a destination volume.
	//The destination volume should be large enough to accommodate the entire source volume.
	//
	//Below I interpret {leftBorder, topBorder, forwardBorder} as the starting voxel in the detination volume.
	//
	//All voxels in the destination volume not covered by the copied source volume will get the background value (last argument to the call).

	unsigned short val = 30; 

	for (int zStart = 0; zStart &amp;lt;= dstSize.depth - srcSize.depth; zStart++) {
		for (int yStart = 0; yStart &amp;lt;= dstSize.height - srcSize.height; yStart++) {
			for (int xStart = 0; xStart &amp;lt;= dstSize.width - srcSize.width; xStart++) {
				memset(dstVol.data(), 0, numDst * sizeof(unsigned short));

				IppStatus sts = ipprCopyConstBorder_16u_C1V(srcVol.data(), srcPlaneStep, srcStep, srcSize, dstVol.data(), dstPlaneStep, dstStep, dstSize, yStart, xStart, zStart, &amp;amp;val);
				assert(sts == ippStsOk);

				OutputVolume(dstVol, dstSize);

				int numBackground = 0;
				for (int i = 0; i &amp;lt; numDst; i++) if (dstVol[i] == val) numBackground++;
				assert(numBackground == numDst - numSrc);
			}
		}
	}

	cout &amp;lt;&amp;lt; "Done" &amp;lt;&amp;lt; endl;

}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 16:39:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1193472#M27367</guid>
      <dc:creator>Ken_Thornton</dc:creator>
      <dc:date>2020-07-19T16:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: ipprCopyConstBorder</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1194097#M27370</link>
      <description>&lt;P&gt;Ken,&lt;/P&gt;
&lt;P&gt;Please check the version of IPP v.2020 update 2 which claims the behavior of ipprCopyConstBorder is changed.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 14:12:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1194097#M27370</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-07-22T14:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: ipprCopyConstBorder</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1194098#M27371</link>
      <description>&lt;P&gt;Here is the output I see with your original case which linked with version 2020 update 2.&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;End outputting src volume&lt;/P&gt;
&lt;P&gt;Begin outputting dst volume&lt;/P&gt;
&lt;P&gt;Status ipprCopyConstBorder_16u_C1V == -6, ippStsSizeErr: Incorrect value for data size&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;======================================================================== &lt;BR /&gt;version of IPP is: ippSP AVX2 (l9) 2020.0.2 (r0xbb6c2c1d) 2020.0.2.-1150538723&lt;BR /&gt;======================================================================== &lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 14:16:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ipprCopyConstBorder-16u-C1V-returns-ippStsOK-when-it-should/m-p/1194098#M27371</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-07-22T14:16:46Z</dc:date>
    </item>
  </channel>
</rss>

