-
Notifications
You must be signed in to change notification settings - Fork 74
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
Simd<A>
has the same layout and ABI as A
#332
base: master
Are you sure you want to change the base?
Conversation
This patch is incorrect.
|
Ah understood. Would it be sound to say that Simd<A> has the same layout as
A with the exception of alignment?
…On Sun, Oct 3, 2021 at 6:11 PM Jubilee ***@***.***> wrote:
This patch is incorrect. Simd<A> is at risk of having different alignment
or being handled differently in parameter passing. We can only promise
that, on the stack, Simd<A> is safe to convert to A, but that doesn't
change the alignment difference, so it is not safe to reverse that. It has
also been a while since I have looked at how this crate handles masks, so I
feel reluctant to promise anything regarding that.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#332 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH7ML54OQIH737FREP7CHTUFDPKJANCNFSM5D6SZYPA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hmm. This kind of thing is why Can you elaborate a little more on the details of this use-case so I know exactly what sort of transformation, where, and when? I would like to know more exactly what I am promising. I looked at the crate but did not fully understand all the conversions you were offering. |
By the time you read this message, the |
This will allow code to depend on
Simd
's layout. My specific use case is to emit impls ofFromBytes
andAsBytes
for zerocopy so that other crates can safely transmuteSimd
instances.