aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/LU/PartialPivLU.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-07-21 11:19:36 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-07-21 11:19:36 +0200
commit22bff949c898e7c340a415d771145c0bd22317d6 (patch)
treebe0fc956a220db15d4d7622fc580777f563ea643 /Eigen/src/LU/PartialPivLU.h
parentd4bd8bddb5e9f968ffcbdfff5936934e3d706684 (diff)
protect calls to min and max with parentheses to make Eigen compatible with default windows.h
Diffstat (limited to 'Eigen/src/LU/PartialPivLU.h')
-rw-r--r--Eigen/src/LU/PartialPivLU.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h
index 4cae510b0..09394b01f 100644
--- a/Eigen/src/LU/PartialPivLU.h
+++ b/Eigen/src/LU/PartialPivLU.h
@@ -253,7 +253,7 @@ struct partial_lu_impl
{
const Index rows = lu.rows();
const Index cols = lu.cols();
- const Index size = std::min(rows,cols);
+ const Index size = (std::min)(rows,cols);
nb_transpositions = 0;
int first_zero_pivot = -1;
for(Index k = 0; k < size; ++k)
@@ -313,7 +313,7 @@ struct partial_lu_impl
MapLU lu1(lu_data,StorageOrder==RowMajor?rows:luStride,StorageOrder==RowMajor?luStride:cols);
MatrixType lu(lu1,0,0,rows,cols);
- const Index size = std::min(rows,cols);
+ const Index size = (std::min)(rows,cols);
// if the matrix is too small, no blocking:
if(size<=16)
@@ -327,14 +327,14 @@ struct partial_lu_impl
{
blockSize = size/8;
blockSize = (blockSize/16)*16;
- blockSize = std::min(std::max(blockSize,Index(8)), maxBlockSize);
+ blockSize = (std::min)((std::max)(blockSize,Index(8)), maxBlockSize);
}
nb_transpositions = 0;
int first_zero_pivot = -1;
for(Index k = 0; k < size; k+=blockSize)
{
- Index bs = std::min(size-k,blockSize); // actual size of the block
+ Index bs = (std::min)(size-k,blockSize); // actual size of the block
Index trows = rows - k - bs; // trailing rows
Index tsize = size - k - bs; // trailing size