-
Notifications
You must be signed in to change notification settings - Fork 91
Standardize documentation for SIMD vector and mask types #272
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
Standardize documentation for SIMD vector and mask types #272
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an improvement to me, thanks!
It's worth noting that the masks might not actually be the same size as their corresponding vector on some targets, but I'm not sure that the old comments were indicative of that either. |
Correct, the Mask type is intended to denote a type that "matches with" a given vector element size and count. The exact repr that is used to store Masks is something the hardware decides... it's only "no less than 1 bit per element and no more than the size of the vector type it masks". |
Co-authored-by: Jacob Lifshay <[email protected]>
there isn't an upper limit on mask sizes, some architecture could say all masks have 64-bit elements, and it would still work correctly. |
OK, updated with more accurate wording, thanks everyone. I had to be a little terse, because rustdoc's search feature has a fairly low maximum column count -- exceeding that makes all entries look roughly identical, with trailing ellipses. I also added the line "Masks represent boolean inclusion/exclusion on a per-lane basis." to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This is a documentation-only patch that standardizes the presentation of vector types like
u32x4
and mask types likemask32x16
.The reasoning behind the patch was as follows:
element
instead ofvalue
andSIMD vector
instead ofvector
. These terms appear in the rest of the documentation and tutorials.16 elements of 32 bits
instead of16 32-bit elements
.Vector Types
i8
valuesi8
.Mask Types