Is something like
__m128 a = something;
__m128i b = reinterpret_cast<__m128i>(a);
safe or undefined? If it is undefined, will it at least work on all of the major compilers (gcc,clang,msvc,icc)? I tested it on my computer with gcc and it works, but I'm not sure if its portable. I know that I can use _mm_castps_si128()
, but because of templates, the first way happens to be more convenient.