-
Notifications
You must be signed in to change notification settings - Fork 289
Add checks for void pointer types to ensure consistency #1775
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
Conversation
Thank you, I've been meaning to double check this too since stabilization of avx512 is getting closer. I probably added some inconsistency when contributing the masked load/store and compressstore intrinsics. I remember a discussion that |
@jhorstmann Currently there are 4 special cases
Among these, we can't change the convention of My only concern with all these changes is that we might introduce a lot of compile failures, as |
627a877
to
c654682
Compare
I have simplified the logic quite a bit, and made it more consistent. Now this PR only changes |
I like this much simpler and consistent logic! Would certainly welcome more users of these intrinsics to have a look though.
The avx2 It would cause compile errors in software I work on, but that's what I expect for using unstable features. Too bad about the sse2 |
I believe the One silver lining of the |
I believe the same is true for the avx512
I agree that taking |
I feel like there is a fundamental difference between how |
My preference is towards having gather/scatter use the pointer type to indicate the type of data that is accessed for each element. The way the address is calculated can be explained in the documentation. There is precedent for this since we now have |
- `_mm512_load_si512` - `_mm512_loadu_si512` - `_mm512_stream_si512`
Ok I looked into this, and all stabilized |
For some intrinsics Intel specifies the pointer type as
void*
orvoid const*
, but as Rust doesn't have void pointers, we need to choose a convention. This PR adds checks to ensure that convention.This also fixes quite a few intrinsics (mainly in avx512vbmi2 and avx512f) that were not adhering to the conventions. The convention was chosen to maintain compatibility with SSE and AVX