-
Notifications
You must be signed in to change notification settings - Fork 16
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
Document safety requirements #25
Comments
Hello, thanks for bringing this up! These methods are unsafe since they are annotated with |
It should be possible to provide a fully safe API using the same techniques that I used in memchr: https://github.com/BurntSushi/rust-memchr/blob/10f11fbeaaec9d1c892be30718604a09b6622e8e/src/x86/mod.rs#L9-L60 --- The only thing you have to give up is that your search function can't be inlined, but that's probably true anyway, since its core implementation is using AVX. |
That's a really great idea, thanks 👍 We'll probably change around the API a bit at some point (we'd like to support SSE2 without AVX2 for example) so we can definitely add something like that in. |
It isn't clear what conditions are required to call the
Avx2
searcher methods.The text was updated successfully, but these errors were encountered: