Load 16 bit integers in AVX2 vector?
<p>I am new to AVX programming. I want to load a <code>__m256</code> vector with 16 short int or 16 bit values, But I'm unable to do so.</p>

<p>Here is my attempt. It gives the following error:</p>

<blockquote>
  <p>incompatible types when initializing type ‘__m256’ using type ‘int’
        __m256 result = _mm256_load_epi16((__m256*)&amp;int_array);</p>
</blockquote>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdint.h&gt;
#include &lt;immintrin.h&gt;

int main() {
  int i;

  short int int_array[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};


  __m256 result = _mm256_load_epi16((__m256*)&amp;int_array);

  short int* res = (short int*)&amp;result;
  printf("%d %d %d %d %d %d %d %d\n", res[0], res[1], res[2], res[3], res[4], res[5], res[6], res[7]);

  return 0;
}
</code></pre>