<?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 Jeffrey, thank you so much in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/problem-of-clEnqueueMapImage/m-p/1118502#M5453</link>
    <description>&lt;P&gt;Jeffrey, thank you so much for quickly reply. I have found the question. and fixed this problem.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2017 07:06:32 GMT</pubDate>
    <dc:creator>wu__frank</dc:creator>
    <dc:date>2017-03-15T07:06:32Z</dc:date>
    <item>
      <title>problem of clEnqueueMapImage</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/problem-of-clEnqueueMapImage/m-p/1118500#M5451</link>
      <description>&lt;P&gt;Recently I use VME to derive MVs information and I need Write Source and Reference image into memory. I use&amp;nbsp;clEnqueueMapImage to do this operation as follows: (host to device side)&lt;/P&gt;

&lt;P&gt;size_t pitch;&lt;/P&gt;

&lt;P&gt;unsigned char* dst = (&lt;SPAN style="font-size: 13.008px;"&gt;unsigned char*)clEnqueueMapImage(queue, srcImage, CL_TRUE,CL_MAP_WRITE, offset, region, &amp;amp;pitch,0, 0, NULL, NULL, &amp;amp;err);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;unsigned char*&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;src = YBuffer;&lt;/P&gt;

&lt;P&gt;for(i, i&amp;lt;height; i++)&lt;/P&gt;

&lt;P&gt;{&lt;/P&gt;

&lt;P&gt;memcpy(dst, src, sizeof(unsigned char)*width);&lt;/P&gt;

&lt;P&gt;src+=src_pitch;&lt;/P&gt;

&lt;P&gt;dst += pitch;&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;clEnqueueUnmapMemObject(queue, srcImage, dst,0, NULL, NULL);&lt;/P&gt;

&lt;P&gt;The simulation results show wrong data. all MVs are a fix value (-64, -48). However when I use clEnqueueWriteImage, the result is correct. I don't know if the usage of Map/Unmap operation not correct? Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 02:29:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/problem-of-clEnqueueMapImage/m-p/1118500#M5451</guid>
      <dc:creator>wu__frank</dc:creator>
      <dc:date>2017-03-14T02:29:57Z</dc:date>
    </item>
    <item>
      <title>Depending on how the image</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/problem-of-clEnqueueMapImage/m-p/1118501#M5452</link>
      <description>&lt;P&gt;Depending on how the image was created, you may be missing out on the conversion to tiled memory layout that you would get with clEnqueWriteImage.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The driver may be able to help automate the conversion so you can still use mapping.&amp;nbsp; For more information see:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics"&gt;https://software.intel.com/en-us/articles/getting-the-most-from-opencl-12-how-to-increase-performance-by-minimizing-buffer-copies-on-intel-processor-graphics&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 06:26:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/problem-of-clEnqueueMapImage/m-p/1118501#M5452</guid>
      <dc:creator>Jeffrey_M_Intel1</dc:creator>
      <dc:date>2017-03-15T06:26:23Z</dc:date>
    </item>
    <item>
      <title>Jeffrey, thank you so much</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/problem-of-clEnqueueMapImage/m-p/1118502#M5453</link>
      <description>&lt;P&gt;Jeffrey, thank you so much for quickly reply. I have found the question. and fixed this problem.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 07:06:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/problem-of-clEnqueueMapImage/m-p/1118502#M5453</guid>
      <dc:creator>wu__frank</dc:creator>
      <dc:date>2017-03-15T07:06:32Z</dc:date>
    </item>
  </channel>
</rss>

