diff options
author | Benoit Jacob <benoitjacob@google.com> | 2015-03-16 16:15:47 -0400 |
---|---|---|
committer | Benoit Jacob <benoitjacob@google.com> | 2015-03-16 16:15:47 -0400 |
commit | eb6929cb191c1b91dda784697faedcfdb245345a (patch) | |
tree | 6746c547dc506fc79812157ac73709f036c9e696 /Eigen/src/Core/products | |
parent | 35c3a8bb84778a81b2f90fdea10eadeae16863aa (diff) |
fix bug in maxsize calculation, which would cause products of size > 2048 to address the lookup table out of bounds
Diffstat (limited to 'Eigen/src/Core/products')
-rw-r--r-- | Eigen/src/Core/products/LookupBlockingSizesTable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/products/LookupBlockingSizesTable.h b/Eigen/src/Core/products/LookupBlockingSizesTable.h index f955253f8..3c8aba6f8 100644 --- a/Eigen/src/Core/products/LookupBlockingSizesTable.h +++ b/Eigen/src/Core/products/LookupBlockingSizesTable.h @@ -59,7 +59,7 @@ struct LookupBlockingSizesFromTableImpl<LhsScalar, RhsScalar, true> using std::max; typedef BlockingSizesLookupTable<LhsScalar, RhsScalar> Table; const uint16_t minsize = Table::BaseSize; - const uint16_t maxsize = minsize << (Table::NumSizes + 1); + const uint16_t maxsize = minsize << (Table::NumSizes - 1); const uint16_t k_clamped = max<uint16_t>(minsize, min<Index>(k, maxsize)); const uint16_t m_clamped = max<uint16_t>(minsize, min<Index>(m, maxsize)); const uint16_t n_clamped = max<uint16_t>(minsize, min<Index>(n, maxsize)); |