<div dir="ltr">Hi Sam,<br><br><div>I don't understand what you're trying to say.</div><div>You quoted the standard which says that the "size of those types is implementation defined"; you then infer that this is the reason why it can /not/ make it a pointer to opaque struct. I would think the other way around: it's because the size is implementation defined that we can use whatever representation we wish.</div><div>Further to that, this is how event_t is already defined (I didn't add it).</div><div><br></div><div>OpenCL implementations will likely either patch clang to do this or add a typedef in the implicit header which will end up generating the same llvm intermediate anyway.</div><div>What these structs map to in final HW code is indeed target defined, so I suppose your comment on "hooks to get the specific types" would be accurate.</div><div><br></div><div>In any case, if the representation of those types is not acceptable for Clang, I'll strip them and leave only the images in.</div><div dir="ltr"><div><br></div><div>Pedro</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 11 Jun 2015 at 08:41 Sam Parker <<a href="mailto:sam.parker@arm.com" target="_blank">sam.parker@arm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Pedro,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I was looking at these types a couple of months back, what stumped me is that ndrange_t is not a pointer type as I had originally tried. You too have made it a pointer-to-a-struct type but I feel this is wrong. The spec says, ‘values returned by applying the sizeof operator to the queue_t, clk_event_t, nrange_t and reserve_id_t types is implementation defined.’ So I understand that it would not be valid to make this types as pointers and that implementations would probably just have to create definitions for them in the distributed header file; unless there were some hooks to the backend to get the specific implementation defined types.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Cheers,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">sam<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:cfe-commits-bounces@cs.uiuc.edu" target="_blank">cfe-commits-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:cfe-commits-bounces@cs.uiuc.edu" target="_blank">cfe-commits-bounces@cs.uiuc.edu</a>] <b>On Behalf Of </b>Pedro Ferreira<br><b>Sent:</b> 11 June 2015 08:19<br><b>To:</b> <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br><b>Subject:</b> [PATCH] OpenCL: Add new types for OpenCL 2.0<u></u><u></u></span></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hi all, <br><br>This patch adds the new OpenCL types for 2.0 described at <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.khronos.org_registry_cl_sdk_2.0_docs_man_xhtml_otherDataTypes.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=42YnWExwxwpeU6GPDY2_3RFxCqQakUbj_CXZsMsQ2jU&s=REOBNoaDio7qDyIDCqmXhxFvZYjMOK6vuXAttjOVsNI&e=" target="_blank">https://www.khronos.org/registry/cl/sdk/2.0/docs/man/xhtml/otherDataTypes.html</a> <u></u><u></u></p><div><p class="MsoNormal">I also opened <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23794&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=42YnWExwxwpeU6GPDY2_3RFxCqQakUbj_CXZsMsQ2jU&s=TAV4suAMaHgdIPA83Da3pQl7c68On7bAFWtnrUbt_Uk&e=" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=23794</a> for this. I keep forgetting you prefer patches sent to this mailing list.<br>This also adds lldb entries (fixes switch warnings). <br><br>The types are: <br><br>image2d_depth_t <br>image2d_array_depth_t <br>image2d_msaa_t <br>image2d_array_msaa_t <br>image2d_msaa_depth_t <br>image2d_array_msaa_depth_t <br>queue_t <br>ndrange_t <br>clk_event_t <br>reserve_id_t <br><br>let me know if something looks wrong,<u></u><u></u></p></div><div><p class="MsoNormal">Pedro<u></u><u></u></p></div></div></div></div></blockquote></div></div>