mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-18 14:34:17 +08:00
provide a static method to describe which SIMD instructions are used
This commit is contained in:
parent
0f3d69b65e
commit
00bc535b66
18
Eigen/Core
18
Eigen/Core
@ -146,6 +146,24 @@
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
inline static const char *SimdInstructionsSetInUse(void) {
|
||||
#if defined(EIGEN_VECTORIZE_SSE4_2)
|
||||
return "sse, sse2, sse3, ssse3, sse4.1, sse4.2";
|
||||
#elif defined(EIGEN_VECTORIZE_SSE4_2)
|
||||
return "sse, sse2, sse3, ssse3, sse4.1";
|
||||
#elif defined(EIGEN_VECTORIZE_SSSE3)
|
||||
return "sse, sse2, sse3, ssse3";
|
||||
#elif defined(EIGEN_VECTORIZE_SSE3)
|
||||
return "sse, sse2, sse3";
|
||||
#elif defined(EIGEN_VECTORIZE_SSE2)
|
||||
return "sse, sse2";
|
||||
#elif defined(EIGEN_VECTORIZE_ALTIVEC)
|
||||
return "Altivec";
|
||||
#else
|
||||
return "None";
|
||||
#endif
|
||||
}
|
||||
|
||||
// we use size_t frequently and we'll never remember to prepend it with std:: everytime just to
|
||||
// ensure QNX/QCC support
|
||||
using std::size_t;
|
||||
|
Loading…
Reference in New Issue
Block a user