void-packages/srcpkgs/Clp/patches/disable-avx.patch

46 lines
1.5 KiB
Diff

This disables AVX2 usage on x86_64 (by defining NO_AVX_HARDWARE) as well as
removes now-unused includes for AVX2/AVX512 instrinsics (the NEON header
was never used in the first place and the way it's included is completely
wrong anyway).
We need it disabled on x86_64 because we're generic (and AVX is sandybridge
and newer, but the enabled code was for haswell and newer), and on other
arches it's disabled for obvious reasons.
--- Clp/src/ClpPackedMatrix.cpp
+++ Clp/src/ClpPackedMatrix.cpp
@@ -6749,11 +6749,6 @@ ClpPackedMatrix3::ClpPackedMatrix3()
}
#ifdef _MSC_VER
#include <intrin.h>
-#elif defined(__arm__)
-#include <arm_neon.h>
-#else
-#include <immintrin.h>
-//#include <fmaintrin.h>
#endif
/* Constructor from copy. */
ClpPackedMatrix3::ClpPackedMatrix3(ClpSimplex *model, const CoinPackedMatrix *columnCopy)
@@ -6777,7 +6772,7 @@ ClpPackedMatrix3::ClpPackedMatrix3(ClpSimplex *model, const CoinPackedMatrix *co
{
//#undef COIN_AVX2
//#define COIN_AVX2 8
- //#define NO_AVX_HARDWARE
+#define NO_AVX_HARDWARE
#ifndef COIN_AVX2
#define COIN_AVX2 4
#else
--- Clp/src/ClpSimplexDual.cpp
+++ Clp/src/ClpSimplexDual.cpp
@@ -3556,11 +3556,6 @@ void moveAndZero(clpTempInfo *info, int type, void *extra)
#endif
#ifdef _MSC_VER
#include <intrin.h>
-#elif defined(__arm__)
-#include <arm_neon.h>
-#else
-#include <immintrin.h>
-//#include <fmaintrin.h>
#endif
int ClpSimplexDual::dualColumn0(const CoinIndexedVector *rowArray,
const CoinIndexedVector *columnArray,