Closed RazrFalcon closed 3 years ago
Bit preserving. So I have to use bytemuck
directly?
Looks like the cast method uses panic. Does it guarantee that it will be optimized out for equal types? Otherwise it's too expensive for my use case.
yeah on equal types those checks all const fold away.
So for f32 to i32 I also have to use bytemuck and not cast_to_m128i_from_m128d
/_mm_castps_si128
?
UPD: interesting, looks like _mm_castps_si128
is just a dummy.
yeah the core::arch bit preserving casts casts are just transmute internally
Do you want value preserving or bit preserving?
for bit preserving,
bytemuck::cast
does it.There's not currently anything that will like, convert and do something if the value was out of range.