49
edits
Changes
no edit summary
// Vec4i operator * (Vec4i const & a, Vec4i const & b) {
// #ifdef
__m128i a13 = _mm_shuffle_epi32(a, 0xF5); // (-,a3,-,a1)__m128i b13 = _mm_shuffle_epi32(b, 0xF5); // (-,b3,-,b1)__m128i prod02 = _mm_mul_epu32(a, b); // (-,a2*b2,-,a0*b0)__m128i prod13 = _mm_mul_epu32(a13, b13); // (-,a3*b3,-,a1*b1)__m128i prod01 = _mm_unpacklo_epi32(prod02, prod13); // (-,-,a1*b1,a0*b0) __m128i prod23 = _mm_unpackhi_epi32(prod02, prod13); // (-,-,a3*b3,a2*b2) __m128i prod = _mm_unpacklo_epi64(prod01, prod23); // (ab3,ab2,ab1,ab0)
</source>