<div class="gmail_quote">On 17 January 2012 00:03, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com">newshound2@digitalmars.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 1/16/2012 1:54 PM, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
    Unfortunately, if the function was this:<br>
<br>
    void foo(int[] a, int[] b, int[] c) {<br>
<br>
      for (int i=0; i<256; i++)<br>
        a[i] = b[i] + c[i];<br>
    }<br>
<br>
    Then it can't vectorize due to aliasing.<br>
<br>
<br></div><div class="im">
This is why D needs a __restrict attribute! ;)<br>
</div></blockquote>
<br>
That's why D has:<br>
<br>
   a[] = b[] + c[];<br>
<br>
because the language requires the arrays to be distinct.<br>
</blockquote></div><br><div>Surely it would be possible for them to be overlapping slices?</div>