title: Compress mask using AVX intrinsics
body: <p>I'd like to combine two 256 bit vectors (<code>__m256d</code>) which contain the masks as a result of a comparison-operation (such as <code>_mm256_cmp_pd</code>) to one 256 bit vector, by omitting the upper half of every 64 bit double.</p>
  
  <p>So, if in the following, <code>a_i, b_i, ...</code> are 32 bit words, and I have two 256 bit (4 x double) vectors that have the following structure:</p>
  
  <p><code>a_0, a_0, b_0, b_0, c_0, c_0, d_0, d_0</code>, and <code>a_1, a_1, b_1, b_1, c_1, c_1, d_1, d_1</code>.</p>
  
  <p>I'd like to have a single 256 bit vector with the following structure:</p>
  
  <p><code>a_0, b_0, c_0, d_0, a_1, b_1, c_1, d_1</code>.</p>
  
  <p>How do I do this efficiently using Intel intrinsics? The instruction set available is everything up to AVX.</p>