Skip to content

Commit

Permalink
update the packaged Eigen to 3.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed Nov 29, 2021
1 parent 58d4c05 commit 2f4218d
Show file tree
Hide file tree
Showing 141 changed files with 1,970 additions and 1,218 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
syntax: glob
qrc_*cxx
*.orig
*.pyc
Expand All @@ -13,7 +12,7 @@ core
core.*
*.bak
*~
build*
*build*
*.moc.*
*.moc
ui_*
Expand All @@ -28,7 +27,11 @@ activity.png
*.rej
log
patch
*.patch
a
a.*
lapack/testing
lapack/reference
.*project
.settings
Makefile
33 changes: 0 additions & 33 deletions gtsam/3rdparty/Eigen/.hgtags

This file was deleted.

13 changes: 9 additions & 4 deletions gtsam/3rdparty/Eigen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -391,22 +391,27 @@ endif()

if(EIGEN_INCLUDE_INSTALL_DIR AND NOT INCLUDE_INSTALL_DIR)
set(INCLUDE_INSTALL_DIR ${EIGEN_INCLUDE_INSTALL_DIR}
CACHE PATH "The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed")
CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed")
else()
set(INCLUDE_INSTALL_DIR
"${CMAKE_INSTALL_INCLUDEDIR}/eigen3"
CACHE PATH "The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed"
CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed"
)
endif()
set(CMAKEPACKAGE_INSTALL_DIR
"${CMAKE_INSTALL_DATADIR}/eigen3/cmake"
CACHE PATH "The directory relative to CMAKE_PREFIX_PATH where Eigen3Config.cmake is installed"
CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where Eigen3Config.cmake is installed"
)
set(PKGCONFIG_INSTALL_DIR
"${CMAKE_INSTALL_DATADIR}/pkgconfig"
CACHE PATH "The directory relative to CMAKE_PREFIX_PATH where eigen3.pc is installed"
CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where eigen3.pc is installed"
)

foreach(var INCLUDE_INSTALL_DIR CMAKEPACKAGE_INSTALL_DIR PKGCONFIG_INSTALL_DIR)
if(IS_ABSOLUTE "${${var}}")
message(FATAL_ERROR "${var} must be relative to CMAKE_PREFIX_PATH. Got: ${${var}}")
endif()
endforeach()

# similar to set_target_properties but append the property instead of overwriting it
macro(ei_add_target_property target prop value)
Expand Down
6 changes: 3 additions & 3 deletions gtsam/3rdparty/Eigen/CTestConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "Eigen 3.3")
set(CTEST_PROJECT_NAME "Eigen")
set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "manao.inria.fr")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Eigen+3.3")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=Eigen")
set(CTEST_DROP_SITE_CDASH TRUE)
7 changes: 6 additions & 1 deletion gtsam/3rdparty/Eigen/Eigen/Core
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@
#include <cmath>
#include <cassert>
#include <functional>
#include <iosfwd>
#include <sstream>
#ifndef EIGEN_NO_IO
#include <iosfwd>
#endif
#include <cstring>
#include <string>
#include <limits>
Expand Down Expand Up @@ -375,7 +378,9 @@ using std::ptrdiff_t;

#if defined EIGEN_VECTORIZE_AVX512
#include "src/Core/arch/SSE/PacketMath.h"
#include "src/Core/arch/SSE/MathFunctions.h"
#include "src/Core/arch/AVX/PacketMath.h"
#include "src/Core/arch/AVX/MathFunctions.h"
#include "src/Core/arch/AVX512/PacketMath.h"
#include "src/Core/arch/AVX512/MathFunctions.h"
#elif defined EIGEN_VECTORIZE_AVX
Expand Down
4 changes: 2 additions & 2 deletions gtsam/3rdparty/Eigen/Eigen/Eigenvalues
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

#include "Core"

#include "src/Core/util/DisableStupidWarnings.h"

#include "Cholesky"
#include "Jacobi"
#include "Householder"
#include "LU"
#include "Geometry"

#include "src/Core/util/DisableStupidWarnings.h"

/** \defgroup Eigenvalues_Module Eigenvalues module
*
*
Expand Down
4 changes: 2 additions & 2 deletions gtsam/3rdparty/Eigen/Eigen/Geometry
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

#include "Core"

#include "src/Core/util/DisableStupidWarnings.h"

#include "SVD"
#include "LU"
#include <limits>

#include "src/Core/util/DisableStupidWarnings.h"

/** \defgroup Geometry_Module Geometry module
*
* This module provides support for:
Expand Down
4 changes: 2 additions & 2 deletions gtsam/3rdparty/Eigen/Eigen/QR
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

#include "Core"

#include "src/Core/util/DisableStupidWarnings.h"

#include "Cholesky"
#include "Jacobi"
#include "Householder"

#include "src/Core/util/DisableStupidWarnings.h"

/** \defgroup QR_Module QR module
*
*
Expand Down
1 change: 0 additions & 1 deletion gtsam/3rdparty/Eigen/Eigen/SparseQR
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*
*/

