<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size: 12pt; font-family: calibri, arial, helvetica, sans-serif; color: rgb(0, 0, 0); line-height: normal; background-color: rgba(0, 0, 0, 0);">Hello,</span></p>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size: 12pt; font-family: calibri, arial, helvetica, sans-serif; color: rgb(0, 0, 0); line-height: normal; background-color: rgba(0, 0, 0, 0);"><br>
</span></p>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I would like to change the default version for OpenCL C kernels compilation
<div>when ‘-std’/’-cl-std’ flag is not passed to clang. </div>
<div><br>
</div>
<div>The default version is currently - OpenCL 1.0. However, traditionally clang uses
</div>
<div>recent popular versions for C/C++ languages. I, therefore, suggest aligning with
</div>
<div>this strategy and use OpenCL 1.2 as a default version instead. </div>
<div><br>
</div>
<div>This means that the following command: </div>
<div><br>
</div>
<div>    ‘clang test.cl’ </div>
<div><br>
</div>
<div>would be equivalent to the command </div>
<div><br>
</div>
<div>    ‘clang -cl-std=CL1.2 test.cl’</div>
<div><br>
</div>
<div>or<br>
</div>
<div><br>
</div>
<div>    ‘clang -std=CL1.2 test.cl’ </div>
<div><br>
</div>
<div>The main reason to use OpenCL 1.2 instead of OpenCL 2.0 (which is a more recent
</div>
<div>stable version) is that OpenCL 1.2 still appears to be the most widely adopted</div>
<div>among all devices supporting the OpenCL standard. </div>
<div><br>
</div>
<div>As a comparison, currently clang uses the following defaults for:</div>
<div>- (.cpp) -std=c++14</div>
<div>- (.c)  -std=c17 </div>
<div><br>
</div>
Let me know if you have any feedback or other suggestions for this proposal.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">K</span>ind regards,<br>
Anastasia<br>
</div>
</body>
</html>