[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23455] branches/itasc/extern/Eigen2: Upgrade Eigen2 to version 2.0.6
Benoit Bolsee
benoit.bolsee at online.be
Thu Sep 24 16:33:05 CEST 2009
Revision: 23455
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23455
Author: ben2610
Date: 2009-09-24 16:33:05 +0200 (Thu, 24 Sep 2009)
Log Message:
-----------
Upgrade Eigen2 to version 2.0.6
Modified Paths:
--------------
branches/itasc/extern/Eigen2/Eigen/Cholesky
branches/itasc/extern/Eigen2/Eigen/Core
branches/itasc/extern/Eigen2/Eigen/LeastSquares
branches/itasc/extern/Eigen2/Eigen/Sparse
branches/itasc/extern/Eigen2/Eigen/StdVector
branches/itasc/extern/Eigen2/Eigen/src/Array/PartialRedux.h
branches/itasc/extern/Eigen2/Eigen/src/Array/Random.h
branches/itasc/extern/Eigen2/Eigen/src/Cholesky/LDLT.h
branches/itasc/extern/Eigen2/Eigen/src/Cholesky/LLT.h
branches/itasc/extern/Eigen2/Eigen/src/Core/Block.h
branches/itasc/extern/Eigen2/Eigen/src/Core/CacheFriendlyProduct.h
branches/itasc/extern/Eigen2/Eigen/src/Core/CwiseNullaryOp.h
branches/itasc/extern/Eigen2/Eigen/src/Core/DiagonalMatrix.h
branches/itasc/extern/Eigen2/Eigen/src/Core/MathFunctions.h
branches/itasc/extern/Eigen2/Eigen/src/Core/Matrix.h
branches/itasc/extern/Eigen2/Eigen/src/Core/MatrixBase.h
branches/itasc/extern/Eigen2/Eigen/src/Core/Part.h
branches/itasc/extern/Eigen2/Eigen/src/Core/Product.h
branches/itasc/extern/Eigen2/Eigen/src/Core/Transpose.h
branches/itasc/extern/Eigen2/Eigen/src/Core/Visitor.h
branches/itasc/extern/Eigen2/Eigen/src/Core/arch/SSE/PacketMath.h
branches/itasc/extern/Eigen2/Eigen/src/Core/util/Constants.h
branches/itasc/extern/Eigen2/Eigen/src/Core/util/Macros.h
branches/itasc/extern/Eigen2/Eigen/src/Core/util/Memory.h
branches/itasc/extern/Eigen2/Eigen/src/Core/util/StaticAssert.h
branches/itasc/extern/Eigen2/Eigen/src/Geometry/EulerAngles.h
branches/itasc/extern/Eigen2/Eigen/src/Geometry/Quaternion.h
branches/itasc/extern/Eigen2/Eigen/src/Geometry/Rotation2D.h
branches/itasc/extern/Eigen2/Eigen/src/Geometry/Transform.h
branches/itasc/extern/Eigen2/Eigen/src/LU/LU.h
branches/itasc/extern/Eigen2/Eigen/src/LeastSquares/LeastSquares.h
branches/itasc/extern/Eigen2/Eigen/src/QR/EigenSolver.h
branches/itasc/extern/Eigen2/Eigen/src/QR/QR.h
branches/itasc/extern/Eigen2/Eigen/src/QR/SelfAdjointEigenSolver.h
branches/itasc/extern/Eigen2/Eigen/src/QR/Tridiagonalization.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/CholmodSupport.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/DynamicSparseMatrix.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/MappedSparseMatrix.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SparseBlock.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SparseCwiseBinaryOp.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SparseCwiseUnaryOp.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SparseMatrixBase.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SparseProduct.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SparseUtil.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SparseVector.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SuperLUSupport.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/TaucsSupport.h
branches/itasc/extern/Eigen2/Eigen/src/Sparse/UmfPackSupport.h
branches/itasc/extern/Eigen2/eigen-update.sh
Added Paths:
-----------
branches/itasc/extern/Eigen2/Eigen/Dense
branches/itasc/extern/Eigen2/Eigen/Eigen
branches/itasc/extern/Eigen2/Eigen/NewStdVector
branches/itasc/extern/Eigen2/Eigen/src/Sparse/SparseDiagonalProduct.h
Modified: branches/itasc/extern/Eigen2/Eigen/Cholesky
===================================================================
--- branches/itasc/extern/Eigen2/Eigen/Cholesky 2009-09-24 12:49:41 UTC (rev 23454)
+++ branches/itasc/extern/Eigen2/Eigen/Cholesky 2009-09-24 14:33:05 UTC (rev 23455)
@@ -38,8 +38,8 @@
} // namespace Eigen
#define EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(MATRIXTYPE,PREFIX) \
- PREFIX template class Cholesky<MATRIXTYPE>; \
- PREFIX template class CholeskyWithoutSquareRoot<MATRIXTYPE>
+ PREFIX template class LLT<MATRIXTYPE>; \
+ PREFIX template class LDLT<MATRIXTYPE>
#define EIGEN_CHOLESKY_MODULE_INSTANTIATE(PREFIX) \
EIGEN_CHOLESKY_MODULE_INSTANTIATE_TYPE(Matrix2f,PREFIX); \
Modified: branches/itasc/extern/Eigen2/Eigen/Core
===================================================================
--- branches/itasc/extern/Eigen2/Eigen/Core 2009-09-24 12:49:41 UTC (rev 23454)
+++ branches/itasc/extern/Eigen2/Eigen/Core 2009-09-24 14:33:05 UTC (rev 23455)
@@ -7,11 +7,10 @@
#ifdef _MSC_VER
#include <malloc.h> // for _aligned_malloc -- need it regardless of whether vectorization is enabled
#if (_MSC_VER >= 1500) // 2008 or later
- // Remember that usage of defined() in a #define is undefined by the standard
- #ifdef _M_IX86_FP
- #if _M_IX86_FP >= 2
- #define EIGEN_SSE2_ON_MSVC_2008_OR_LATER
- #endif
+ // Remember that usage of defined() in a #define is undefined by the standard.
+ // a user reported that in 64-bit mode, MSVC doesn't care to define _M_IX86_FP.
+ #if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(_M_X64)
+ #define EIGEN_SSE2_ON_MSVC_2008_OR_LATER
#endif
#endif
#endif
Added: branches/itasc/extern/Eigen2/Eigen/Dense
===================================================================
--- branches/itasc/extern/Eigen2/Eigen/Dense (rev 0)
+++ branches/itasc/extern/Eigen2/Eigen/Dense 2009-09-24 14:33:05 UTC (rev 23455)
@@ -0,0 +1,8 @@
+#include "Core"
+#include "Array"
+#include "LU"
+#include "Cholesky"
+#include "QR"
+#include "SVD"
+#include "Geometry"
+#include "LeastSquares"
Property changes on: branches/itasc/extern/Eigen2/Eigen/Dense
___________________________________________________________________
Name: svn:eol-style
+ native
Added: branches/itasc/extern/Eigen2/Eigen/Eigen
===================================================================
--- branches/itasc/extern/Eigen2/Eigen/Eigen (rev 0)
+++ branches/itasc/extern/Eigen2/Eigen/Eigen 2009-09-24 14:33:05 UTC (rev 23455)
@@ -0,0 +1,2 @@
+#include "Dense"
+#include "Sparse"
Property changes on: branches/itasc/extern/Eigen2/Eigen/Eigen
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: branches/itasc/extern/Eigen2/Eigen/LeastSquares
===================================================================
--- branches/itasc/extern/Eigen2/Eigen/LeastSquares 2009-09-24 12:49:41 UTC (rev 23454)
+++ branches/itasc/extern/Eigen2/Eigen/LeastSquares 2009-09-24 14:33:05 UTC (rev 23455)
@@ -5,7 +5,6 @@
#include "src/Core/util/DisableMSVCWarnings.h"
-#include "LU"
#include "QR"
#include "Geometry"
Added: branches/itasc/extern/Eigen2/Eigen/NewStdVector
===================================================================
--- branches/itasc/extern/Eigen2/Eigen/NewStdVector (rev 0)
+++ branches/itasc/extern/Eigen2/Eigen/NewStdVector 2009-09-24 14:33:05 UTC (rev 23455)
@@ -0,0 +1,168 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2009 Gael Guennebaud <g.gael at free.fr>
+// Copyright (C) 2009 Hauke Heibel <hauke.heibel at googlemail.com>
+//
+// Eigen is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 3 of the License, or (at your option) any later version.
+//
+// Alternatively, you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of
+// the License, or (at your option) any later version.
+//
+// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License and a copy of the GNU General Public License along with
+// Eigen. If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef EIGEN_STDVECTOR_MODULE_H
+#define EIGEN_STDVECTOR_MODULE_H
+
+#include "Core"
+#include <vector>
+
+namespace Eigen {
+
+// This one is needed to prevent reimplementing the whole std::vector.
+template <class T>
+class aligned_allocator_indirection : public aligned_allocator<T>
+{
+public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef const T* const_pointer;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef T value_type;
+
+ template<class U>
+ struct rebind
+ {
+ typedef aligned_allocator_indirection<U> other;
+ };
+
+ aligned_allocator_indirection() throw() {}
+ aligned_allocator_indirection(const aligned_allocator_indirection& ) throw() : aligned_allocator<T>() {}
+ aligned_allocator_indirection(const aligned_allocator<T>& ) throw() {}
+ template<class U>
+ aligned_allocator_indirection(const aligned_allocator_indirection<U>& ) throw() {}
+ template<class U>
+ aligned_allocator_indirection(const aligned_allocator<U>& ) throw() {}
+ ~aligned_allocator_indirection() throw() {}
+};
+
+#ifdef _MSC_VER
+
+ // sometimes, MSVC detects, at compile time, that the argument x
+ // in std::vector::resize(size_t s,T x) won't be aligned and generate an error
+ // even if this function is never called. Whence this little wrapper.
+ #define EIGEN_WORKAROUND_MSVC_STD_VECTOR(T) Eigen::ei_workaround_msvc_std_vector<T>
+ template<typename T> struct ei_workaround_msvc_std_vector : public T
+ {
+ inline ei_workaround_msvc_std_vector() : T() {}
+ inline ei_workaround_msvc_std_vector(const T& other) : T(other) {}
+ inline operator T& () { return *static_cast<T*>(this); }
+ inline operator const T& () const { return *static_cast<const T*>(this); }
+ template<typename OtherT>
+ inline T& operator=(const OtherT& other)
+ { T::operator=(other); return *this; }
+ inline ei_workaround_msvc_std_vector& operator=(const ei_workaround_msvc_std_vector& other)
+ { T::operator=(other); return *this; }
+ };
+
+#else
+
+ #define EIGEN_WORKAROUND_MSVC_STD_VECTOR(T) T
+
+#endif
+
+}
+
+namespace std {
+
+#define EIGEN_STD_VECTOR_SPECIALIZATION_BODY \
+ public: \
+ typedef T value_type; \
+ typedef typename vector_base::allocator_type allocator_type; \
+ typedef typename vector_base::size_type size_type; \
+ typedef typename vector_base::iterator iterator; \
+ typedef typename vector_base::const_iterator const_iterator; \
+ explicit vector(const allocator_type& a = allocator_type()) : vector_base(a) {} \
+ template<typename InputIterator> \
+ vector(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) \
+ : vector_base(first, last, a) {} \
+ vector(const vector& c) : vector_base(c) {} \
+ explicit vector(size_type num, const value_type& val = value_type()) : vector_base(num, val) {} \
+ vector(iterator start, iterator end) : vector_base(start, end) {} \
+ vector& operator=(const vector& x) { \
+ vector_base::operator=(x); \
+ return *this; \
+ }
+
+template<typename T>
+class vector<T,Eigen::aligned_allocator<T> >
+ : public vector<EIGEN_WORKAROUND_MSVC_STD_VECTOR(T),
+ Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STD_VECTOR(T)> >
+{
+ typedef vector<EIGEN_WORKAROUND_MSVC_STD_VECTOR(T),
+ Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STD_VECTOR(T)> > vector_base;
+ EIGEN_STD_VECTOR_SPECIALIZATION_BODY
+
+ void resize(size_type new_size)
+ { resize(new_size, T()); }
+
+#if defined(_VECTOR_)
+ // workaround MSVC std::vector implementation
+ void resize(size_type new_size, const value_type& x)
+ {
+ if (vector_base::size() < new_size)
+ vector_base::_Insert_n(vector_base::end(), new_size - vector_base::size(), x);
+ else if (new_size < vector_base::size())
+ vector_base::erase(vector_base::begin() + new_size, vector_base::end());
+ }
+ void push_back(const value_type& x)
+ { vector_base::push_back(x); }
+ using vector_base::insert;
+ iterator insert(const_iterator position, const value_type& x)
+ { return vector_base::insert(position,x); }
+ void insert(const_iterator position, size_type new_size, const value_type& x)
+ { vector_base::insert(position, new_size, x); }
+#elif defined(_GLIBCXX_VECTOR) && EIGEN_GNUC_AT_LEAST(4,2)
+ // workaround GCC std::vector implementation
+ void resize(size_type new_size, const value_type& x)
+ {
+ if (new_size < vector_base::size())
+ vector_base::_M_erase_at_end(this->_M_impl._M_start + new_size);
+ else
+ vector_base::insert(vector_base::end(), new_size - vector_base::size(), x);
+ }
+#elif defined(_GLIBCXX_VECTOR) && (!EIGEN_GNUC_AT_LEAST(4,1))
+ // Note that before gcc-4.1 we already have: std::vector::resize(size_type,const T&),
+ // no no need to workaround !
+ using vector_base::resize;
+#else
+ // either GCC 4.1 or non-GCC
+ // default implementation which should always work.
+ void resize(size_type new_size, const value_type& x)
+ {
+ if (new_size < vector_base::size())
+ vector_base::erase(vector_base::begin() + new_size, vector_base::end());
+ else if (new_size > vector_base::size())
+ vector_base::insert(vector_base::end(), new_size - vector_base::size(), x);
+ }
+#endif
+
+};
+
+}
+
+#endif // EIGEN_STDVECTOR_MODULE_H
Property changes on: branches/itasc/extern/Eigen2/Eigen/NewStdVector
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: branches/itasc/extern/Eigen2/Eigen/Sparse
===================================================================
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list