microsoft / DirectXMath

DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
https://walbourn.github.io/introducing-directxmath/
MIT License
1.52k stars 234 forks source link

ARM-NEON intrinsics code paths now type-safe #115

Closed walbourn closed 3 years ago

walbourn commented 3 years ago

Both Visual C++ and clang/LLVM for ARM are fairly lose in their handling of vector type assignment. For GNUC, this resulted in numerous warnings:

use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts

These changes have no codegen impact on Visual C++ or clang/LLVM as these are adding various vreinterpret cast macros or fixing up specific types.

This is similar to the issues that came up when using the SSE codepaths with the Intel compiler.

walbourn commented 3 years ago

Validated that the GNC 4.9, Clang 5.0, and Visual C++ code paths for ARM-NEON all compile. Need to do some runtime testing then will be ready to complete the PR...

walbourn commented 3 years ago

Found a few minor bugs when running the test suite. Fixed and done.