ebassi / graphene

A thin layer of graphic data types
http://ebassi.github.io/graphene
Other
373 stars 80 forks source link

Implement vector intrinsics for Clang #241

Closed q66 closed 2 years ago

q66 commented 2 years ago

This implements vector intrinsics support to be used with Clang on platforms without SSE/NEON.

q66 commented 2 years ago

Do you think this might be worth combining under one set of macros? Doing so would have some advantages (a build made on GCC would be able to use intrinsics on Clang and the other way around)

q66 commented 2 years ago

Now combined for a common implementation. This should ensure that you can use different compilers and still have both use the intrinsics when using the library.

ebassi commented 2 years ago

Thanks for looking into this; I'm in general okay with it, but the CI needs to pass first.

q66 commented 2 years ago

I also wonder, what was the original reason they were disabled on 32-bit for GCC? Is this something that would also concern us on Clang? (I have no way to test any 32-bit targets right now)

ebassi commented 2 years ago

Mainly, two reasons: compiler bugs with older versions of GCC, and basically no hardware to test outside of CI. To be fair, 32 bit architectures are essentially dead, and they aren't coming back, so I don't really care about them.

q66 commented 2 years ago

It is probably best to disable them universally anyway, since this would mean Clang-compiled builds enabling intrinsics could not be used on GCC

q66 commented 2 years ago

Alright, this should work I think.

q66 commented 2 years ago

Now no symbols are being dropped