mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-26 14:54:30 +08:00
fix compilation when EIGEN_CPUD is not defined
This commit is contained in:
parent
8beb60bf63
commit
0a42f8c876
@ -600,6 +600,7 @@ public:
|
|||||||
// # define EIGEN_CPUID(abcd,func) __cpuid((int*)abcd,func)
|
// # define EIGEN_CPUID(abcd,func) __cpuid((int*)abcd,func)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef EIGEN_CPUID
|
||||||
inline bool ei_cpuid_is_vendor(int abcd[4], const char* vendor)
|
inline bool ei_cpuid_is_vendor(int abcd[4], const char* vendor)
|
||||||
{
|
{
|
||||||
return abcd[1]==((int*)(vendor))[0] && abcd[3]==((int*)(vendor))[1] && abcd[2]==((int*)(vendor))[2];
|
return abcd[1]==((int*)(vendor))[0] && abcd[3]==((int*)(vendor))[1] && abcd[2]==((int*)(vendor))[2];
|
||||||
@ -645,6 +646,7 @@ inline void ei_queryCacheSizes_amd(int& l1, int& l2, int& l3)
|
|||||||
l2 = (abcd[2] >> 16) * 1024; // C[31;16] = l2 cache size in KB
|
l2 = (abcd[2] >> 16) * 1024; // C[31;16] = l2 cache size in KB
|
||||||
l3 = ((abcd[3] & 0xFFFC000) >> 18) * 512 * 1024; // D[31;18] = l3 cache size in 512KB
|
l3 = ((abcd[3] & 0xFFFC000) >> 18) * 512 * 1024; // D[31;18] = l3 cache size in 512KB
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/** \internal
|
/** \internal
|
||||||
* Queries and returns the cache sizes in Bytes of the L1, L2, and L3 data caches respectively */
|
* Queries and returns the cache sizes in Bytes of the L1, L2, and L3 data caches respectively */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user