From 8df272af8889bf01d800a83d64c17e19dd291744 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 30 Nov 2016 22:21:33 +0100 Subject: [PATCH] Fix slection of product implementation for dynamic size matrices with fixed max size. --- Eigen/src/Core/GeneralProduct.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/GeneralProduct.h b/Eigen/src/Core/GeneralProduct.h index 8d87cab1f..f62ecfcbe 100644 --- a/Eigen/src/Core/GeneralProduct.h +++ b/Eigen/src/Core/GeneralProduct.h @@ -25,7 +25,8 @@ template struct product_type_selector; template struct product_size_category { enum { is_large = MaxSize == Dynamic || - Size >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD, + Size >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD || + (Size==Dynamic && MaxSize>=EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD), value = is_large ? Large : Size == 1 ? 1 : Small