From 12249849b5ef7ec0c64f74440690fb00708b8da6 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 24 Aug 2017 10:43:21 +0200 Subject: Make the threshold from gemm to coeff-based-product configurable, and add some explanations. --- Eigen/src/Core/GeneralProduct.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Eigen/src/Core/GeneralProduct.h') diff --git a/Eigen/src/Core/GeneralProduct.h b/Eigen/src/Core/GeneralProduct.h index dec24848d..483277fe6 100644 --- a/Eigen/src/Core/GeneralProduct.h +++ b/Eigen/src/Core/GeneralProduct.h @@ -18,6 +18,16 @@ enum { Small = 3 }; +// Define the threshold value to fallback from the generic matrix-matrix product +// implementation (heavy) to the lightweight coeff-based product one. +// See generic_product_impl +// in products/GeneralMatrixMatrix.h for more details. +// TODO This threshold should also be used in the compile-time selector below. +#ifndef EIGEN_GEMM_TO_COEFFBASED_THRESHOLD +// This default value has been obtained on a Haswell architecture. +#define EIGEN_GEMM_TO_COEFFBASED_THRESHOLD 20 +#endif + namespace internal { template struct product_type_selector; -- cgit v1.2.3