static inline unsigned int f_avx512(unsigned int n) { __m512i a = _mm512_set1_epi32(n); __m512i b = _mm512_set_epi32(N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, -1, -1, -1, -1, -1); return 16 - _popcnt32(_mm512_mask2int(_mm512_cmplt_epu32_mask(a, b))); // k = (a < b) ? 1 : 0 }