3

Prototype using const generic for simd_shuffle IDX array by oli-obk · Pull Reque...

 7 months ago
source link: https://github.com/rust-lang/rust/pull/115933
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation

Contributor

cc #85229

r? @workingjubilee on the design

TLDR: there is now a fn simd_shuffle_generic<T, U, const IDX: &'static [u32]>(x: T, y: T) -> U; intrinsic that allows replacing

simd_shuffle(a, b, const { stuff })
simd_shuffle_generic::<_, _, {&stuff}>(a, b)

which makes the compiler implementations much simpler, if we manage to at some point eliminate simd_shuffle.

There are some issues with this today though (can't do math without bubbling it up in the generic arguments). With this change, we can start porting the simple cases and get better data on the others.

lqd reacted with hooray emojibjorn3, RalfJung, cjgillot, and workingjubilee reacted with heart emoji

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK