<?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 Bruce, in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917541#M1373</link>
    <description>Bruce,

I don't think that's a bug. The spec clearly says this about sizeof - "When applied to an operand that is a vector type, the result is number of components * size of each scalar component (Except for 3-component vectors whose size is defined as 4 * size of each scalar component.)". So it appears that Intel's behavior is correct.

Thanks,
Raghu</description>
    <pubDate>Sat, 06 Oct 2012 00:09:20 GMT</pubDate>
    <dc:creator>Raghupathi_M_Intel</dc:creator>
    <dc:date>2012-10-06T00:09:20Z</dc:date>
    <item>
      <title>clSetKernelArg bug for &lt;type&gt;3 arguments</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917540#M1372</link>
      <description>&lt;P&gt;I've found a bug in the 2013 beta Linux build: when using clSetKernelArg to set an int3 argument, it fails if sizeof(cl_int3) is used as the size. It accepts 3 * sizeof(cl_int), but the CL spec is pretty clear that the API type corresponding to int3 is cl_int3, not cl_int[3] (there's a table at the start of section 6.1.2 in the CL 1.1 spec). The sizes are different because cl_int3 is padded to 4*sizeof(cl_int).&lt;/P&gt;
&lt;P&gt;Both the NVIDIA and AMD OpenCL implementations expect the size to be sizeof(cl_int3).&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2012 08:08:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917540#M1372</guid>
      <dc:creator>Bruce_M_</dc:creator>
      <dc:date>2012-10-05T08:08:50Z</dc:date>
    </item>
    <item>
      <title>Bruce,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917541#M1373</link>
      <description>Bruce,

I don't think that's a bug. The spec clearly says this about sizeof - "When applied to an operand that is a vector type, the result is number of components * size of each scalar component (Except for 3-component vectors whose size is defined as 4 * size of each scalar component.)". So it appears that Intel's behavior is correct.

Thanks,
Raghu</description>
      <pubDate>Sat, 06 Oct 2012 00:09:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917541#M1373</guid>
      <dc:creator>Raghupathi_M_Intel</dc:creator>
      <dc:date>2012-10-06T00:09:20Z</dc:date>
    </item>
    <item>
      <title>Quote:Raghupathi</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917542#M1374</link>
      <description>&lt;BLOCKQUOTE&gt;Raghupathi Muthyalampalli (Intel) wrote:&lt;BR /&gt;&lt;P&gt;Bruce,&lt;/P&gt;
&lt;P&gt;"When applied to an operand that is a vector type, the result is number of components * size of each scalar component (Except for 3-component vectors whose size is defined as 4 * size of each scalar component.)"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
Actually I think the part in parentheses supports my point: the size of an int3 is 16, not 12, yet clSetKernelArg only works when I pass a size of 12.</description>
      <pubDate>Sat, 06 Oct 2012 07:14:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917542#M1374</guid>
      <dc:creator>Bruce_M_</dc:creator>
      <dc:date>2012-10-06T07:14:37Z</dc:date>
    </item>
    <item>
      <title>Ah sorry. I thought your</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917543#M1375</link>
      <description>Ah sorry. I thought your original post said the opposite. Can you attach a small test case?

Thanks,
Raghu</description>
      <pubDate>Mon, 08 Oct 2012 16:25:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917543#M1375</guid>
      <dc:creator>Raghupathi_M_Intel</dc:creator>
      <dc:date>2012-10-08T16:25:30Z</dc:date>
    </item>
    <item>
      <title>I've written and attached a</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917544#M1376</link>
      <description>I've written and attached a testcase that uses CLU. I included the CLU runtime in the zipfile, which I had to edit slightly to get it to compile with GCC. When I run it, it outputs
 intel_sizeof.c:50: clSetKernelArg(kernel, 0, sizeof(arg), &amp;amp;arg) failed: -51
and -51 is CL_INVALID_ARG_SIZE.</description>
      <pubDate>Tue, 09 Oct 2012 08:09:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/clSetKernelArg-bug-for-lt-type-gt-3-arguments/m-p/917544#M1376</guid>
      <dc:creator>Bruce_M_</dc:creator>
      <dc:date>2012-10-09T08:09:58Z</dc:date>
    </item>
  </channel>
</rss>

