title: How to use __builtin_assume_aligned in C
body: <p>In my C code I have</p>
  
  <pre><code>complex float M[n][n];
  complex float *delta = malloc(n * sizeof *delta);
  complex float *v = malloc(n * sizeof *v);
  for (i = 0; i &lt; n; i++) {
      v[i] -= 2.*delta[j]*M[j][i];
  }
  </code></pre>
  
  <p>where <code>i</code> and <code>n</code> are ints.</p>
  
  <p>It was suggested I use <code>__builtin_assume_aligned</code> to make sure these are aligned in order to help auto-vectorization. However, having looked at the docs I don't understand how to do that.</p>
  
  <p>How would you use it for this code?</p>
  
  <hr>
  
  <p>The code in this question is extracted from <a href="https://stackoverflow.com/questions/41639654/how-to-help-gcc-vectorize-c-code">How to help gcc vectorize C code</a> .  This is also why I want to try to align things.</p>