-
Notifications
You must be signed in to change notification settings - Fork 160
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
Boolean vector type aliases are a portability hazard (BVec3/BVec3A, and BVec4/BVec4A) #306
Comments
Currently In the past I had implemented these to contain N x |
Let me know if you need help benchmarking on AArch64. :-) |
I just bumped into this problem, this is inconsistent to the other SIMD types and a consistent implementation should really be chosen. |
I compared the performance the "vec3 select" benchmark of However, I do intend to provide implementations for stable SIMD architectures and architectures which are not yet stable can use the core simd implementation so hopefully in practice this perf penalty won't be a problem. |
Sorry for the dramatic title - it's mostly an ergonomics issue. :-)
Currently,
BVec4A
andBVec3A
are type aliases forBVec3
andBVec4
on platforms without explicit SIMD support (most prominently AArch64).This means they can be used interchangeably on those platforms, but not on x86. Someone writing code on an AArch64 platform could assume that the code will also compile on x86.
Possible solutions:
BVec3/4
andBVec3A/4A
as separate types regardless of SIMD support.BVec3
andBVec4
. Personally I'm struggling to see the use case for them (in contrast toVec3
), but I could be missing something.Cheers!
The text was updated successfully, but these errors were encountered: