title: Find min/max value from a __m128i
body: <p>I want to find the minimum/maximum value into an array of byte using SIMD operations. So far I was able to go through the array and store the minimum/maximum value into a __m128i variable, but it means that the value I am looking for is mixed among others (15 others to be exact).</p>
  
  <p>I've found these discussions <a href="https://stackoverflow.com/questions/22256525/horizontal-minimum-and-maximum-using-sse">here</a> and <a href="https://stackoverflow.com/questions/9877700/getting-max-value-in-a-m128i-vector-with-sse">here</a> for integer, and <a href="http://shybovycha.tumblr.com/post/122400740651/speeding-up-algorithms-with-sse" rel="nofollow noreferrer">this page</a> for float, but I don't understand how works _mm_shuffle*. So my questions are:</p>
  
  <ol>
  <li>What SIMD operations do I have to perform in order to extract the minimum / maximum byte (or unsigned byte) value from the __m128i variable?</li>
  <li>How does _mm_shuffle* work? I don't get it when I look to the "minimal" documentation online. I know it is related to the <a href="https://msdn.microsoft.com/en-us/library/4d3eabky(v=vs.71).aspx" rel="nofollow noreferrer">_MM_SHUFFLE macro</a>, but I don't get the example.</li>
  </ol>