aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util
diff options
context:
space:
mode:
authorGravatar Antonio Sanchez <cantonios@google.com>2021-01-20 08:34:00 -0800
committerGravatar Antonio Sanchez <cantonios@google.com>2021-01-20 08:34:00 -0800
commitd5b79811197d72e29219038c130e0e417d671947 (patch)
tree6e55e1028d578f5f6fabe3fe4e2bf31c8b6c1568 /Eigen/src/Core/util
parente409795d6bd94a3c29ab08b8f85c4195e61ec992 (diff)
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.
Diffstat (limited to 'Eigen/src/Core/util')
-rw-r--r--Eigen/src/Core/util/Memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h
index e06cb9192..14713aaa7 100644
--- a/Eigen/src/Core/util/Memory.h
+++ b/Eigen/src/Core/util/Memory.h
@@ -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