Replies: 1 comment 1 reply
-
Hi, It's not currently planned. I don't really have the time to put into writing it myself and even consuming a PR and maintaining a large feature like this could be more time than I have to commit to glam right now. There's nothing stopping someone from making their own crate with glam compatible wide types though and I can certainly try to assist any effort like that. I think unless you are targeting a fixed hardware architecture something like ISPC would probably be a better option than fixed width vectors in that it would allow you to write the code once and produce assembly for multiple SIMD ISAs and select the appropriate one at runtime or compile time, depending on what architecture you are targeting. This would give a more flexibility than fixed sized vector types, which would require you to write multiple implementations with different widths and choose the appropriate one to use. IPSC would take care of that for you. In C++ there are dynamic length vector SIMD libraries like Google Highway does something similar to ISPC but without introducing another language. I haven't seen anything similar written in Rust, yet. If I did have time that's the area I would like to look into, I don't see that happening any time soon unfortunately. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there,
I was wondering if implementing wide/packed types similar to
ultraviolet
'sVec4x4
and similar was planned/wanted for glam?I've looked into implementing some of those myself, and here's some design points that seems to need discussion in particular if wide types were to be added:
f32
andf64
modules targeting 128 bit wide SIMD registers (and possibly the corresponding mask vector types), but a packed version of the rest of the integer-based types would probably also make sense IMO?dot
which reduce a vector to a scalar value ? ForVec4x4
for example, several possibilities comes to mind:f32x4
that would abstract over the returned SIMD register (those could in turn be used as storage types for SIMD-enabled types). (Some crates likewide
provide such types but from my understanding one of the goal of glam is to not pull any mandatory dependency?)Beta Was this translation helpful? Give feedback.
All reactions