title: ARM Neon: How to convert from uint8x16_t to uint8x8x2_t?
body: <p>I recently discovered about the <a href="https://stackoverflow.com/a/43519190/2436175">vreinterpret{q}_dsttype_srctype casting operator</a>. However this doesn't seem to support conversion in the data type described at <a href="http://infocenter.arm.com/help/topic/com.arm.doc.dui0491f/BABFBJAA.html" rel="nofollow noreferrer">this link</a> (bottom of the page):</p>
  
  <blockquote>
    <p>Some intrinsics use an array of vector types of the form:</p>
    
    <p><code>&lt;type&gt;&lt;size&gt;x&lt;number of lanes&gt;x&lt;length of array&gt;_t</code></p>
    
    <p>These types are treated as ordinary C structures containing a single
    element named val.</p>
    
    <p>An example structure definition is:</p>
  
  <pre><code>struct int16x4x2_t    
  {
      int16x4_t val[2];     
  };
  </code></pre>
  </blockquote>
  
  <p>Do you know how to convert from <code>uint8x16_t</code> to <code>uint8x8x2_t</code>?</p>
  
  <p>Note that that the problem <a href="https://stackoverflow.com/a/29209307/2436175">cannot be reliably addressed using union</a> (reading from inactive members leads to undefined behaviour <strong>Edit:</strong> That's only the case for C++, while it turns out that <a href="https://stackoverflow.com/a/11640603/2436175"><strong>C allows type punning</strong></a>), nor by <a href="https://stackoverflow.com/q/29253100/2436175">using pointers to cast</a> (breaks the strict aliasing rule).</p>