Lokathor / wide

A crate to help you go wide. By which I mean use SIMD stuff.
https://docs.rs/wide
zlib License
279 stars 23 forks source link

Adding replace and extract methods #106

Open ImUrX opened 3 years ago

ImUrX commented 3 years ago

Seems like a fine addition to the library, I been using a lot of my time in here even though stdsimd/portable-simd will happen someday lol. Do you have any recommendations on how to do it on the x86 arch?

Lokathor commented 3 years ago

I think x86 only supports this with i16 actually :(

ImUrX commented 3 years ago

sad :(, wasm supports all of them so i think the only way on sse is to cast it 2 times? Dont know how efficient the code will be after getting compiled

Lokathor commented 3 years ago

It would probably be a significant hiccup in the processing speed of any function.

ImUrX commented 3 years ago

is there any way to get the 2 v128 in i64x4 from outside the lib?

Lokathor commented 3 years ago

you could use bytemuck to cast the simd value to an array of scalar values.

CryZe commented 3 years ago

I believe v128 isn't actually supported by bytemuck yet, maybe I should create a PR. (Of course you can always manually impl it on a newtype though)

Lokathor commented 3 years ago

oh v not u.

yeah bytemuck would need a patch to support that