title: Bit shift whole block of memory efficiently
body: <p>I have following code, after performing a sobel operation:</p>
  
  <pre><code>short* tempBufferVert = new short[width * height];
  ippiFilterSobelVertBorder_8u16s_C1R(pImg, width, tempBufferVert, width * 2, dstSize, IppiMaskSize::ippMskSize3x3, IppiBorderType::ippBorderConst, 0, pBufferVert);
  for (int i = 0; i &lt; width * height; i++)
      tempBufferVert[i] &gt;&gt;= 2;
  </code></pre>
  
  <p>The frustrating thing is, the bit shift is the longest taking operation of it all, the IPP sobel is so optimized it runs faster than my stupid bit shift. How can I optimize the bitshift, or are there IPP or other options (AVX?) to perform a bitshift on the whole memory (but pertain the sign of the short, which the >>= does on the Visual Studio implementation)</p>