b is one 32-bit value repeated.
| 1239 | |
| 1240 | // b is one 32-bit value repeated. |
| 1241 | static inline __m512i libdivide_mullhi_s32_vector(__m512i a, __m512i b) { |
| 1242 | __m512i hi_product_0Z2Z = _mm512_srli_epi64(_mm512_mul_epi32(a, b), 32); |
| 1243 | __m512i a1X3X = _mm512_srli_epi64(a, 32); |
| 1244 | __m512i mask = _mm512_set_epi32(-1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0); |
| 1245 | __m512i hi_product_Z1Z3 = _mm512_and_si512(_mm512_mul_epi32(a1X3X, b), mask); |
| 1246 | return _mm512_or_si512(hi_product_0Z2Z, hi_product_Z1Z3); |
| 1247 | } |
| 1248 | |
| 1249 | // Here, y is assumed to contain one 64-bit value repeated. |
| 1250 | // https://stackoverflow.com/a/28827013 |
no test coverage detected