<?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 Precision or mathematic problem in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/Precision-or-mathematic-problem/m-p/769413#M134</link>
    <description>Hi,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I'm working on a rendering software (&lt;A href="http://spectralbattle.wordpress.com/"&gt;http://spectralbattle.wordpress.com/&lt;/A&gt;) and use several SDK to test my code. Using several SDK allow me to check if the errors are in my code... or in the SDK.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;When I use the Intel SDK I have some problems :&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Here is a rendering with AMD SDK :&lt;A href="https://picasaweb.google.com/polarlights01/CornellAMD#5592014900335257794"&gt;https://picasaweb.google.com/polarlights01/CornellAMD#5592014900335257794&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Here is the same rendering with Intel SDK :&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://picasaweb.google.com/polarlights01/CornellIntel#5592017101324392082"&gt;https://picasaweb.google.com/polarlights01/CornellIntel#5592017101324392082&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The problem can be seen on the top of the box, a "normal" sounds to be inversed !&lt;/DIV&gt;&lt;DIV&gt;The normal orientation is simply computed with a dot product like this :&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;int isInside = (dot(Ng, I) &amp;lt; 0);&lt;/DIV&gt;&lt;DIV&gt;N = isInside ? -Ng : Ng;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I have also try to compute directly the dot product (Ng.x*I.x+Ng.y*I.y+Ng.z*I.z) , but I have the same effect !&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Maybe the error is somewhere, but what I see is that I don't have this problem with AMD SDK !&lt;/DIV&gt;</description>
    <pubDate>Tue, 05 Apr 2011 08:51:53 GMT</pubDate>
    <dc:creator>Polar01</dc:creator>
    <dc:date>2011-04-05T08:51:53Z</dc:date>
    <item>
      <title>Precision or mathematic problem</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Precision-or-mathematic-problem/m-p/769413#M134</link>
      <description>Hi,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I'm working on a rendering software (&lt;A href="http://spectralbattle.wordpress.com/"&gt;http://spectralbattle.wordpress.com/&lt;/A&gt;) and use several SDK to test my code. Using several SDK allow me to check if the errors are in my code... or in the SDK.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;When I use the Intel SDK I have some problems :&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Here is a rendering with AMD SDK :&lt;A href="https://picasaweb.google.com/polarlights01/CornellAMD#5592014900335257794"&gt;https://picasaweb.google.com/polarlights01/CornellAMD#5592014900335257794&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Here is the same rendering with Intel SDK :&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://picasaweb.google.com/polarlights01/CornellIntel#5592017101324392082"&gt;https://picasaweb.google.com/polarlights01/CornellIntel#5592017101324392082&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The problem can be seen on the top of the box, a "normal" sounds to be inversed !&lt;/DIV&gt;&lt;DIV&gt;The normal orientation is simply computed with a dot product like this :&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;int isInside = (dot(Ng, I) &amp;lt; 0);&lt;/DIV&gt;&lt;DIV&gt;N = isInside ? -Ng : Ng;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I have also try to compute directly the dot product (Ng.x*I.x+Ng.y*I.y+Ng.z*I.z) , but I have the same effect !&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Maybe the error is somewhere, but what I see is that I don't have this problem with AMD SDK !&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Apr 2011 08:51:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Precision-or-mathematic-problem/m-p/769413#M134</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-04-05T08:51:53Z</dc:date>
    </item>
    <item>
      <title>Precision or mathematic problem</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Precision-or-mathematic-problem/m-p/769414#M135</link>
      <description>Finally,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I have found a way to fix it !&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;But really it is not related to my code ! I have just replace some operation with corresponding float3 operations and it works !&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;So, there is a bug somewhere :-P&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Apr 2011 11:49:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Precision-or-mathematic-problem/m-p/769414#M135</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-04-05T11:49:58Z</dc:date>
    </item>
  </channel>
</rss>

