diff options
author | 2010-07-05 16:44:41 +0300 | |
---|---|---|
committer | 2010-07-05 16:44:41 +0300 | |
commit | 1505221263c24ea6c3892cd73ff7c531f96be8e5 (patch) | |
tree | 51b8c3f5f7a7b2c5715088f24380bf6f569a0b46 /Eigen/src/Core | |
parent | 1daf9b11ba6f47fceaf8cd55078d26baa3352590 (diff) |
add check for non x86 platforms, we get a compile error on arm/powerpc without the check
(there is no known -yet- method to get cpuid, without resolving to kernel /sys interface)
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r-- | Eigen/src/Core/util/Memory.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index 022c9b70d..4d3a25bf2 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -591,7 +591,7 @@ public: # if defined(__PIC__) && defined(__i386__) # define EIGEN_CPUID(abcd,func,id) \ __asm__ __volatile__ ("xchgl %%ebx, %%esi;cpuid; xchgl %%ebx,%%esi": "=a" (abcd[0]), "=S" (abcd[1]), "=c" (abcd[2]), "=d" (abcd[3]) : "a" (func), "c" (id)); -# else +# elif !defined(__arm__) && !defined(__powerpc__) # define EIGEN_CPUID(abcd,func,id) \ __asm__ __volatile__ ("cpuid": "=a" (abcd[0]), "=b" (abcd[1]), "=c" (abcd[2]), "=d" (abcd[3]) : "a" (func), "c" (id) ); # endif @@ -772,6 +772,7 @@ inline void ei_queryCacheSizes(int& l1, int& l2, int& l3) // ||ei_cpuid_is_vendor(abcd,"CentaurHauls") // ||ei_cpuid_is_vendor(abcd,"CentaurHauls") #endif + l1 = l2 = l3 = -1; } /** \internal |