On AXV512DQ, there is _mm_cvttpd_epi64, for example in file avx512vldqintrin.h we find
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_cvttpd_epi64 (__m128d __A) {
return (__m128i) __builtin_ia32_cvttpd2qq128_mask ((__v2df) __A,
(__v2di) _mm_setzero_si128(),
(__mmask8) -1);
}
which converts two packed 64-bit floats (__m128d) to two packed 64-bit integers (__m128i). There is also _mm256_cvttpd_epi64 for converting four packed 64-bit floats (__m256d) to four packed 64-bit integers (__m256i).
However, many machines do not support AXV512DQ. So I wonder what the best version of a poor man's alternative for this is.
I should say that I'm already happy with a solution that works only for 64-bit floats which can be loss-free converted to 32-bit floats.