mardi 6 novembre 2018

Adding long double to __m128 intrinsic

If I declare a union for a 128-bit int and use long double as one of the containers, will this work as I expect?

using uint128_t = union __declspec(align(16)) __int128
{
    long double      n128_f128[1];
    unsigned __int64 n128_u64[2];
    unsigned __int32 n128_u32[4];
};

I feel like using the built-in long double is really the best container for this particular alias, and I didn't really see the use of the smaller one and two byte containers as my target platform will never use them, so I stripped them out of the xmmintrins.h to get the above. Aligned for performance reasons with the rest of the application, but this is new territory for me, so I'm largely just asking - will this work?

Aucun commentaire:

Enregistrer un commentaire