#include "OrderingMethods"
#include "src/SparseCore/SparseColEtree.h"
#include "src/SparseQR/SparseQR.h"

Expand Down
4 changes: 2 additions & 2 deletions gtsam/3rdparty/Eigen/Eigen/src/Core/ArrayBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ template<typename Derived> class ArrayBase
// inline void evalTo(Dest& dst) const { dst = matrix(); }

protected:
EIGEN_DEVICE_FUNC
ArrayBase() : Base() {}
EIGEN_DEFAULT_COPY_CONSTRUCTOR(ArrayBase)
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(ArrayBase)

private:
explicit ArrayBase(Index);
Expand Down
2 changes: 2 additions & 0 deletions gtsam/3rdparty/Eigen/Eigen/src/Core/CwiseUnaryView.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ class CwiseUnaryViewImpl<ViewOp,MatrixType,Dense>
{
return derived().nestedExpression().outerStride() * sizeof(typename internal::traits<MatrixType>::Scalar) / sizeof(Scalar);
}
protected:
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(CwiseUnaryViewImpl)
};

} // end namespace Eigen
Expand Down
7 changes: 4 additions & 3 deletions gtsam/3rdparty/Eigen/Eigen/src/Core/DenseBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static inline void check_DenseIndex_is_signed() {
*/
template<typename Derived> class DenseBase
#ifndef EIGEN_PARSED_BY_DOXYGEN
: public DenseCoeffsBase<Derived>
: public DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value>
#else
: public DenseCoeffsBase<Derived,DirectWriteAccessors>
#endif // not EIGEN_PARSED_BY_DOXYGEN
Expand Down Expand Up @@ -71,7 +71,7 @@ template<typename Derived> class DenseBase
typedef Scalar value_type;

typedef typename NumTraits<Scalar>::Real RealScalar;
typedef DenseCoeffsBase<Derived> Base;
typedef DenseCoeffsBase<Derived, internal::accessors_level<Derived>::value> Base;

using Base::derived;
using Base::const_cast_derived;
Expand Down Expand Up @@ -587,11 +587,12 @@ template<typename Derived> class DenseBase
}

