Last active
January 1, 2016 16:39
-
-
Save martin-steinegger/8172514 to your computer and use it in GitHub Desktop.
_M256_SLLI_SI256 CROSS LANE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <unsigned int N> __m256i _mm256_shift_left2(__m256i a) { | |
__m256i mask = _mm256_srli_si256( | |
_mm256_permute2x128_si256(a, a, _MM_SHUFFLE(0,0,3,0)) , 16-N); | |
return _mm256_or_si256(_mm256_slli_si256(a,N),mask); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment