c++ - Non-Homogenous Comparison using SIMD -


is possible non-homegenous (two datatypes not same) comparison using simd instructions (intrinsics) , in sse2 uptil sse4.x instruction set? . i.e. float , double? or 32bit , 64 bit integers? float integer etc?

you mean have, say, array of integer , want compare values in array of doubles? unfortunately have perform sort of conversion achieve that. there group of cvtxx2yy instructions that, , should available in intrinsic functions. have pick out 1 right conversion, e.g. _mm_cvtpi32_ps - can seen in example, can't convert 4 integers 4 floats... 2 @ time. don't ask me why...

if asking "can convert 1 integer , 1 float @ integer , float", no, that's not available.


Comments