Repository navigation
Conversation
|
Currently traveling, but here’s my feedback (I believe I motivated this from a Reddit comment):
The Now, I wouldn’t know how to express that for variable-width vector types. I can share my code next week when I’m no longer traveling. |
Yes, it is a
The naming follows
This is similar to how |
We have enough changes for a release and nothing but linebender#391 outstanding, so this seems like a good time to cut one. --------- Co-authored-by: Laurenz Stampfl <laurenz.stampfl+github@gmail.com>
Mirrors
std::simdAPI on the surface but not in the implementation.Does not (yet?) support resizing vectors, unlike
std::simd; the input and output are always the same width, just swizzled.#354 will require a separate
concat_swizzle!macro, whereasstd::simdsubsumes this into the resizing functionality.In exchange we gain the ability to use
simd_swizzle!in generic contexts. Native-width vectors can now usesimd_swizzle!and get a subslice of a predefined index, or even call aconst fnthat computes the indices without hardcoding them at all.All the internals are
#[doc(hidden)]and unstable. Only the macro is the public API so we could evolve it without breaking changes.An MVP would be just the function to map indices, but the macro is much more convenient and doesn't add much complexity.