<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hey again,<br>
    <br>
    I forgot to say; this commit was taken out of Intel's clang patch.
    All credit goes to Guy Benyei and his team, and thanks to him for
    letting me commit this piece of it.<br>
    <br>
    Thanks,<br>
    Fraser<br>
    <br>
    <div class="moz-cite-prefix">On 29/09/14 10:54, Fraser Cormack
      wrote:<br>
    </div>
    <blockquote cite="mid:54292C38.6020508@codeplay.com" type="cite">Hi,
      <br>
      <br>
      This patch allows an explicit cast from the literal 0 to an
      event_t. The fact that you can use 0 as an event_t is in Section
      6.12.10 of the OpenCL 1.2 specification. The use of an explicit
      cast is used in the async_copy* kernels in the 'basic' subtest of
      the conformance test suite:
      <br>
      <br>
      __kernel void test_fn( const __global short8 *src, __global short8
      *dst,
      <br>
                             __local short8 *localBuffer, int
      copiesPerWorkgroup, int copiesPerWorkItem )
      <br>
      {
      <br>
          int i;
      <br>
          for(i=0; i<copiesPerWorkItem; i++)
      <br>
              localBuffer[ get_local_id( 0 )*copiesPerWorkItem+i ] =
      (short8)(short)0;
      <br>
      <br>
          barrier( CLK_LOCAL_MEM_FENCE );
      <br>
      <br>
          for(i=0; i<copiesPerWorkItem; i++)
      <br>
              localBuffer[ get_local_id( 0 )*copiesPerWorkItem+i ] =
      src[ get_global_id( 0 )*copiesPerWorkItem+i ];
      <br>
      <br>
          barrier( CLK_LOCAL_MEM_FENCE );
      <br>
      <br>
          event_t event;
      <br>
          event = async_work_group_copy((__global
      short8*)(dst+copiesPerWorkgroup*get_group_id(0)),
      <br>
                                        (__local const
      short8*)localBuffer,
      <br>
                                        (size_t)copiesPerWorkgroup,
      <br>
      ** HERE ** >>>>                   (event_t)0 );
      <br>
          wait_group_events( 1, &event );
      <br>
      }
      <br>
      <br>
      <br>
      I've also added a test for this behaviour.
      <br>
      <br>
      Cheers,
      <br>
      Fraser
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
cfe-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Fraser Cormack
Compiler Developer
Codeplay Software Ltd
45 York Place, Edinburgh, EH1 3HP
Tel: 0131 466 0503
Fax: 0131 557 6600
Website: <a class="moz-txt-link-freetext" href="http://www.codeplay.com">http://www.codeplay.com</a>
Twitter: <a class="moz-txt-link-freetext" href="https://twitter.com/codeplaysoft">https://twitter.com/codeplaysoft</a>

This email and any attachments may contain confidential and /or privileged information and  is for use  by the addressee only. If you are not the intended recipient, please notify Codeplay Software Ltd immediately and delete the message from your computer. You may not copy or forward it,or use or disclose its contents to any other person. Any views or other information in this message which do not relate to our business are not authorized by Codeplay software Ltd, nor does this message form part of any contract unless so stated.
As internet communications are capable of data corruption Codeplay Software Ltd does not accept any responsibility for any changes made to this message after it was sent. Please note that Codeplay Software Ltd does not accept any liability or responsibility for viruses and it is your responsibility to scan any attachments.
Company registered in England and Wales, number: 04567874
Registered office: 81 Linkfield Street, Redhill RH1 6BY </pre>
  </body>
</html>