<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 25, 2016 at 2:20 PM, Aleksey Bader <span dir="ltr"><<a href="mailto:aleksey.bader@mail.ru" target="_blank">aleksey.bader@mail.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Wed, May 25, 2016 at 11:53 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 25, 2016 at 2:20 AM, Alexey Bader via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">bader added a subscriber: bader.<br>
bader added a comment.<br>
<span><span><br>
In <a href="http://reviews.llvm.org/D20602#438667" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20602#438667</a>, @rsmith wrote:<br>
<br>
> I'm not suggesting it be treated as invalid. This extension is part of at least OpenCL 2.1, but it's not part of OpenCL 1.0. `ext_vector_type` is Clang's implementation of the OpenCL vector type. Therefore if the user asks us to support OpenCL 1.0, we should give them a warning if they use this syntax.<br>
><br></span><span>
> If we're not building an OpenCL source file, then yes, this is our extension and it makes sense for it to be available unconditionally (without a warning).<br>
<br>
<br>
</span></span><span>To avoid confusion, I'd like to note that rgba selector was first introduced in OpenCL C++ kernel language, which is currently in provisional state and will be part of OpenCL version 2.2.<br>
</span><a href="https://www.khronos.org/registry/cl/specs/opencl-2.2-cplusplus.pdf" rel="noreferrer" target="_blank">https://www.khronos.org/registry/cl/specs/opencl-2.2-cplusplus.pdf</a> (page 18).<br></blockquote><div><br></div><div><a href="https://www.khronos.org/registry/cl/specs/opencl-2.1-openclc++.pdf" target="_blank">https://www.khronos.org/registry/cl/specs/opencl-2.1-openclc++.pdf</a> page 12-13 document it. Is that not OpenCL version 2.1?<br></div><div> </div></div></div></div></blockquote><div><br></div></span><div>Not quite. OpenCL C++ kernel language was planned to be ratified with OpenCL 2.1 standard, but it did happen.</div><div><div>It's still listed as provisional although OpenCL 2.1 specification was released last year. <a href="https://www.khronos.org/opencl/" target="_blank">https://www.khronos.org/opencl/</a></div></div><div>Ratified OpenCL 2.1 standard requires to support only OpenCL C 2.0 and SPIR-V 1.0 kernel languages.<br></div><div>There is no much sense to support provisional specification that will never be ratified.</div></div></div></div></blockquote><div><br></div><div>Thanks for the explanation.</div><div><br></div><div>It seems to me that the right way to handle this is the same way we'd handle any feature that's part of an upcoming language standard:</div><div> - add a flag to enable the OpenCL 2.2 language mode</div><div> - if an OpenCL compilation uses this extension and doesn't specify that version or newer, produce an `ExtWarn`</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>BTW, Khronos provided open source implementation of OpenCL C++ compiler and since OpenCL C++ is a new kernel language and specification (<a href="https://www.khronos.org/registry/cl/specs/opencl-2.2-cplusplus.pdf" target="_blank">https://www.khronos.org/registry/cl/specs/opencl-2.2-cplusplus.pdf</a>) is version 1.0, the numbering of standard versions is different from OpenCL C. Current std version is 'c++'.</div><div>Here is usage example: <a href="https://github.com/KhronosGroup/SPIR/blob/spirv-1.1/test/OpenCL/OpenCL22/opencl_cplusplus.cl" target="_blank">https://github.com/KhronosGroup/SPIR/blob/spirv-1.1/test/OpenCL/OpenCL22/opencl_cplusplus.cl</a></div></div></div></div></blockquote><div><br></div><div>That's a really weird way to specify a version number.</div></div></div></div>