The code in this repository implements small yet hopefully useful subset of DirectXMath, ported from FP32 to FP64 precision.
The code requires AVX1,
and can optionally use AVX2 and FMA3 instructions when enabled.
Note however I don’t have old enough computers in this house.
If you need AVX1 version, make sure to test on a PC from 2011-2014 which doesn’t have AVX2:
Intel Sandy Bridge,
Ivy Bridge,
AMD Jaguar or similar.
The current version was tested with C++/17 language version.
It doesn’t use advanced language features though, should be trivial to downgrade if needed.
I have tested with Visual Studio 2022 on Windows 10, and GCC 7.4 on Microsoft Linux.
Should hopefully work on other OSes and compilers as well.
For real-time graphics applications, FP32 precision implemented in that Microsoft’s library is almost always good enough.
However, some other applications, like CAM/CAE, actually need the FP64 precision.
And sometimes FP64 can even be faster than FP32 because iterative algorithms like conjugate gradient need fewer iterations to converge.
The source code in AvxMath folder implements some low-level math routines for 3D vectors in FP64 precision, stored in __m256d hardware registers.
Copy-paste the content of AvxMath folder into your project, add the *.cpp files from that folder to your build system.
Include the AvxMath.h header, and use the functions from AvxMath namespace.
38 commits
C++
99.3%
The code in this repository implements small yet hopefully useful subset of DirectXMath, ported from FP32 to FP64 precision.
The code requires AVX1,
and can optionally use AVX2 and FMA3 instructions when enabled.
Note however I don’t have old enough computers in this house.
If you need AVX1 version, make sure to test on a PC from 2011-2014 which doesn’t have AVX2:
Intel Sandy Bridge,
Ivy Bridge,
AMD Jaguar or similar.
The current version was tested with C++/17 language version.
It doesn’t use advanced language features though, should be trivial to downgrade if needed.
I have tested with Visual Studio 2022 on Windows 10, and GCC 7.4 on Microsoft Linux.
Should hopefully work on other OSes and compilers as well.
For real-time graphics applications, FP32 precision implemented in that Microsoft’s library is almost always good enough.
However, some other applications, like CAM/CAE, actually need the FP64 precision.
And sometimes FP64 can even be faster than FP32 because iterative algorithms like conjugate gradient need fewer iterations to converge.
The source code in AvxMath folder implements some low-level math routines for 3D vectors in FP64 precision, stored in __m256d hardware registers.
Copy-paste the content of AvxMath folder into your project, add the *.cpp files from that folder to your build system.
Include the AvxMath.h header, and use the functions from AvxMath namespace.
38 commits
C++
99.3%