diff options
author | Alexey Frunze <afrunze@wavecomp.com> | 2018-07-18 12:27:50 -0700 |
---|---|---|
committer | Alexey Frunze <afrunze@wavecomp.com> | 2018-07-18 12:27:50 -0700 |
commit | 1f523e73042074fcaea6d9991bc2bb6e4f96a1ab (patch) | |
tree | b11b299143f58422c9dff59e82ff3b0c76beaa87 /Eigen/src/Core/util | |
parent | e3c2d61739ebf09ad4bf86752a9878b7cf4e045f (diff) |
Add MIPS changes missing from previous merge.
Diffstat (limited to 'Eigen/src/Core/util')
-rw-r--r-- | Eigen/src/Core/util/ConfigureVectorization.h | 17 |
1 files changed, 17 insertions, 0 deletions
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 |