Skip to content
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

make the simd_runtime_generate macro explicitly unsafe #52

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

verpeteren
Copy link

As discussed in this issue it would be better that the simd_xxx_generate macros are explictly unsafe.

This has an impact for consumers of this crate, so a (minor) version bump might be applicable.

This might require that consumers of this crate need to wrap their _runtime_select function in a safe block
This might require that consumers of this crate need to wrap their _compiletime_select function in a safe block
arduano
arduano previously approved these changes Jan 23, 2023
Copy link
Owner

@arduano arduano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, could you please look at the merge conflicts though?

@arduano arduano dismissed their stale review January 26, 2023 08:17

After more consideration, I think we could approach this differently

@arduano
Copy link
Owner

arduano commented Jan 26, 2023

What makes those generated functions explicitly unsafe? Isn't it only the fact that the cpu might not have those instructions?

If so, then isn't the runtime generate function completely safe, because it ensures at runtime that the instructions that it will use do exist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants