perform cmp ? a : b
| 321 | |
| 322 | // perform cmp ? a : b |
| 323 | inline simd8i select(const simd8i& cmp, const simd8i& a, const simd8i& b) |
| 324 | { |
| 325 | #ifdef DLIB_HAVE_AVX2 |
| 326 | return _mm256_blendv_epi8(b,a,cmp); |
| 327 | #else |
| 328 | return simd8i(select(cmp.low(), a.low(), b.low()), |
| 329 | select(cmp.high(), a.high(), b.high())); |
| 330 | #endif |
| 331 | } |
| 332 | |
| 333 | // ---------------------------------------------------------------------------------------- |
| 334 |