<?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 Does __attribute__((packed)) works correctly ? in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836638#M1336</link>
    <description>Hi,&lt;BR /&gt;Thanks for your post.&lt;BR /&gt;&lt;BR /&gt;There is a documented known issue in the current SDK, which prevents the usage of user defined structures as arguments for kernels. This issue might be solved by passing these structures in OpenCL memory objects.&lt;BR /&gt;&lt;BR /&gt;If the bare definition of a packed structure fails, please letme know, soI can file a bug on this issue.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt; Guy</description>
    <pubDate>Thu, 21 Apr 2011 15:08:00 GMT</pubDate>
    <dc:creator>Guy_B_Intel</dc:creator>
    <dc:date>2011-04-21T15:08:00Z</dc:date>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836635#M1333</link>
      <description>Hi,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I'm facing a problem, I have the following structure :&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;typedef struct __attribute__((packed))&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;{&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;float Ks;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;clSpectrum Cs;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;float exponent;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;} ShaderParam_plastic;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;But when I convert it to :&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;typedef struct __attribute__((packed))&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;{&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;float Kd;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;clSpectrum Cd;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;float Ks;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;clSpectrum Cs;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;float exponent;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;} ShaderParam_plastic;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;I got a crash ! I have checked for the data I send and they are aligned correctly !&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;In fact I use this structure :&lt;/DIV&gt;&lt;DIV style="font-family: verdana, sans-serif; padding: 0px; margin: 0px;" id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;typedef struct __attribute__((packed))&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;{&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;unsigned int shaderId;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;union __attribute__((packed))&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;{&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_emitter emitter;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_glass glass;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_matte matte;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_mirror mirror;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_plastic plastic;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_Textured_emitter Textured_emitter;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_Textured_glass Textured_glass;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_Textured_matte Textured_matte;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_Textured_mirror Textured_mirror;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;ShaderParam_transmissive transmissive;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;} params;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;} ShaderParameters;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV style="padding: 0px; margin: 0px;" id="_mcePaste"&gt;Even my union is aligned !!! If the syntax is correct ?&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 19 Apr 2011 14:46:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836635#M1333</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-04-19T14:46:22Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836636#M1334</link>
      <description>&lt;P&gt;In the OpenCL spec. page 199, they wrote this :&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;"You may only specify this attribute on the definition of a enum, struct orunion, not on a typedef which does not also define the enumerated type,structure or union."&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Does it mean that I cannot pack a "typedef" ? or that I can write :&lt;/P&gt;&lt;P&gt;&lt;EM&gt; typedef struct__attribute__((packed)) MyStruct {...};&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But not ?&lt;/P&gt;&lt;P&gt;&lt;EM&gt; typedef__attribute__((packed))struct MyStruct {...};&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NB:&lt;/STRONG&gt;I have replace my typedef with a struct, but it still crash !!!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NB2&lt;/STRONG&gt;: I cannot use "align" because my OpenCL code is generated at run-time. So, it is difficult to do and error prone :-P (Also, my buffer is generated from a malloc, then filled at run-time with memcpy !!)&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:14:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836636#M1334</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-04-21T13:14:53Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836637#M1335</link>
      <description>Even with this version of my code ... my soft still got a crash !!!&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[cpp]struct __attribute__((packed)) ShaderParam_transmissive
{
float Ks __attribute__((packed));
clSpectrum Cs __attribute__((packed));
float eta __attribute__((packed));
};
struct __attribute__((packed)) ShaderParametersStruct
{
uint shaderId __attribute__((packed));
union __attribute__((packed)) 
{
struct ShaderParam_emitter emitter;
struct ShaderParam_glass glass;
struct ShaderParam_matte matte;
struct ShaderParam_matte_rough matte_rough;
struct ShaderParam_mirror mirror;
struct ShaderParam_plastic plastic;
struct ShaderParam_Textured_emitter Textured_emitter;
struct ShaderParam_Textured_glass Textured_glass;
struct ShaderParam_Textured_matte Textured_matte;
struct ShaderParam_Textured_mirror Textured_mirror;
struct ShaderParam_transmissive transmissive;
} __attribute__((packed)) params __attribute__((packed));
};[/cpp]&lt;/PRE&gt; &lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Apr 2011 14:41:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836637#M1335</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-04-21T14:41:02Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836638#M1336</link>
      <description>Hi,&lt;BR /&gt;Thanks for your post.&lt;BR /&gt;&lt;BR /&gt;There is a documented known issue in the current SDK, which prevents the usage of user defined structures as arguments for kernels. This issue might be solved by passing these structures in OpenCL memory objects.&lt;BR /&gt;&lt;BR /&gt;If the bare definition of a packed structure fails, please letme know, soI can file a bug on this issue.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt; Guy</description>
      <pubDate>Thu, 21 Apr 2011 15:08:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836638#M1336</guid>
      <dc:creator>Guy_B_Intel</dc:creator>
      <dc:date>2011-04-21T15:08:00Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836639#M1337</link>
      <description>Thanks,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;In my kernel I use this :&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;__kernel void __attribute__((vec_type_hint(float4))) RenderPath(&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;...&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;__constantchar* shaderParametersBuffer&lt;BR /&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;...&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;)&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;and later I access it like this :&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;I&gt;ShaderParameters shaderParams = *((__constantShaderParameters*)(shaderParametersBuffer + offset));&lt;/I&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;where 'offset' is defined in bytes !!!&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;So, maybe it is not related to this issue ?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Apr 2011 15:15:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836639#M1337</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-04-21T15:15:52Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836640#M1338</link>
      <description>Hi,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Can you enter a new bug please ? It sounds unrelated ! Or maybe you have a solution !&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Fri, 22 Apr 2011 13:40:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836640#M1338</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-04-22T13:40:27Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836641#M1339</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Can I have any news or help please ?&lt;BR /&gt;I'm still trying to fix it, but if the problem come from the SDK I just have to help you to fix it :-P&lt;BR /&gt;&lt;BR /&gt;Thanks a lot</description>
      <pubDate>Thu, 28 Apr 2011 18:16:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836641#M1339</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-04-28T18:16:10Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836642#M1340</link>
      <description>Hi,&lt;BR /&gt;Thanks again for your post.&lt;BR /&gt;&lt;BR /&gt;It's an interesting issue, apparently it's a bug in our SDK. I'll open a bug report about this issue.&lt;BR /&gt;&lt;BR /&gt;We'll let you know about any progress.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt; Guy Benyei</description>
      <pubDate>Sun, 01 May 2011 12:32:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836642#M1340</guid>
      <dc:creator>Guy_B_Intel</dc:creator>
      <dc:date>2011-05-01T12:32:34Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836643#M1341</link>
      <description>Thanks a lot Guy,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I can provide you my application if necessary (if Intel agree to sign a Non Disclosure Agreement of course).&lt;/DIV&gt;&lt;DIV&gt;You can contact me on my email.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Regards and thanks for your work&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Krys&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 May 2011 06:22:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836643#M1341</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-05-04T06:22:55Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836644#M1342</link>
      <description>Hi&lt;BR /&gt;Is it possible to create simple kernel, not full application that cause the same failure?&lt;BR /&gt;This can elimiminate the need to involve legal.&lt;BR /&gt;Thanks, SHiri&lt;BR /&gt;</description>
      <pubDate>Wed, 04 May 2011 06:38:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836644#M1342</guid>
      <dc:creator>Shiri_M_Intel</dc:creator>
      <dc:date>2011-05-04T06:38:30Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836645#M1343</link>
      <description>&lt;P class="sectionbodytext"&gt;Right Shiri,&lt;/P&gt;

