aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Alexey Frunze <afrunze@wavecomp.com>2018-07-18 12:27:50 -0700
committerGravatar Alexey Frunze <afrunze@wavecomp.com>2018-07-18 12:27:50 -0700
commit1f523e73042074fcaea6d9991bc2bb6e4f96a1ab (patch)
treeb11b299143f58422c9dff59e82ff3b0c76beaa87
parente3c2d61739ebf09ad4bf86752a9878b7cf4e045f (diff)
Add MIPS changes missing from previous merge.
-rw-r--r--Eigen/Core4
-rw-r--r--Eigen/src/Core/util/ConfigureVectorization.h17
2 files changed, 21 insertions, 0 deletions
diff --git a/Eigen/Core b/Eigen/Core
index 23676311f..f336d407b 100644
--- a/Eigen/Core
+++ b/Eigen/Core
@@ -183,6 +183,10 @@ using std::ptrdiff_t;
#include "src/Core/arch/ZVector/PacketMath.h"
#include "src/Core/arch/ZVector/MathFunctions.h"
#include "src/Core/arch/ZVector/Complex.h"
+#elif defined EIGEN_VECTORIZE_MSA
+ #include "src/Core/arch/MSA/PacketMath.h"
+ #include "src/Core/arch/MSA/MathFunctions.h"
+ #include "src/Core/arch/MSA/Complex.h"
#endif
// Half float support
diff --git a/Eigen/src/Core/util/ConfigureVectorization.h b/Eigen/src/Core/util/ConfigureVectorization.h
index 653e979b1..f30503b33 100644
--- a/Eigen/src/Core/util/ConfigureVectorization.h
+++ b/Eigen/src/Core/util/ConfigureVectorization.h
@@ -339,6 +339,21 @@
#define EIGEN_VECTORIZE_ZVECTOR
#include <vecintrin.h>
+ #elif defined __mips_msa
+
+ // Limit MSA optimizations to little-endian CPUs for now.
+ // TODO: Perhaps, eventually support MSA optimizations on big-endian CPUs?
+ #if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+ #if defined(__LP64__)
+ #define EIGEN_MIPS_64
+ #else
+ #define EIGEN_MIPS_32
+ #endif
+ #define EIGEN_VECTORIZE
+ #define EIGEN_VECTORIZE_MSA
+ #include <msa.h>
+ #endif
+
#endif
#endif
@@ -404,6 +419,8 @@ inline static const char *SimdInstructionSetsInUse(void) {
return "ARM NEON";
#elif defined(EIGEN_VECTORIZE_ZVECTOR)
return "S390X ZVECTOR";
+#elif defined(EIGEN_VECTORIZE_MSA)
+ return "MIPS MSA";
#else
return "None";
#endif