From 16abc0ba7f90293289e0fc7866f07d185d500ba6 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Fri, 14 Aug 2009 15:49:14 -0400 Subject: [PATCH] try to support 16 bit platforms... optimistic, but can't hurt --- Eigen/src/Core/util/Constants.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Eigen/src/Core/util/Constants.h b/Eigen/src/Core/util/Constants.h index 98b3bd2e4..21e7f62c3 100644 --- a/Eigen/src/Core/util/Constants.h +++ b/Eigen/src/Core/util/Constants.h @@ -2,7 +2,7 @@ // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud -// Copyright (C) 2006-2008 Benoit Jacob +// Copyright (C) 2007-2009 Benoit Jacob // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -39,10 +39,9 @@ * Also, disabling compiler warnings for integer overflow, sounds like a bad idea. * - It should be a prime number, because for example the old value 10000 led to bugs with 100x100 matrices. * - * If you wish to port Eigen to a platform where sizeof(int)==2, it is perfectly possible to set Dynamic to, say, 97. - * However, changing the value of Dynamic breaks the ABI, as Dynamic is often used as a template parameter for Matrix. + * Changing the value of Dynamic breaks the ABI, as Dynamic is often used as a template parameter for Matrix. */ -const int Dynamic = 33331; +const int Dynamic = sizeof(int) >= 4 ? 33331 : 101; /** This value means +Infinity; it is currently used only as the p parameter to MatrixBase::lpNorm(). * The value Infinity there means the L-infinity norm.