&lt;H2 class="sectionbodytext"&gt;Krys&lt;SPAN style="font-weight: normal;"&gt;, in addition, I encourage you to join &lt;A href="http://software.intel.com/sites/billboard/intel-software-partner-program/"&gt;The Intel Visual
Adrenaline Software Development Program&lt;/A&gt;. Log into the
program site and see our community and suooirt offering to visual computing
developers. &lt;/SPAN&gt;&lt;/H2&gt;

&lt;H2 class="sectionbodytext"&gt;&lt;SPAN style="font-weight: normal;"&gt;As this product is in preview stage, support
through forum is what we offer. Looking forward, we will work to expand our support
offering to provide you the level that you need.&lt;/SPAN&gt;&lt;/H2&gt;

&lt;P class="sectionbodytext"&gt;Thanks,&lt;/P&gt;

&lt;P class="sectionbodytext"&gt;Arnon&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2011 08:27:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836645#M1343</guid>
      <dc:creator>ARNON_P_Intel</dc:creator>
      <dc:date>2011-05-04T08:27:53Z</dc:date>
    </item>
    <item>
      <title>Does __attribute__((packed)) works correctly ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836646#M1344</link>
      <description>Hi,&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I will take a look at your program, thanks for the information.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I have test the new SDK and everything works perfectly !! :-D and even faster.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Congratulation for your release... good job :-)&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;So, is it possible to be in touch with a "project manager" in order to discuss some "marketing stuffs" ?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Regards&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 May 2011 08:35:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Does-attribute-packed-works-correctly/m-p/836646#M1344</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2011-05-10T08:35:17Z</dc:date>
    </item>
  </channel>
</rss>

