🚀 WASM 123 SIMD Support
Now we have WASM 128 SIMD support ( many thanks to @myfreeer ).
Compiling
Currently the tests can be cross-compiled to wasi using clang and wasi-sdk with cmake arguments below:
-DCMAKE_C_FLAGS="-msimd128"
-DCMAKE_TOOLCHAIN_FILE=/path/to/wasi-sdk-19.0/share/cmake/wasi-sdk.cmake
-DWASI_SDK_PREFIX=/path/to/wasi-sdk-19.0
-DCGLM_USE_TEST=ON
Where /path/to/wasi-sdk-19.0/
is the path to extracted wasi sdk.
🚀 Struct API Namespace Configuration
Now we can omit or change namespace of struct api which was ( and still as default ) glms_
. We can omit the namespace completely to use like mat4_mul(mat4_mul(m1, m2), m3)
... or option to use like mat4s_mul(mat4s_mul(m1, m2), m3)
...
This makes things more flexible & readable for struct api.
now we can omit glms_ like:
/* previous / default */
return glms_vec3_normalized(glms_vec3_cross(a, b));
/* this must be defined before cglm inc especially common.h */
#define CGLM_OMIT_NS_FROM_STRUCT_API /* or define at compiler settings */
/* new!! */
return vec3_normalized(vec3_cross(a, b));
/* if CGLM_STRUCT_API_NAME_SUFFIX is defined as `s` */
return vec3s_normalized(vec3s_cross(a, b));
new options:
CGLM_OMIT_NS_FROM_STRUCT_API
, omits CGLM_STRUCT_API_NS (glms_) namespace completely if there is sub namespace e.g mat4_, vec4_ ... DEFAULT is not definedCGLM_STRUCT_API_NS
: define name space for struct api, DEFAULT isglms
CGLM_STRUCT_API_NAME_SUFFIX
: define name suffix, DEFAULT is empty e.gdefining it as #define CGLM_STRUCT_API_NAME_SUFFIX s
will adds
suffix tomat4_mul -> mat4s_mul
🛠️ Bugfixes and Improvements:
- #279: Check for builtin before using it ( thanks to @NeRdTheNed )
- #280: fix building ARM NEON on windows & msvc ( thanks to @gottfriedleibniz )
- #286: Wasm simd128 support ( thanks to @myfreeer also @kzhsw, @gottfriedleibniz )
- #290: provide option to omit or configure struct api namespace
- #291: simd, sse: use 0x80000000 insteaf of -0.f to fix
/fp:fast
on msvc ( thanks to @gottfriedleibniz, @deadwanderer ) see #289 - #292: wasm: replace usage of -0.f to 0x80000000 ( thanks to @myfreeer )
- utility to print selected simd path
- fix building tests
- fix struct api calls
- update documentations ( thanks to @ransel117 @krishna2803 )
- and some improvements may not listed here
❤️ Sponsorship: Consider become a sponsor for cglm
Supporting cross platform, multiple OS-es and multiple CPUs requires multiple hardwares to test on it which requires extra financial cost. Also sparing time is another big issue while working at somewhere fulltime... Your company can become a sponsor to help:
https://github.com/sponsors/recp
https://opencollective.com/cglm#backer
https://patreon.com/recp