Add MIPS changes missing from previous merge.

This commit is contained in:
Alexey Frunze 2018-07-18 12:27:50 -07:00
parent e3c2d61739
commit 1f523e7304
2 changed files with 21 additions and 0 deletions

View File

@ -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

View File

@ -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