mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-30 02:05:18 +08:00
Fix signed-unsigned comparison.
Hex literals are interpreted as unsigned, leading to a comparison between signed max supported function `abcd[0]` (which was negative) to the unsigned literal `0x80000006`. Should not change result since signed is implicitly converted to unsigned for the comparison, but eliminates the warning.
This commit is contained in:
parent
e409795d6b
commit
d5b7981119
@ -1061,7 +1061,7 @@ inline void queryCacheSizes_amd(int& l1, int& l2, int& l3)
|
||||
|
||||
// First query the max supported function.
|
||||
EIGEN_CPUID(abcd,0x80000000,0);
|
||||
if(abcd[0] >= 0x80000006)
|
||||
if(static_cast<numext::uint32_t>(abcd[0]) >= static_cast<numext::uint32_t>(0x80000006))
|
||||
{
|
||||
EIGEN_CPUID(abcd,0x80000005,0);
|
||||
l1 = (abcd[2] >> 24) * 1024; // C[31:24] = L1 size in KB
|
||||
|
Loading…
x
Reference in New Issue
Block a user