I have a struct which has the following composition:
static constexpr uint64_t emptyStructValue { 0 };
union MyStruct {
explicit MyStruct(uint64_t comp) : composite(comp){}
struct{
int16_t a;
bool b;
bool c;
float d;
};
uint64_t composite = 0;
bool hasValue(){
return composite != emptyStructValue;
}
};
and I have two of these structs in another object:
class B{
Struct s1;
Struct s2;
};
and I would like to know, given object of type B, how could I load all 128 bits in to an SSE register and check whether a single bit is set?
I found _mm_loadu_si128()
but my data has a mixture of ints and floats?