title: What value of alignment should I with mkl_malloc?
body: <p>The function <code>mkl_malloc</code> is similar to <code>malloc</code> but has an extra <code>alignment</code> argument. Here's the prototype:</p>
  
  <pre><code>void* mkl_malloc (size_t alloc_size, int alignment);
  </code></pre>
  
  <p>I've noticed different performances with different values of <code>alignment</code>. Apart from trial and error, is there a <em>canonical or documented</em> methodical way to decide on the best value of <code>alignment</code>? i.e. processor being used, function being called, operation being performed etc.</p>
  
  <p>This question widely applicable to anyone who uses MKL so I'm very surprised it is not in the reference manual. </p>
  
  <p>update: I have tried with <code>mkl_sparse_spmm</code> and have not noticed a significant difference in performance for setting the alignment to powers of 2 up to 1024 bytes, after that the performance tends to drop. I'm using an Intel Xeon E5-2683.</p>