-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relationship between From/Into and FromBits traits? #413
Comments
It was discussed tangentially in #151 .
EDIT: Currently there are also too many |
Thanks for the pointer, the value/bitwise distinction makes sense. Are all of the |
Yes that's correct. So I am going to differentiate between the RFC and stdsimd. In the RFC Right now Does that make sense? |
Yep, that completely explains my question, thank you! |
This change is mentioned in #338 , but I didn't see discussion of it there, so sorry if I'm missing something.
What's the intended relationship between the
FromBits
trait and theFrom
/Into
traits? I guess thatFromBits
is a more specialized trait to indicate that it's a lossless bitcast, but I am curious if there is a reason why that's better than allowing the use ofFrom
andInto
.Previously, the platform-specific intrinsics took portable vector types (e.g.,
u32x8
) as arguments; these vector types implementedFrom/Into
, so for the "overtyped" intrinsics it was possible to use.into()
in appropriate places to do bitcasts. Now, all of the intrinsics have been changed to use bag-of-bits types, like__m256i
, but there's no implementation ofFrom
/Into
between the bag-of-bits types and the typed vectors of the same widths.While there is the
FromBits
trait, because it's different fromFrom
, it's no longer possible to use.into()
on the results of a platform intrinsic. Is there a strong reason to haveFromBits
distinct fromFrom
?The text was updated successfully, but these errors were encountered: