diff options
author | 2010-06-14 09:05:08 -0400 | |
---|---|---|
committer | 2010-06-14 09:05:08 -0400 | |
commit | d788627b54ab39af395639388e6723bb28784d20 (patch) | |
tree | 688c20e8cde3040e4d1211bad0720a562469375f /Eigen/src/Core/util/Macros.h | |
parent | a54772250f026393b16cb4f05f4e15528e935cae (diff) |
rename:
EIGEN_SIZE_MIN ---> EIGEN_SIZE_MIN_PREFER_DYNAMIC
EIGEN_MAXSIZE_MIN ---> EIGEN_SIZE_MIN_PREFER_FIXED
and make sure to use the latter in products xprs to determine the inner size.
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 6a05ee87a..3c033d100 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -308,25 +308,25 @@ #define EIGEN_PLAIN_ENUM_MIN(a,b) (((int)a <= (int)b) ? (int)a : (int)b) #define EIGEN_PLAIN_ENUM_MAX(a,b) (((int)a >= (int)b) ? (int)a : (int)b) -// EIGEN_SIZE_MIN gives the min between compile-time sizes. 0 has absolute priority, followed by 1, +// EIGEN_SIZE_MIN_PREFER_DYNAMIC gives the min between compile-time sizes. 0 has absolute priority, followed by 1, // followed by Dynamic, followed by other finite values. The reason for giving Dynamic the priority over // finite values is that min(3, Dynamic) should be Dynamic, since that could be anything between 0 and 3. -#define EIGEN_SIZE_MIN(a,b) (((int)a == 0 || (int)b == 0) ? 0 \ +#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a,b) (((int)a == 0 || (int)b == 0) ? 0 \ : ((int)a == 1 || (int)b == 1) ? 1 \ : ((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \ : ((int)a <= (int)b) ? (int)a : (int)b) -// EIGEN_MAXSIZE_MIN is a variant of EIGEN_SIZE_MIN comparing MaxSizes. The difference is that finite values +// EIGEN_SIZE_MIN_PREFER_FIXED is a variant of EIGEN_SIZE_MIN_PREFER_DYNAMIC comparing MaxSizes. The difference is that finite values // now have priority over Dynamic, so that min(3, Dynamic) gives 3. Indeed, whatever the actual value is // (between 0 and 3), it is not more than 3. -#define EIGEN_MAXSIZE_MIN(a,b) (((int)a == 0 || (int)b == 0) ? 0 \ +#define EIGEN_SIZE_MIN_PREFER_FIXED(a,b) (((int)a == 0 || (int)b == 0) ? 0 \ : ((int)a == 1 || (int)b == 1) ? 1 \ : ((int)a == Dynamic && (int)b == Dynamic) ? Dynamic \ : ((int)a == Dynamic) ? (int)b \ : ((int)b == Dynamic) ? (int)a \ : ((int)a <= (int)b) ? (int)a : (int)b) -// see EIGEN_SIZE_MIN. No need for a separate variant for MaxSizes here. +// see EIGEN_SIZE_MIN_PREFER_DYNAMIC. No need for a separate variant for MaxSizes here. #define EIGEN_SIZE_MAX(a,b) (((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \ : ((int)a >= (int)b) ? (int)a : (int)b) |