1
0
mirror of https://github.com/microsoft/DirectXMath synced 2024-11-24 05:10:13 +00:00

October 2024 (#214)

This commit is contained in:
Chuck Walbourn 2024-10-15 15:21:59 -07:00 committed by GitHub
parent c4777957bd
commit 0d821781da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 29 additions and 21 deletions

View File

@ -6,6 +6,12 @@ Release available for download on [GitHub](https://github.com/microsoft/DirectXM
## Release History ## Release History
### October 2024 (3.20)
* Fixed close-to-zero bug in the implementation of `TriangleTests::Intersects`
* Renamed implementation namespace from `DirectX::Internal` to `DirectX::MathInternal` to avoid some conformance issues with other libraries
* CMake project updates including support for ARM64EC
* Added GitHub Actions YAML files
### February 2024 (3.19) ### February 2024 (3.19)
* Fix to address MinGW issue with ``__cpuid`` in cpuid.h vs. intrin.h * Fix to address MinGW issue with ``__cpuid`` in cpuid.h vs. intrin.h
* Additional updates for clang/LLVM and GNUC * Additional updates for clang/LLVM and GNUC

View File

@ -3,7 +3,7 @@
cmake_minimum_required (VERSION 3.20) cmake_minimum_required (VERSION 3.20)
set(DIRECTXMATH_VERSION 3.19) set(DIRECTXMATH_VERSION 3.20)
project(DirectXMath project(DirectXMath
VERSION ${DIRECTXMATH_VERSION} VERSION ${DIRECTXMATH_VERSION}

View File

@ -13,7 +13,7 @@
#error DirectX Math requires C++ #error DirectX Math requires C++
#endif #endif
#define DIRECTX_MATH_VERSION 319 #define DIRECTX_MATH_VERSION 320
#if defined(_MSC_VER) && (_MSC_VER < 1910) #if defined(_MSC_VER) && (_MSC_VER < 1910)
#error DirectX Math requires Visual C++ 2017 or later. #error DirectX Math requires Visual C++ 2017 or later.
@ -338,7 +338,7 @@ namespace DirectX
* *
****************************************************************************/ ****************************************************************************/
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4068 4201 4365 4324 4820) #pragma warning(disable:4068 4201 4365 4324 4820)
// C4068: ignore unknown pragmas // C4068: ignore unknown pragmas
@ -2156,7 +2156,7 @@ namespace DirectX
* *
****************************************************************************/ ****************************************************************************/
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)
#pragma warning(disable:4068 4214 4204 4365 4616 4640 6001 6101) #pragma warning(disable:4068 4214 4204 4365 4616 4640 6001 6101)
// C4068/4616: ignore unknown pragmas // C4068/4616: ignore unknown pragmas
@ -2164,7 +2164,7 @@ namespace DirectX
// C4365/4640: Off by default noise // C4365/4640: Off by default noise
// C6001/6101: False positives // C6001/6101: False positives
#endif #endif
#ifdef _PREFAST_ #ifdef _PREFAST_
#pragma prefast(push) #pragma prefast(push)
#pragma prefast(disable : 25000, "FXMVECTOR is 16 bytes") #pragma prefast(disable : 25000, "FXMVECTOR is 16 bytes")
@ -2281,7 +2281,7 @@ namespace DirectX
#ifdef _PREFAST_ #ifdef _PREFAST_
#pragma prefast(pop) #pragma prefast(pop)
#endif #endif
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(pop) #pragma warning(pop)
#endif #endif

View File

@ -6,7 +6,7 @@ https://github.com/Microsoft/DirectXMath
Copyright (c) Microsoft Corporation. Copyright (c) Microsoft Corporation.
**February 2024** **October 2024**
This package contains the DirectXMath library, an all inline SIMD C++ linear algebra library for use in games and graphics apps. This package contains the DirectXMath library, an all inline SIMD C++ linear algebra library for use in games and graphics apps.

View File

@ -41,7 +41,7 @@ namespace XDSP
using CXMVECTOR = DirectX::CXMVECTOR; using CXMVECTOR = DirectX::CXMVECTOR;
using XMFLOAT4A = DirectX::XMFLOAT4A; using XMFLOAT4A = DirectX::XMFLOAT4A;
inline bool ISPOWEROF2(size_t n) { return (((n)&((n)-1)) == 0 && (n) != 0); } constexpr bool ISPOWEROF2(size_t n) { return (((n)&((n)-1)) == 0 && (n) != 0); }
// Parallel multiplication of four complex numbers, assuming real and imaginary values are stored in separate vectors. // Parallel multiplication of four complex numbers, assuming real and imaginary values are stored in separate vectors.
inline void XM_CALLCONV vmulComplex( inline void XM_CALLCONV vmulComplex(
@ -457,42 +457,44 @@ namespace XDSP
// pUnityTable[0 to uLength*4-1] contains real components for current FFT length // pUnityTable[0 to uLength*4-1] contains real components for current FFT length
// pUnityTable[uLength*4 to uLength*8-1] contains imaginary components for current FFT length // pUnityTable[uLength*4 to uLength*8-1] contains imaginary components for current FFT length
static const XMVECTORF32 vXM0123 = { { { 0.0f, 1.0f, 2.0f, 3.0f } } }; static const XMVECTORF32 vXM0123 = { { { 0.0f, 1.0f, 2.0f, 3.0f } } };
uLength >>= 2;
XMVECTOR vlStep = XMVectorReplicate(XM_PIDIV2 / float(uLength)); size_t len = uLength;
len >>= 2;
XMVECTOR vlStep = XMVectorReplicate(XM_PIDIV2 / float(len));
do do
{ {
uLength >>= 2; len >>= 2;
XMVECTOR vJP = vXM0123; XMVECTOR vJP = vXM0123;
for (size_t j = 0; j < uLength; ++j) for (size_t j = 0; j < len; ++j)
{ {
XMVECTOR vSin, vCos; XMVECTOR vSin, vCos;
XMVECTOR viJP, vlS; XMVECTOR viJP, vlS;
pUnityTable[j] = g_XMOne; pUnityTable[j] = g_XMOne;
pUnityTable[j + uLength * 4] = XMVectorZero(); pUnityTable[j + len * 4] = XMVectorZero();
vlS = XMVectorMultiply(vJP, vlStep); vlS = XMVectorMultiply(vJP, vlStep);
XMVectorSinCos(&vSin, &vCos, vlS); XMVectorSinCos(&vSin, &vCos, vlS);
pUnityTable[j + uLength] = vCos; pUnityTable[j + len] = vCos;
pUnityTable[j + uLength * 5] = XMVectorMultiply(vSin, g_XMNegativeOne); pUnityTable[j + len * 5] = XMVectorMultiply(vSin, g_XMNegativeOne);
viJP = XMVectorAdd(vJP, vJP); viJP = XMVectorAdd(vJP, vJP);
vlS = XMVectorMultiply(viJP, vlStep); vlS = XMVectorMultiply(viJP, vlStep);
XMVectorSinCos(&vSin, &vCos, vlS); XMVectorSinCos(&vSin, &vCos, vlS);
pUnityTable[j + uLength * 2] = vCos; pUnityTable[j + len * 2] = vCos;
pUnityTable[j + uLength * 6] = XMVectorMultiply(vSin, g_XMNegativeOne); pUnityTable[j + len * 6] = XMVectorMultiply(vSin, g_XMNegativeOne);
viJP = XMVectorAdd(viJP, vJP); viJP = XMVectorAdd(viJP, vJP);
vlS = XMVectorMultiply(viJP, vlStep); vlS = XMVectorMultiply(viJP, vlStep);
XMVectorSinCos(&vSin, &vCos, vlS); XMVectorSinCos(&vSin, &vCos, vlS);
pUnityTable[j + uLength * 3] = vCos; pUnityTable[j + len * 3] = vCos;
pUnityTable[j + uLength * 7] = XMVectorMultiply(vSin, g_XMNegativeOne); pUnityTable[j + len * 7] = XMVectorMultiply(vSin, g_XMNegativeOne);
vJP = XMVectorAdd(vJP, g_XMFour); vJP = XMVectorAdd(vJP, g_XMFour);
} }
vlStep = XMVectorMultiply(vlStep, g_XMFour); vlStep = XMVectorMultiply(vlStep, g_XMFour);
pUnityTable += uLength * 8; pUnityTable += len * 8;
} while (uLength > 4); } while (len > 4);
} }
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------