protected:
EIGEN_DEFAULT_COPY_CONSTRUCTOR(DenseBase)
/** Default constructor. Do nothing. */
EIGEN_DEVICE_FUNC DenseBase()
{
/* Just checks for self-consistency of the flags.
* Only do it when debugging Eigen, as this borders on paranoiac and could slow compilation down
* Only do it when debugging Eigen, as this borders on paranoia and could slow compilation down
*/
#ifdef EIGEN_INTERNAL_DEBUGGING
EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, int(IsRowMajor))
Expand Down
6 changes: 3 additions & 3 deletions gtsam/3rdparty/Eigen/Eigen/src/Core/DenseStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam
if(size != m_rows*m_cols)
{
internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, m_rows*m_cols);
if (size)
if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative
m_data = internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size);
else
m_data = 0;
Expand Down Expand Up @@ -479,7 +479,7 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro
if(size != _Rows*m_cols)
{
internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Rows*m_cols);
if (size)
if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative
m_data = internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size);
else
m_data = 0;
Expand Down Expand Up @@ -553,7 +553,7 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dyn
if(size != m_rows*_Cols)
{
internal::conditional_aligned_delete_auto<T,(_Options&DontAlign)==0>(m_data, _Cols*m_rows);
if (size)
if (size>0) // >0 and not simply !=0 to let the compiler knows that size cannot be negative
m_data = internal::conditional_aligned_new_auto<T,(_Options&DontAlign)==0>(size);
else
m_data = 0;
Expand Down
9 changes: 3 additions & 6 deletions gtsam/3rdparty/Eigen/Eigen/src/Core/GenericPacketMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,7 @@ template<typename Packet> EIGEN_DEVICE_FUNC inline Packet preverse(const Packet&
/** \internal \returns \a a with real and imaginary part flipped (for complex type only) */
template<typename Packet> EIGEN_DEVICE_FUNC inline Packet pcplxflip(const Packet& a)
{
// FIXME: uncomment the following in case we drop the internal imag and real functions.
// using std::imag;
// using std::real;
return Packet(imag(a),real(a));
return Packet(a.imag(),a.real());
}

/**************************
Expand Down Expand Up @@ -524,10 +521,10 @@ inline void palign(PacketType& first, const PacketType& second)
#ifndef __CUDACC__

template<> inline std::complex<float> pmul(const std::complex<float>& a, const std::complex<float>& b)
{ return std::complex<float>(real(a)*real(b) - imag(a)*imag(b), imag(a)*real(b) + real(a)*imag(b)); }
{ return std::complex<float>(a.real()*b.real() - a.imag()*b.imag(), a.imag()*b.real() + a.real()*b.imag()); }

template<> inline std::complex<double> pmul(const std::complex<double>& a, const std::complex<double>& b)
{ return std::complex<double>(real(a)*real(b) - imag(a)*imag(b), imag(a)*real(b) + real(a)*imag(b)); }
{ return std::complex<double>(a.real()*b.real() - a.imag()*b.imag(), a.imag()*b.real() + a.real()*b.imag()); }

#endif

Expand Down
5 changes: 5 additions & 0 deletions gtsam/3rdparty/Eigen/Eigen/src/Core/MapBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
#endif

protected:
EIGEN_DEFAULT_COPY_CONSTRUCTOR(MapBase)
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(MapBase)

template<typename T>
EIGEN_DEVICE_FUNC
Expand Down Expand Up @@ -294,6 +296,9 @@ template<typename Derived> class MapBase<Derived, WriteAccessors>
// In theory we could simply refer to Base:Base::operator=, but MSVC does not like Base::Base,
// see bugs 821 and 920.
using ReadOnlyMapBase::Base::operator=;
protected:
EIGEN_DEFAULT_COPY_CONSTRUCTOR(MapBase)
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(MapBase)
};

#undef EIGEN_STATIC_ASSERT_INDEX_BASED_ACCESS
Expand Down
16 changes: 11 additions & 5 deletions gtsam/3rdparty/Eigen/Eigen/src/Core/MathFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ struct abs2_impl_default<Scalar, true> // IsComplex
EIGEN_DEVICE_FUNC
static inline RealScalar run(const Scalar& x)
{
return real(x)*real(x) + imag(x)*imag(x);
return x.real()*x.real() + x.imag()*x.imag();
}
};

Expand All @@ -313,14 +313,17 @@ struct abs2_retval
****************************************************************************/

template<typename Scalar, bool IsComplex>
struct norm1_default_impl
struct norm1_default_impl;

template<typename Scalar>
struct norm1_default_impl<Scalar,true>
{
typedef typename NumTraits<Scalar>::Real RealScalar;
EIGEN_DEVICE_FUNC
static inline RealScalar run(const Scalar& x)
{
EIGEN_USING_STD_MATH(abs);
return abs(real(x)) + abs(imag(x));
return abs(x.real()) + abs(x.imag());
}
};

Expand Down Expand Up @@ -662,8 +665,8 @@ struct random_default_impl<Scalar, true, false>
{
static inline Scalar run(const Scalar& x, const Scalar& y)
{
return Scalar(random(real(x), real(y)),
random(imag(x), imag(y)));
return Scalar(random(x.real(), y.real()),
random(x.imag(), y.imag()));
}
static inline Scalar run()
{
Expand Down Expand Up @@ -916,6 +919,9 @@ inline EIGEN_MATHFUNC_RETVAL(abs2, Scalar) abs2(const Scalar& x)
return EIGEN_MATHFUNC_IMPL(abs2, Scalar)::run(x);
}

EIGEN_DEVICE_FUNC
inline bool abs2(bool x) { return x; }

template<typename Scalar>
EIGEN_DEVICE_FUNC
inline EIGEN_MATHFUNC_RETVAL(norm1, Scalar) norm1(const Scalar& x)
Expand Down
3 changes: 2 additions & 1 deletion gtsam/3rdparty/Eigen/Eigen/src/Core/MatrixBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ template<typename Derived> class MatrixBase
EIGEN_MATRIX_FUNCTION_1(MatrixComplexPowerReturnValue, pow, power to \c p, const std::complex<RealScalar>& p)

protected:
EIGEN_DEVICE_FUNC MatrixBase() : Base() {}
EIGEN_DEFAULT_COPY_CONSTRUCTOR(MatrixBase)
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(MatrixBase)

private:
EIGEN_DEVICE_FUNC explicit MatrixBase(int);
Expand Down
Loading

0 comments on commit 2f4218d

Please sign in to comment.