at 24.11-pre 1.6 kB view raw
1From fbe3c10d117de98d80a86a10f76d4cd74efc55a8 Mon Sep 17 00:00:00 2001 2From: Martin Reinecke <martin@mpa-garching.mpg.de> 3Date: Fri, 22 Mar 2024 10:53:05 +0100 4Subject: [PATCH] unconditionaly disable use of aligned_alloc 5 6--- 7 pocketfft_hdronly.h | 10 +++++----- 8 1 file changed, 5 insertions(+), 5 deletions(-) 9 10diff --git a/scipy/_lib/pocketfft/pocketfft_hdronly.h b/scipy/_lib/pocketfft/pocketfft_hdronly.h 11index 6c98f2d..66eea06 100644 12--- a/scipy/_lib/pocketfft/pocketfft_hdronly.h 13+++ b/scipy/_lib/pocketfft/pocketfft_hdronly.h 14@@ -152,11 +152,11 @@ template<> struct VLEN<double> { static constexpr size_t val=2; }; 15 #endif 16 #endif 17 18-// the __MINGW32__ part in the conditional below works around the problem that 19-// the standard C++ library on Windows does not provide aligned_alloc() even 20-// though the MinGW compiler and MSVC may advertise C++17 compliance. 21-// aligned_alloc is only supported from MacOS 10.15. 22-#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER)) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15) 23+// std::aligned_alloc is a bit cursed ... it doesn't exist on MacOS < 10.15 24+// and in musl, and other OSes seem to have even more peculiarities. 25+// Let's unconditionally work around it for now. 26+# if 0 27+//#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER)) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15) 28 inline void *aligned_alloc(size_t align, size_t size) 29 { 30 // aligned_alloc() requires that the requested size is a multiple of "align"