[Rcpp-commits] r3185 - in pkg/RcppEigen/inst/include/Eigen: . src/Cholesky src/Core src/Core/products src/Core/util src/Eigen2Support src/Eigen2Support/Geometry src/Eigenvalues src/Geometry src/LU src/LU/arch src/QR src/SVD src/Sparse src/StlSupport
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Aug 28 22:48:49 CEST 2011
Author: dmbates
Date: 2011-08-28 22:48:48 +0200 (Sun, 28 Aug 2011)
New Revision: 3185
Modified:
pkg/RcppEigen/inst/include/Eigen/Core
pkg/RcppEigen/inst/include/Eigen/src/Cholesky/LLT.h
pkg/RcppEigen/inst/include/Eigen/src/Core/BandMatrix.h
pkg/RcppEigen/inst/include/Eigen/src/Core/CwiseNullaryOp.h
pkg/RcppEigen/inst/include/Eigen/src/Core/Diagonal.h
pkg/RcppEigen/inst/include/Eigen/src/Core/Dot.h
pkg/RcppEigen/inst/include/Eigen/src/Core/Functors.h
pkg/RcppEigen/inst/include/Eigen/src/Core/Fuzzy.h
pkg/RcppEigen/inst/include/Eigen/src/Core/GenericPacketMath.h
pkg/RcppEigen/inst/include/Eigen/src/Core/MathFunctions.h
pkg/RcppEigen/inst/include/Eigen/src/Core/MatrixBase.h
pkg/RcppEigen/inst/include/Eigen/src/Core/NumTraits.h
pkg/RcppEigen/inst/include/Eigen/src/Core/PlainObjectBase.h
pkg/RcppEigen/inst/include/Eigen/src/Core/StableNorm.h
pkg/RcppEigen/inst/include/Eigen/src/Core/Transpose.h
pkg/RcppEigen/inst/include/Eigen/src/Core/TriangularMatrix.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralBlockPanelKernel.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixMatrix.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixVector.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/SelfadjointMatrixMatrix.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/SelfadjointMatrixVector.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/TriangularMatrixMatrix.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/TriangularMatrixVector.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/TriangularSolverMatrix.h
pkg/RcppEigen/inst/include/Eigen/src/Core/products/TriangularSolverVector.h
pkg/RcppEigen/inst/include/Eigen/src/Core/util/Macros.h
pkg/RcppEigen/inst/include/Eigen/src/Core/util/Memory.h
pkg/RcppEigen/inst/include/Eigen/src/Core/util/Meta.h
pkg/RcppEigen/inst/include/Eigen/src/Eigen2Support/Cwise.h
pkg/RcppEigen/inst/include/Eigen/src/Eigen2Support/CwiseOperators.h
pkg/RcppEigen/inst/include/Eigen/src/Eigen2Support/Geometry/AlignedBox.h
pkg/RcppEigen/inst/include/Eigen/src/Eigen2Support/SVD.h
pkg/RcppEigen/inst/include/Eigen/src/Eigenvalues/ComplexSchur.h
pkg/RcppEigen/inst/include/Eigen/src/Eigenvalues/EigenSolver.h
pkg/RcppEigen/inst/include/Eigen/src/Eigenvalues/RealSchur.h
pkg/RcppEigen/inst/include/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h
pkg/RcppEigen/inst/include/Eigen/src/Geometry/AlignedBox.h
pkg/RcppEigen/inst/include/Eigen/src/Geometry/AngleAxis.h
pkg/RcppEigen/inst/include/Eigen/src/Geometry/Hyperplane.h
pkg/RcppEigen/inst/include/Eigen/src/Geometry/ParametrizedLine.h
pkg/RcppEigen/inst/include/Eigen/src/LU/FullPivLU.h
pkg/RcppEigen/inst/include/Eigen/src/LU/PartialPivLU.h
pkg/RcppEigen/inst/include/Eigen/src/LU/arch/Inverse_SSE.h
pkg/RcppEigen/inst/include/Eigen/src/QR/ColPivHouseholderQR.h
pkg/RcppEigen/inst/include/Eigen/src/QR/FullPivHouseholderQR.h
pkg/RcppEigen/inst/include/Eigen/src/QR/HouseholderQR.h
pkg/RcppEigen/inst/include/Eigen/src/SVD/JacobiSVD.h
pkg/RcppEigen/inst/include/Eigen/src/Sparse/AmbiVector.h
pkg/RcppEigen/inst/include/Eigen/src/Sparse/CompressedStorage.h
pkg/RcppEigen/inst/include/Eigen/src/Sparse/DynamicSparseMatrix.h
pkg/RcppEigen/inst/include/Eigen/src/Sparse/SparseFuzzy.h
pkg/RcppEigen/inst/include/Eigen/src/Sparse/SparseMatrix.h
pkg/RcppEigen/inst/include/Eigen/src/Sparse/SparseMatrixBase.h
pkg/RcppEigen/inst/include/Eigen/src/Sparse/SparseSelfAdjointView.h
pkg/RcppEigen/inst/include/Eigen/src/Sparse/SparseSparseProduct.h
pkg/RcppEigen/inst/include/Eigen/src/StlSupport/StdVector.h
Log:
Upgrade to Eigen release 3.0.2
Modified: pkg/RcppEigen/inst/include/Eigen/Core
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/Core 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/Core 2011-08-28 20:48:48 UTC (rev 3185)
@@ -175,13 +175,6 @@
#include <new>
#endif
-// this needs to be done after all possible windows C header includes and before any Eigen source includes
-// (system C++ includes are supposed to be able to deal with this already):
-// windows.h defines min and max macros which would make Eigen fail to compile.
-#if defined(min) || defined(max)
-#error The preprocessor symbols 'min' or 'max' are defined. If you are compiling on Windows, do #define NOMINMAX to prevent windows.h from defining these symbols.
-#endif
-
// defined in bits/termios.h
#undef B0
Modified: pkg/RcppEigen/inst/include/Eigen/src/Cholesky/LLT.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Cholesky/LLT.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Cholesky/LLT.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -233,7 +233,7 @@
Index blockSize = size/8;
blockSize = (blockSize/16)*16;
- blockSize = std::min(std::max(blockSize,Index(8)), Index(128));
+ blockSize = (std::min)((std::max)(blockSize,Index(8)), Index(128));
for (Index k=0; k<size; k+=blockSize)
{
@@ -241,7 +241,7 @@
// A00 | - | -
// lu = A10 | A11 | -
// A20 | A21 | A22
- Index bs = std::min(blockSize, size-k);
+ Index bs = (std::min)(blockSize, size-k);
Index rs = size - k - bs;
Block<MatrixType,Dynamic,Dynamic> A11(m,k, k, bs,bs);
Block<MatrixType,Dynamic,Dynamic> A21(m,k+bs,k, rs,bs);
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/BandMatrix.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/BandMatrix.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/BandMatrix.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -87,7 +87,7 @@
if (i<=supers())
{
start = supers()-i;
- len = std::min(rows(),std::max<Index>(0,coeffs().rows() - (supers()-i)));
+ len = (std::min)(rows(),std::max<Index>(0,coeffs().rows() - (supers()-i)));
}
else if (i>=rows()-subs())
len = std::max<Index>(0,coeffs().rows() - (i + 1 - rows() + subs()));
@@ -96,11 +96,11 @@
/** \returns a vector expression of the main diagonal */
inline Block<CoefficientsType,1,SizeAtCompileTime> diagonal()
- { return Block<CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,std::min(rows(),cols())); }
+ { return Block<CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,(std::min)(rows(),cols())); }
/** \returns a vector expression of the main diagonal (const version) */
inline const Block<const CoefficientsType,1,SizeAtCompileTime> diagonal() const
- { return Block<const CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,std::min(rows(),cols())); }
+ { return Block<const CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,(std::min)(rows(),cols())); }
template<int Index> struct DiagonalIntReturnType {
enum {
@@ -122,13 +122,13 @@
/** \returns a vector expression of the \a N -th sub or super diagonal */
template<int N> inline typename DiagonalIntReturnType<N>::Type diagonal()
{
- return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, std::max(0,N), 1, diagonalLength(N));
+ return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, (std::max)(0,N), 1, diagonalLength(N));
}
/** \returns a vector expression of the \a N -th sub or super diagonal */
template<int N> inline const typename DiagonalIntReturnType<N>::Type diagonal() const
{
- return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, std::max(0,N), 1, diagonalLength(N));
+ return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, (std::max)(0,N), 1, diagonalLength(N));
}
/** \returns a vector expression of the \a i -th sub or super diagonal */
@@ -166,7 +166,7 @@
protected:
inline Index diagonalLength(Index i) const
- { return i<0 ? std::min(cols(),rows()+i) : std::min(rows(),cols()-i); }
+ { return i<0 ? (std::min)(cols(),rows()+i) : (std::min)(rows(),cols()-i); }
};
/**
@@ -284,6 +284,7 @@
: m_coeffs(coeffs),
m_rows(rows), m_supers(supers), m_subs(subs)
{
+ EIGEN_UNUSED_VARIABLE(cols);
//internal::assert(coeffs.cols()==cols() && (supers()+subs()+1)==coeffs.rows());
}
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/CwiseNullaryOp.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/CwiseNullaryOp.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/CwiseNullaryOp.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -742,7 +742,7 @@
static EIGEN_STRONG_INLINE Derived& run(Derived& m)
{
m.setZero();
- const Index size = std::min(m.rows(), m.cols());
+ const Index size = (std::min)(m.rows(), m.cols());
for(Index i = 0; i < size; ++i) m.coeffRef(i,i) = typename Derived::Scalar(1);
return m;
}
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/Diagonal.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/Diagonal.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/Diagonal.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -87,7 +87,7 @@
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Diagonal)
inline Index rows() const
- { return m_index.value()<0 ? std::min(m_matrix.cols(),m_matrix.rows()+m_index.value()) : std::min(m_matrix.rows(),m_matrix.cols()-m_index.value()); }
+ { return m_index.value()<0 ? (std::min)(m_matrix.cols(),m_matrix.rows()+m_index.value()) : (std::min)(m_matrix.rows(),m_matrix.cols()-m_index.value()); }
inline Index cols() const { return 1; }
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/Dot.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/Dot.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/Dot.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -116,7 +116,9 @@
//---------- implementation of L2 norm and related functions ----------
-/** \returns the squared \em l2 norm of *this, i.e., for vectors, the dot product of *this with itself.
+/** \returns, for vectors, the squared \em l2 norm of \c *this, and for matrices the Frobenius norm.
+ * In both cases, it consists in the sum of the square of all the matrix entries.
+ * For vectors, this is also equals to the dot product of \c *this with itself.
*
* \sa dot(), norm()
*/
@@ -126,7 +128,9 @@
return internal::real((*this).cwiseAbs2().sum());
}
-/** \returns the \em l2 norm of *this, i.e., for vectors, the square root of the dot product of *this with itself.
+/** \returns, for vectors, the \em l2 norm of \c *this, and for matrices the Frobenius norm.
+ * In both cases, it consists in the square root of the sum of the square of all the matrix entries.
+ * For vectors, this is also equals to the square root of the dot product of \c *this with itself.
*
* \sa dot(), squaredNorm()
*/
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/Functors.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/Functors.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/Functors.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -116,7 +116,7 @@
*/
template<typename Scalar> struct scalar_min_op {
EIGEN_EMPTY_STRUCT_CTOR(scalar_min_op)
- EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& b) const { using std::min; return min(a, b); }
+ EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& b) const { using std::min; return (min)(a, b); }
template<typename Packet>
EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const
{ return internal::pmin(a,b); }
@@ -139,7 +139,7 @@
*/
template<typename Scalar> struct scalar_max_op {
EIGEN_EMPTY_STRUCT_CTOR(scalar_max_op)
- EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& b) const { using std::max; return max(a, b); }
+ EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& b) const { using std::max; return (max)(a, b); }
template<typename Packet>
EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& b) const
{ return internal::pmax(a,b); }
@@ -167,8 +167,8 @@
{
using std::max;
using std::min;
- Scalar p = max(_x, _y);
- Scalar q = min(_x, _y);
+ Scalar p = (max)(_x, _y);
+ Scalar q = (min)(_x, _y);
Scalar qp = q/p;
return p * sqrt(Scalar(1) + qp*qp);
}
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/Fuzzy.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/Fuzzy.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/Fuzzy.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -37,7 +37,7 @@
using std::min;
const typename internal::nested<Derived,2>::type nested(x);
const typename internal::nested<OtherDerived,2>::type otherNested(y);
- return (nested - otherNested).cwiseAbs2().sum() <= prec * prec * min(nested.cwiseAbs2().sum(), otherNested.cwiseAbs2().sum());
+ return (nested - otherNested).cwiseAbs2().sum() <= prec * prec * (min)(nested.cwiseAbs2().sum(), otherNested.cwiseAbs2().sum());
}
};
@@ -94,7 +94,7 @@
*
* \note The fuzzy compares are done multiplicatively. Two vectors \f$ v \f$ and \f$ w \f$
* are considered to be approximately equal within precision \f$ p \f$ if
- * \f[ \Vert v - w \Vert \leqslant p\,\min(\Vert v\Vert, \Vert w\Vert). \f]
+ * \f[ \Vert v - w \Vert \leqslant p\,\(min)(\Vert v\Vert, \Vert w\Vert). \f]
* For matrices, the comparison is done using the Hilbert-Schmidt norm (aka Frobenius norm
* L2 norm).
*
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/GenericPacketMath.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/GenericPacketMath.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/GenericPacketMath.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -134,12 +134,12 @@
/** \internal \returns the min of \a a and \a b (coeff-wise) */
template<typename Packet> inline Packet
pmin(const Packet& a,
- const Packet& b) { using std::min; return min(a, b); }
+ const Packet& b) { using std::min; return (min)(a, b); }
/** \internal \returns the max of \a a and \a b (coeff-wise) */
template<typename Packet> inline Packet
pmax(const Packet& a,
- const Packet& b) { using std::max; return max(a, b); }
+ const Packet& b) { using std::max; return (max)(a, b); }
/** \internal \returns the absolute value of \a a */
template<typename Packet> inline Packet
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/MathFunctions.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/MathFunctions.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/MathFunctions.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -378,8 +378,8 @@
using std::min;
RealScalar _x = abs(x);
RealScalar _y = abs(y);
- RealScalar p = max(_x, _y);
- RealScalar q = min(_x, _y);
+ RealScalar p = (max)(_x, _y);
+ RealScalar q = (min)(_x, _y);
RealScalar qp = q/p;
return p * sqrt(RealScalar(1) + qp*qp);
}
@@ -737,7 +737,7 @@
static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec)
{
using std::min;
- return abs(x - y) <= min(abs(x), abs(y)) * prec;
+ return abs(x - y) <= (min)(abs(x), abs(y)) * prec;
}
static inline bool isApproxOrLessThan(const Scalar& x, const Scalar& y, const RealScalar& prec)
{
@@ -776,7 +776,7 @@
static inline bool isApprox(const Scalar& x, const Scalar& y, const RealScalar& prec)
{
using std::min;
- return abs2(x - y) <= min(abs2(x), abs2(y)) * prec * prec;
+ return abs2(x - y) <= (min)(abs2(x), abs2(y)) * prec * prec;
}
};
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/MatrixBase.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/MatrixBase.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/MatrixBase.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -111,7 +111,7 @@
/** \returns the size of the main diagonal, which is min(rows(),cols()).
* \sa rows(), cols(), SizeAtCompileTime. */
- inline Index diagonalSize() const { return std::min(rows(),cols()); }
+ inline Index diagonalSize() const { return (std::min)(rows(),cols()); }
/** \brief The plain matrix type corresponding to this expression.
*
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/NumTraits.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/NumTraits.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/NumTraits.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -87,8 +87,8 @@
// make sure to override this for floating-point types
return Real(0);
}
- inline static T highest() { return std::numeric_limits<T>::max(); }
- inline static T lowest() { return IsInteger ? std::numeric_limits<T>::min() : (-std::numeric_limits<T>::max()); }
+ inline static T highest() { return (std::numeric_limits<T>::max)(); }
+ inline static T lowest() { return IsInteger ? (std::numeric_limits<T>::min)() : (-(std::numeric_limits<T>::max)()); }
#ifdef EIGEN2_SUPPORT
enum {
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/PlainObjectBase.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/PlainObjectBase.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/PlainObjectBase.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -647,8 +647,8 @@
{
// The storage order does not allow us to use reallocation.
typename Derived::PlainObject tmp(rows,cols);
- const Index common_rows = std::min(rows, _this.rows());
- const Index common_cols = std::min(cols, _this.cols());
+ const Index common_rows = (std::min)(rows, _this.rows());
+ const Index common_cols = (std::min)(cols, _this.cols());
tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols);
_this.derived().swap(tmp);
}
@@ -681,8 +681,8 @@
{
// The storage order does not allow us to use reallocation.
typename Derived::PlainObject tmp(other);
- const Index common_rows = std::min(tmp.rows(), _this.rows());
- const Index common_cols = std::min(tmp.cols(), _this.cols());
+ const Index common_rows = (std::min)(tmp.rows(), _this.rows());
+ const Index common_cols = (std::min)(tmp.cols(), _this.cols());
tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols);
_this.derived().swap(tmp);
}
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/StableNorm.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/StableNorm.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/StableNorm.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -69,7 +69,7 @@
if (bi>0)
internal::stable_norm_kernel(this->head(bi), ssq, scale, invScale);
for (; bi<n; bi+=blockSize)
- internal::stable_norm_kernel(this->segment(bi,min(blockSize, n - bi)).template forceAlignedAccessIf<Alignment>(), ssq, scale, invScale);
+ internal::stable_norm_kernel(this->segment(bi,(min)(blockSize, n - bi)).template forceAlignedAccessIf<Alignment>(), ssq, scale, invScale);
return scale * internal::sqrt(ssq);
}
@@ -103,12 +103,12 @@
// For portability, the PORT subprograms "ilmaeh" and "rlmach"
// are used. For any specific computer, each of the assignment
// statements can be replaced
- nbig = std::numeric_limits<Index>::max(); // largest integer
+ nbig = (std::numeric_limits<Index>::max)(); // largest integer
ibeta = std::numeric_limits<RealScalar>::radix; // base for floating-point numbers
it = std::numeric_limits<RealScalar>::digits; // number of base-beta digits in mantissa
iemin = std::numeric_limits<RealScalar>::min_exponent; // minimum exponent
iemax = std::numeric_limits<RealScalar>::max_exponent; // maximum exponent
- rbig = std::numeric_limits<RealScalar>::max(); // largest floating-point number
+ rbig = (std::numeric_limits<RealScalar>::max)(); // largest floating-point number
iexp = -((1-iemin)/2);
b1 = RealScalar(pow(RealScalar(ibeta),RealScalar(iexp))); // lower boundary of midrange
@@ -167,8 +167,8 @@
}
else
return internal::sqrt(amed);
- asml = min(abig, amed);
- abig = max(abig, amed);
+ asml = (min)(abig, amed);
+ abig = (max)(abig, amed);
if(asml <= abig*relerr)
return abig;
else
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/Transpose.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/Transpose.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/Transpose.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -350,15 +350,14 @@
template<bool DestIsTransposed, typename OtherDerived>
struct check_transpose_aliasing_compile_time_selector
{
- enum { ret = blas_traits<OtherDerived>::IsTransposed != DestIsTransposed
- };
+ enum { ret = bool(blas_traits<OtherDerived>::IsTransposed) != DestIsTransposed };
};
template<bool DestIsTransposed, typename BinOp, typename DerivedA, typename DerivedB>
struct check_transpose_aliasing_compile_time_selector<DestIsTransposed,CwiseBinaryOp<BinOp,DerivedA,DerivedB> >
{
- enum { ret = blas_traits<DerivedA>::IsTransposed != DestIsTransposed
- || blas_traits<DerivedB>::IsTransposed != DestIsTransposed
+ enum { ret = bool(blas_traits<DerivedA>::IsTransposed) != DestIsTransposed
+ || bool(blas_traits<DerivedB>::IsTransposed) != DestIsTransposed
};
};
@@ -367,7 +366,7 @@
{
static bool run(const Scalar* dest, const OtherDerived& src)
{
- return (blas_traits<OtherDerived>::IsTransposed != DestIsTransposed) && (dest!=0 && dest==(Scalar*)extract_data(src));
+ return (bool(blas_traits<OtherDerived>::IsTransposed) != DestIsTransposed) && (dest!=0 && dest==(Scalar*)extract_data(src));
}
};
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/TriangularMatrix.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/TriangularMatrix.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/TriangularMatrix.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -111,6 +111,7 @@
EIGEN_ONLY_USED_FOR_DEBUG(col);
eigen_assert(col>=0 && col<cols() && row>=0 && row<rows());
const int mode = int(Mode) & ~SelfAdjoint;
+ EIGEN_ONLY_USED_FOR_DEBUG(mode);
eigen_assert((mode==Upper && col>=row)
|| (mode==Lower && col<=row)
|| ((mode==StrictlyUpper || mode==UnitUpper) && col>row)
@@ -491,7 +492,7 @@
{
for(Index j = 0; j < dst.cols(); ++j)
{
- Index maxi = std::min(j, dst.rows()-1);
+ Index maxi = (std::min)(j, dst.rows()-1);
for(Index i = 0; i <= maxi; ++i)
dst.copyCoeff(i, j, src);
if (ClearOpposite)
@@ -511,7 +512,7 @@
{
for(Index i = j; i < dst.rows(); ++i)
dst.copyCoeff(i, j, src);
- Index maxi = std::min(j, dst.rows());
+ Index maxi = (std::min)(j, dst.rows());
if (ClearOpposite)
for(Index i = 0; i < maxi; ++i)
dst.coeffRef(i, j) = static_cast<typename Derived1::Scalar>(0);
@@ -527,7 +528,7 @@
{
for(Index j = 0; j < dst.cols(); ++j)
{
- Index maxi = std::min(j, dst.rows());
+ Index maxi = (std::min)(j, dst.rows());
for(Index i = 0; i < maxi; ++i)
dst.copyCoeff(i, j, src);
if (ClearOpposite)
@@ -547,7 +548,7 @@
{
for(Index i = j+1; i < dst.rows(); ++i)
dst.copyCoeff(i, j, src);
- Index maxi = std::min(j, dst.rows()-1);
+ Index maxi = (std::min)(j, dst.rows()-1);
if (ClearOpposite)
for(Index i = 0; i <= maxi; ++i)
dst.coeffRef(i, j) = static_cast<typename Derived1::Scalar>(0);
@@ -563,7 +564,7 @@
{
for(Index j = 0; j < dst.cols(); ++j)
{
- Index maxi = std::min(j, dst.rows());
+ Index maxi = (std::min)(j, dst.rows());
for(Index i = 0; i < maxi; ++i)
dst.copyCoeff(i, j, src);
if (ClearOpposite)
@@ -583,7 +584,7 @@
{
for(Index j = 0; j < dst.cols(); ++j)
{
- Index maxi = std::min(j, dst.rows());
+ Index maxi = (std::min)(j, dst.rows());
for(Index i = maxi+1; i < dst.rows(); ++i)
dst.copyCoeff(i, j, src);
if (ClearOpposite)
@@ -795,7 +796,7 @@
RealScalar maxAbsOnUpperPart = static_cast<RealScalar>(-1);
for(Index j = 0; j < cols(); ++j)
{
- Index maxi = std::min(j, rows()-1);
+ Index maxi = (std::min)(j, rows()-1);
for(Index i = 0; i <= maxi; ++i)
{
RealScalar absValue = internal::abs(coeff(i,j));
@@ -827,7 +828,7 @@
RealScalar threshold = maxAbsOnLowerPart * prec;
for(Index j = 1; j < cols(); ++j)
{
- Index maxi = std::min(j, rows()-1);
+ Index maxi = (std::min)(j, rows()-1);
for(Index i = 0; i < maxi; ++i)
if(internal::abs(coeff(i, j)) > threshold) return false;
}
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralBlockPanelKernel.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralBlockPanelKernel.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralBlockPanelKernel.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -81,6 +81,7 @@
template<typename LhsScalar, typename RhsScalar, int KcFactor>
void computeProductBlockingSizes(std::ptrdiff_t& k, std::ptrdiff_t& m, std::ptrdiff_t& n)
{
+ EIGEN_UNUSED_VARIABLE(n);
// Explanations:
// Let's recall the product algorithms form kc x nc horizontal panels B' on the rhs and
// mc x kc blocks A' on the lhs. A' has to fit into L2 cache. Moreover, B' is processed
@@ -102,7 +103,6 @@
k = std::min<std::ptrdiff_t>(k, l1/kdiv);
std::ptrdiff_t _m = k>0 ? l2/(4 * sizeof(LhsScalar) * k) : 0;
if(_m<m) m = _m & mr_mask;
- n = n;
}
template<typename LhsScalar, typename RhsScalar>
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixMatrix.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixMatrix.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixMatrix.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -78,7 +78,7 @@
typedef gebp_traits<LhsScalar,RhsScalar> Traits;
Index kc = blocking.kc(); // cache block size along the K direction
- Index mc = std::min(rows,blocking.mc()); // cache block size along the M direction
+ Index mc = (std::min)(rows,blocking.mc()); // cache block size along the M direction
//Index nc = blocking.nc(); // cache block size along the N direction
gemm_pack_lhs<LhsScalar, Index, Traits::mr, Traits::LhsProgress, LhsStorageOrder> pack_lhs;
@@ -103,7 +103,7 @@
// For each horizontal panel of the rhs, and corresponding vertical panel of the lhs...
for(Index k=0; k<depth; k+=kc)
{
- const Index actual_kc = std::min(k+kc,depth)-k; // => rows of B', and cols of the A'
+ const Index actual_kc = (std::min)(k+kc,depth)-k; // => rows of B', and cols of the A'
// In order to reduce the chance that a thread has to wait for the other,
// let's start by packing A'.
@@ -140,7 +140,7 @@
// Then keep going as usual with the remaining A'
for(Index i=mc; i<rows; i+=mc)
{
- const Index actual_mc = std::min(i+mc,rows)-i;
+ const Index actual_mc = (std::min)(i+mc,rows)-i;
// pack A_i,k to A'
pack_lhs(blockA, &lhs(i,k), lhsStride, actual_kc, actual_mc);
@@ -174,7 +174,7 @@
// (==GEMM_VAR1)
for(Index k2=0; k2<depth; k2+=kc)
{
- const Index actual_kc = std::min(k2+kc,depth)-k2;
+ const Index actual_kc = (std::min)(k2+kc,depth)-k2;
// OK, here we have selected one horizontal panel of rhs and one vertical panel of lhs.
// => Pack rhs's panel into a sequential chunk of memory (L2 caching)
@@ -187,7 +187,7 @@
// (==GEPP_VAR1)
for(Index i2=0; i2<rows; i2+=mc)
{
- const Index actual_mc = std::min(i2+mc,rows)-i2;
+ const Index actual_mc = (std::min)(i2+mc,rows)-i2;
// We pack the lhs's block into a sequential chunk of memory (L1 caching)
// Note that this block will be read a very high number of times, which is equal to the number of
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -96,14 +96,14 @@
for(Index k2=0; k2<depth; k2+=kc)
{
- const Index actual_kc = std::min(k2+kc,depth)-k2;
+ const Index actual_kc = (std::min)(k2+kc,depth)-k2;
// note that the actual rhs is the transpose/adjoint of mat
pack_rhs(blockB, &rhs(k2,0), rhsStride, actual_kc, size);
for(Index i2=0; i2<size; i2+=mc)
{
- const Index actual_mc = std::min(i2+mc,size)-i2;
+ const Index actual_mc = (std::min)(i2+mc,size)-i2;
pack_lhs(blockA, &lhs(i2, k2), lhsStride, actual_kc, actual_mc);
@@ -112,7 +112,7 @@
// 2 - the actual_mc x actual_mc symmetric block => processed with a special kernel
// 3 - after the diagonal => processed with gebp or skipped
if (UpLo==Lower)
- gebp(res+i2, resStride, blockA, blockB, actual_mc, actual_kc, std::min(size,i2), alpha,
+ gebp(res+i2, resStride, blockA, blockB, actual_mc, actual_kc, (std::min)(size,i2), alpha,
-1, -1, 0, 0, allocatedBlockB);
sybb(res+resStride*i2 + i2, resStride, blockA, blockB + actual_kc*i2, actual_mc, actual_kc, alpha, allocatedBlockB);
@@ -120,7 +120,7 @@
if (UpLo==Upper)
{
Index j2 = i2+actual_mc;
- gebp(res+resStride*j2+i2, resStride, blockA, blockB+actual_kc*j2, actual_mc, actual_kc, std::max(Index(0), size-j2), alpha,
+ gebp(res+resStride*j2+i2, resStride, blockA, blockB+actual_kc*j2, actual_mc, actual_kc, (std::max)(Index(0), size-j2), alpha,
-1, -1, 0, 0, allocatedBlockB);
}
}
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixVector.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixVector.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/products/GeneralMatrixVector.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -134,7 +134,7 @@
}
else
{
- skipColumns = std::min(skipColumns,cols);
+ skipColumns = (std::min)(skipColumns,cols);
// note that the skiped columns are processed later.
}
@@ -386,7 +386,7 @@
}
else
{
- skipRows = std::min(skipRows,Index(rows));
+ skipRows = (std::min)(skipRows,Index(rows));
// note that the skiped columns are processed later.
}
eigen_internal_assert( alignmentPattern==NoneAligned
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/products/SelfadjointMatrixMatrix.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/products/SelfadjointMatrixMatrix.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/products/SelfadjointMatrixMatrix.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -114,7 +114,7 @@
}
// second part: diagonal block
- for(Index j2=k2; j2<std::min(k2+rows,packet_cols); j2+=nr)
+ for(Index j2=k2; j2<(std::min)(k2+rows,packet_cols); j2+=nr)
{
// again we can split vertically in three different parts (transpose, symmetric, normal)
// transpose
@@ -179,7 +179,7 @@
for(Index j2=packet_cols; j2<cols; ++j2)
{
// transpose
- Index half = std::min(end_k,j2);
+ Index half = (std::min)(end_k,j2);
for(Index k=k2; k<half; k++)
{
blockB[count] = conj(rhs(j2,k));
@@ -261,7 +261,7 @@
Index nc = cols; // cache block size along the N direction
computeProductBlockingSizes<Scalar,Scalar>(kc, mc, nc);
// kc must smaller than mc
- kc = std::min(kc,mc);
+ kc = (std::min)(kc,mc);
std::size_t sizeW = kc*Traits::WorkSpaceFactor;
std::size_t sizeB = sizeW + kc*cols;
@@ -276,7 +276,7 @@
for(Index k2=0; k2<size; k2+=kc)
{
- const Index actual_kc = std::min(k2+kc,size)-k2;
+ const Index actual_kc = (std::min)(k2+kc,size)-k2;
// we have selected one row panel of rhs and one column panel of lhs
// pack rhs's panel into a sequential chunk of memory
@@ -289,7 +289,7 @@
// 3 - the panel below the diagonal block => generic packed copy
for(Index i2=0; i2<k2; i2+=mc)
{
- const Index actual_mc = std::min(i2+mc,k2)-i2;
+ const Index actual_mc = (std::min)(i2+mc,k2)-i2;
// transposed packed copy
pack_lhs_transposed(blockA, &lhs(k2, i2), lhsStride, actual_kc, actual_mc);
@@ -297,7 +297,7 @@
}
// the block diagonal
{
- const Index actual_mc = std::min(k2+kc,size)-k2;
+ const Index actual_mc = (std::min)(k2+kc,size)-k2;
// symmetric packed copy
pack_lhs(blockA, &lhs(k2,k2), lhsStride, actual_kc, actual_mc);
@@ -306,7 +306,7 @@
for(Index i2=k2+kc; i2<size; i2+=mc)
{
- const Index actual_mc = std::min(i2+mc,size)-i2;
+ const Index actual_mc = (std::min)(i2+mc,size)-i2;
gemm_pack_lhs<Scalar, Index, Traits::mr, Traits::LhsProgress, LhsStorageOrder,false>()
(blockA, &lhs(i2, k2), lhsStride, actual_kc, actual_mc);
@@ -352,14 +352,14 @@
for(Index k2=0; k2<size; k2+=kc)
{
- const Index actual_kc = std::min(k2+kc,size)-k2;
+ const Index actual_kc = (std::min)(k2+kc,size)-k2;
pack_rhs(blockB, _rhs, rhsStride, actual_kc, cols, k2);
// => GEPP
for(Index i2=0; i2<rows; i2+=mc)
{
- const Index actual_mc = std::min(i2+mc,rows)-i2;
+ const Index actual_mc = (std::min)(i2+mc,rows)-i2;
pack_lhs(blockA, &lhs(i2, k2), lhsStride, actual_kc, actual_mc);
gebp_kernel(res+i2, resStride, blockA, blockB, actual_mc, actual_kc, cols, alpha);
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/products/SelfadjointMatrixVector.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/products/SelfadjointMatrixVector.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/products/SelfadjointMatrixVector.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -70,7 +70,7 @@
rhs[i] = *it;
}
- Index bound = std::max(Index(0),size-8) & 0xfffffffe;
+ Index bound = (std::max)(Index(0),size-8) & 0xfffffffe;
if (FirstTriangular)
bound = size - bound;
Modified: pkg/RcppEigen/inst/include/Eigen/src/Core/products/TriangularMatrixMatrix.h
===================================================================
--- pkg/RcppEigen/inst/include/Eigen/src/Core/products/TriangularMatrixMatrix.h 2011-08-27 11:24:59 UTC (rev 3184)
+++ pkg/RcppEigen/inst/include/Eigen/src/Core/products/TriangularMatrixMatrix.h 2011-08-28 20:48:48 UTC (rev 3185)
@@ -112,7 +112,7 @@
Scalar alpha)
{
// strip zeros
- Index diagSize = std::min(_rows,_depth);
+ Index diagSize = (std::min)(_rows,_depth);
Index rows = IsLower ? _rows : diagSize;
Index depth = IsLower ? diagSize : _depth;
Index cols = _cols;
@@ -145,7 +145,7 @@
IsLower ? k2>0 : k2<depth;
IsLower ? k2-=kc : k2+=kc)
{
- Index actual_kc = std::min(IsLower ? k2 : depth-k2, kc);
+ Index actual_kc = (std::min)(IsLower ? k2 : depth-k2, kc);
Index actual_k2 = IsLower ? k2-actual_kc : k2;
// align blocks with the end of the triangular part for trapezoidal lhs
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/rcpp -r 3185
More information about the Rcpp-commits
mailing list