-
Notifications
You must be signed in to change notification settings - Fork 88
Consider enabling other indices than usize #166
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
Comments
Since in LLVM it's just using pointers, anyway, we can probably allow it to take any unsigned integer and the optimizer will handle it from there. I don't believe this needs any rustc support. |
This would be awesome. I just ran into another case where I was operating on dictionary encoded values (flexibly encoded as u8 or u16), and then needed to convert into usize to perform lookups into the dictionary. |
Doing it for u8 and u16 seems trivial since those both have |
It would probably be reasonable to provide a wrapping int conversion function |
In practice, the underlying API uses u32. Hrm... |
I think it's best to hide that it's u32, since that's pretty arbitrary IMO. usize makes the most sense, I think |
Wait, I am getting swizzle and gather confused here. llvm's |
i think maybe we should not allow those and only allow types which do implement |
Only |
@bjorn3 i dont think we should care about |
The choice of |
I disagree that it's arbitrary-- |
(Though really we'll probably keep things |
This would minimize contortions for casting between various index sizes.
See: rust-lang/rust#89193 (comment)
The text was updated successfully, but these errors were encountered: