diff --git a/README.md b/README.md
index a071be32f5f..600f5712ad0 100644
--- a/README.md
+++ b/README.md
@@ -1,28 +1,28 @@
-
-
-The Stan Math Library is a C++, reverse-mode automatic
-differentiation library designed to be usable, extensive and
-extensible, efficient, scalable, stable, portable, and redistributable
-in order to facilitate the construction and utilization of algorithms
-that utilize derivatives.
-
-
-Documentation, Installation, and Examples
---------------
-
-All of Stan math's documentation is hosted on our website below. Please do not
-reference articles in the wiki as they are outdated and not maintained.
-
-[mc-stan.org/math](https://mc-stan.org/math/)
-
-
-Licensing
----------
-The Stan Math Library is licensed under the [new BSD
-license](https://github.com/stan-dev/math/blob/develop/LICENSE%2Emd).
-
-The Stan Math Library depends on the Intel TBB library which is
-licensed under the Apache 2.0 license. This dependency implies an
-additional restriction as compared to the new BSD license alone. The
-Apache 2.0 license is incompatible with GPL-2 licensed code if
-distributed as a unitary binary. You may refer to the Licensing page on the [Stan wiki](https://github.com/stan-dev/stan/wiki/Stan-Licensing).
+
+
+The Stan Math Library is a C++, reverse-mode automatic
+differentiation library designed to be usable, extensive and
+extensible, efficient, scalable, stable, portable, and redistributable
+in order to facilitate the construction and utilization of algorithms
+that utilize derivatives.
+
+
+Documentation, Installation, and Examples
+--------------
+
+All of Stan math's documentation is hosted on our website below. Please do not
+reference articles in the wiki as they are outdated and not maintained.
+
+[mc-stan.org/math](https://mc-stan.org/math/)
+
+
+Licensing
+---------
+The Stan Math Library is licensed under the [new BSD
+license](https://github.com/stan-dev/math/blob/develop/LICENSE%2Emd).
+
+The Stan Math Library depends on the Intel TBB library which is
+licensed under the Apache 2.0 license. This dependency implies an
+additional restriction as compared to the new BSD license alone. The
+Apache 2.0 license is incompatible with GPL-2 licensed code if
+distributed as a unitary binary. You may refer to the Licensing page on the [Stan wiki](https://github.com/stan-dev/stan/wiki/Stan-Licensing).
diff --git a/lib/eigen_3.3.9/Eigen/CMakeLists.txt b/lib/eigen_3.3.9/Eigen/CMakeLists.txt
deleted file mode 100644
index 9eb502b792d..00000000000
--- a/lib/eigen_3.3.9/Eigen/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-include(RegexUtils)
-test_escape_string_as_regex()
-
-file(GLOB Eigen_directory_files "*")
-
-escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
-
-foreach(f ${Eigen_directory_files})
- if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src")
- list(APPEND Eigen_directory_files_to_install ${f})
- endif()
-endforeach(f ${Eigen_directory_files})
-
-install(FILES
- ${Eigen_directory_files_to_install}
- DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
- )
-
-install(DIRECTORY src DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel FILES_MATCHING PATTERN "*.h")
diff --git a/lib/eigen_3.3.9/Eigen/src/Core/GenericPacketMath.h b/lib/eigen_3.3.9/Eigen/src/Core/GenericPacketMath.h
deleted file mode 100644
index e594437791b..00000000000
--- a/lib/eigen_3.3.9/Eigen/src/Core/GenericPacketMath.h
+++ /dev/null
@@ -1,590 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2008 Gael Guennebaud
-// Copyright (C) 2006-2008 Benoit Jacob
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_GENERIC_PACKET_MATH_H
-#define EIGEN_GENERIC_PACKET_MATH_H
-
-namespace Eigen {
-
-namespace internal {
-
-/** \internal
- * \file GenericPacketMath.h
- *
- * Default implementation for types not supported by the vectorization.
- * In practice these functions are provided to make easier the writing
- * of generic vectorized code.
- */
-
-#ifndef EIGEN_DEBUG_ALIGNED_LOAD
-#define EIGEN_DEBUG_ALIGNED_LOAD
-#endif
-
-#ifndef EIGEN_DEBUG_UNALIGNED_LOAD
-#define EIGEN_DEBUG_UNALIGNED_LOAD
-#endif
-
-#ifndef EIGEN_DEBUG_ALIGNED_STORE
-#define EIGEN_DEBUG_ALIGNED_STORE
-#endif
-
-#ifndef EIGEN_DEBUG_UNALIGNED_STORE
-#define EIGEN_DEBUG_UNALIGNED_STORE
-#endif
-
-struct default_packet_traits
-{
- enum {
- HasHalfPacket = 0,
-
- HasAdd = 1,
- HasSub = 1,
- HasMul = 1,
- HasNegate = 1,
- HasAbs = 1,
- HasArg = 0,
- HasAbs2 = 1,
- HasMin = 1,
- HasMax = 1,
- HasConj = 1,
- HasSetLinear = 1,
- HasBlend = 0,
-
- HasDiv = 0,
- HasSqrt = 0,
- HasRsqrt = 0,
- HasExp = 0,
- HasLog = 0,
- HasLog1p = 0,
- HasLog10 = 0,
- HasPow = 0,
-
- HasSin = 0,
- HasCos = 0,
- HasTan = 0,
- HasASin = 0,
- HasACos = 0,
- HasATan = 0,
- HasSinh = 0,
- HasCosh = 0,
- HasTanh = 0,
- HasLGamma = 0,
- HasDiGamma = 0,
- HasZeta = 0,
- HasPolygamma = 0,
- HasErf = 0,
- HasErfc = 0,
- HasIGamma = 0,
- HasIGammac = 0,
- HasBetaInc = 0,
-
- HasRound = 0,
- HasFloor = 0,
- HasCeil = 0,
-
- HasSign = 0
- };
-};
-
-template struct packet_traits : default_packet_traits
-{
- typedef T type;
- typedef T half;
- enum {
- Vectorizable = 0,
- size = 1,
- AlignedOnScalar = 0,
- HasHalfPacket = 0
- };
- enum {
- HasAdd = 0,
- HasSub = 0,
- HasMul = 0,
- HasNegate = 0,
- HasAbs = 0,
- HasAbs2 = 0,
- HasMin = 0,
- HasMax = 0,
- HasConj = 0,
- HasSetLinear = 0
- };
-};
-
-template struct packet_traits : packet_traits { };
-
-template struct type_casting_traits {
- enum {
- VectorizedCast = 0,
- SrcCoeffRatio = 1,
- TgtCoeffRatio = 1
- };
-};
-
-
-/** \internal \returns static_cast(a) (coeff-wise) */
-template
-EIGEN_DEVICE_FUNC inline TgtPacket
-pcast(const SrcPacket& a) {
- return static_cast(a);
-}
-template
-EIGEN_DEVICE_FUNC inline TgtPacket
-pcast(const SrcPacket& a, const SrcPacket& /*b*/) {
- return static_cast(a);
-}
-
-template
-EIGEN_DEVICE_FUNC inline TgtPacket
-pcast(const SrcPacket& a, const SrcPacket& /*b*/, const SrcPacket& /*c*/, const SrcPacket& /*d*/) {
- return static_cast(a);
-}
-
-/** \internal \returns a + b (coeff-wise) */
-template EIGEN_DEVICE_FUNC inline Packet
-padd(const Packet& a,
- const Packet& b) { return a+b; }
-
-/** \internal \returns a - b (coeff-wise) */
-template EIGEN_DEVICE_FUNC inline Packet
-psub(const Packet& a,
- const Packet& b) { return a-b; }
-
-/** \internal \returns -a (coeff-wise) */
-template EIGEN_DEVICE_FUNC inline Packet
-pnegate(const Packet& a) { return -a; }
-
-/** \internal \returns conj(a) (coeff-wise) */
-
-template EIGEN_DEVICE_FUNC inline Packet
-pconj(const Packet& a) { return numext::conj(a); }
-
-/** \internal \returns a * b (coeff-wise) */
-template EIGEN_DEVICE_FUNC inline Packet
-pmul(const Packet& a,
- const Packet& b) { return a*b; }
-
-/** \internal \returns a / b (coeff-wise) */
-template EIGEN_DEVICE_FUNC inline Packet
-pdiv(const Packet& a,
- const Packet& b) { return a/b; }
-
-/** \internal \returns the min of \a a and \a b (coeff-wise) */
-template EIGEN_DEVICE_FUNC inline Packet
-pmin(const Packet& a,
- const Packet& b) { return numext::mini(a, b); }
-
-/** \internal \returns the max of \a a and \a b (coeff-wise) */
-template EIGEN_DEVICE_FUNC inline Packet
-pmax(const Packet& a,
- const Packet& b) { return numext::maxi(a, b); }
-
-/** \internal \returns the absolute value of \a a */
-template EIGEN_DEVICE_FUNC inline Packet
-pabs(const Packet& a) { using std::abs; return abs(a); }
-
-/** \internal \returns the phase angle of \a a */
-template EIGEN_DEVICE_FUNC inline Packet
-parg(const Packet& a) { using numext::arg; return arg(a); }
-
-/** \internal \returns the bitwise and of \a a and \a b */
-template EIGEN_DEVICE_FUNC inline Packet
-pand(const Packet& a, const Packet& b) { return a & b; }
-
-/** \internal \returns the bitwise or of \a a and \a b */
-template EIGEN_DEVICE_FUNC inline Packet
-por(const Packet& a, const Packet& b) { return a | b; }
-
-/** \internal \returns the bitwise xor of \a a and \a b */
-template EIGEN_DEVICE_FUNC inline Packet
-pxor(const Packet& a, const Packet& b) { return a ^ b; }
-
-/** \internal \returns the bitwise andnot of \a a and \a b */
-template EIGEN_DEVICE_FUNC inline Packet
-pandnot(const Packet& a, const Packet& b) { return a & (!b); }
-
-/** \internal \returns a packet version of \a *from, from must be 16 bytes aligned */
-template EIGEN_DEVICE_FUNC inline Packet
-pload(const typename unpacket_traits::type* from) { return *from; }
-
-/** \internal \returns a packet version of \a *from, (un-aligned load) */
-template EIGEN_DEVICE_FUNC inline Packet
-ploadu(const typename unpacket_traits::type* from) { return *from; }
-
-/** \internal \returns a packet with constant coefficients \a a, e.g.: (a,a,a,a) */
-template EIGEN_DEVICE_FUNC inline Packet
-pset1(const typename unpacket_traits::type& a) { return a; }
-
-/** \internal \returns a packet with constant coefficients \a a[0], e.g.: (a[0],a[0],a[0],a[0]) */
-template EIGEN_DEVICE_FUNC inline Packet
-pload1(const typename unpacket_traits::type *a) { return pset1(*a); }
-
-/** \internal \returns a packet with elements of \a *from duplicated.
- * For instance, for a packet of 8 elements, 4 scalars will be read from \a *from and
- * duplicated to form: {from[0],from[0],from[1],from[1],from[2],from[2],from[3],from[3]}
- * Currently, this function is only used for scalar * complex products.
- */
-template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet
-ploaddup(const typename unpacket_traits::type* from) { return *from; }
-
-/** \internal \returns a packet with elements of \a *from quadrupled.
- * For instance, for a packet of 8 elements, 2 scalars will be read from \a *from and
- * replicated to form: {from[0],from[0],from[0],from[0],from[1],from[1],from[1],from[1]}
- * Currently, this function is only used in matrix products.
- * For packet-size smaller or equal to 4, this function is equivalent to pload1
- */
-template EIGEN_DEVICE_FUNC inline Packet
-ploadquad(const typename unpacket_traits::type* from)
-{ return pload1(from); }
-
-/** \internal equivalent to
- * \code
- * a0 = pload1(a+0);
- * a1 = pload1(a+1);
- * a2 = pload1(a+2);
- * a3 = pload1(a+3);
- * \endcode
- * \sa pset1, pload1, ploaddup, pbroadcast2
- */
-template EIGEN_DEVICE_FUNC
-inline void pbroadcast4(const typename unpacket_traits::type *a,
- Packet& a0, Packet& a1, Packet& a2, Packet& a3)
-{
- a0 = pload1(a+0);
- a1 = pload1(a+1);
- a2 = pload1(a+2);
- a3 = pload1(a+3);
-}
-
-/** \internal equivalent to
- * \code
- * a0 = pload1(a+0);
- * a1 = pload1(a+1);
- * \endcode
- * \sa pset1, pload1, ploaddup, pbroadcast4
- */
-template EIGEN_DEVICE_FUNC
-inline void pbroadcast2(const typename unpacket_traits::type *a,
- Packet& a0, Packet& a1)
-{
- a0 = pload1(a+0);
- a1 = pload1(a+1);
-}
-
-/** \internal \brief Returns a packet with coefficients (a,a+1,...,a+packet_size-1). */
-template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet
-plset(const typename unpacket_traits::type& a) { return a; }
-
-/** \internal copy the packet \a from to \a *to, \a to must be 16 bytes aligned */
-template EIGEN_DEVICE_FUNC inline void pstore(Scalar* to, const Packet& from)
-{ (*to) = from; }
-
-/** \internal copy the packet \a from to \a *to, (un-aligned store) */
-template EIGEN_DEVICE_FUNC inline void pstoreu(Scalar* to, const Packet& from)
-{ (*to) = from; }
-
- template EIGEN_DEVICE_FUNC inline Packet pgather(const Scalar* from, Index /*stride*/)
- { return ploadu(from); }
-
- template EIGEN_DEVICE_FUNC inline void pscatter(Scalar* to, const Packet& from, Index /*stride*/)
- { pstore(to, from); }
-
-/** \internal tries to do cache prefetching of \a addr */
-template EIGEN_DEVICE_FUNC inline void prefetch(const Scalar* addr)
-{
-#ifdef __CUDA_ARCH__
-#if defined(__LP64__)
- // 64-bit pointer operand constraint for inlined asm
- asm(" prefetch.L1 [ %1 ];" : "=l"(addr) : "l"(addr));
-#else
- // 32-bit pointer operand constraint for inlined asm
- asm(" prefetch.L1 [ %1 ];" : "=r"(addr) : "r"(addr));
-#endif
-#elif (!EIGEN_COMP_MSVC) && (EIGEN_COMP_GNUC || EIGEN_COMP_CLANG || EIGEN_COMP_ICC)
- __builtin_prefetch(addr);
-#endif
-}
-
-/** \internal \returns the first element of a packet */
-template EIGEN_DEVICE_FUNC inline typename unpacket_traits::type pfirst(const Packet& a)
-{ return a; }
-
-/** \internal \returns a packet where the element i contains the sum of the packet of \a vec[i] */
-template EIGEN_DEVICE_FUNC inline Packet
-preduxp(const Packet* vecs) { return vecs[0]; }
-
-/** \internal \returns the sum of the elements of \a a*/
-template EIGEN_DEVICE_FUNC inline typename unpacket_traits::type predux(const Packet& a)
-{ return a; }
-
-/** \internal \returns the sum of the elements of \a a by block of 4 elements.
- * For a packet {a0, a1, a2, a3, a4, a5, a6, a7}, it returns a half packet {a0+a4, a1+a5, a2+a6, a3+a7}
- * For packet-size smaller or equal to 4, this boils down to a noop.
- */
-template EIGEN_DEVICE_FUNC inline
-typename conditional<(unpacket_traits::size%8)==0,typename unpacket_traits::half,Packet>::type
-predux_downto4(const Packet& a)
-{ return a; }
-
-/** \internal \returns the product of the elements of \a a*/
-template EIGEN_DEVICE_FUNC inline typename unpacket_traits::type predux_mul(const Packet& a)
-{ return a; }
-
-/** \internal \returns the min of the elements of \a a*/
-template EIGEN_DEVICE_FUNC inline typename unpacket_traits::type predux_min(const Packet& a)
-{ return a; }
-
-/** \internal \returns the max of the elements of \a a*/
-template EIGEN_DEVICE_FUNC inline typename unpacket_traits::type predux_max(const Packet& a)
-{ return a; }
-
-/** \internal \returns the reversed elements of \a a*/
-template EIGEN_DEVICE_FUNC inline Packet preverse(const Packet& a)
-{ return a; }
-
-/** \internal \returns \a a with real and imaginary part flipped (for complex type only) */
-template EIGEN_DEVICE_FUNC inline Packet pcplxflip(const Packet& a)
-{
- return Packet(a.imag(),a.real());
-}
-
-/**************************
-* Special math functions
-***************************/
-
-/** \internal \returns the sine of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet psin(const Packet& a) { using std::sin; return sin(a); }
-
-/** \internal \returns the cosine of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet pcos(const Packet& a) { using std::cos; return cos(a); }
-
-/** \internal \returns the tan of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet ptan(const Packet& a) { using std::tan; return tan(a); }
-
-/** \internal \returns the arc sine of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet pasin(const Packet& a) { using std::asin; return asin(a); }
-
-/** \internal \returns the arc cosine of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet pacos(const Packet& a) { using std::acos; return acos(a); }
-
-/** \internal \returns the arc tangent of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet patan(const Packet& a) { using std::atan; return atan(a); }
-
-/** \internal \returns the hyperbolic sine of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet psinh(const Packet& a) { using std::sinh; return sinh(a); }
-
-/** \internal \returns the hyperbolic cosine of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet pcosh(const Packet& a) { using std::cosh; return cosh(a); }
-
-/** \internal \returns the hyperbolic tan of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet ptanh(const Packet& a) { using std::tanh; return tanh(a); }
-
-/** \internal \returns the exp of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet pexp(const Packet& a) { using std::exp; return exp(a); }
-
-/** \internal \returns the log of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet plog(const Packet& a) { using std::log; return log(a); }
-
-/** \internal \returns the log1p of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet plog1p(const Packet& a) { return numext::log1p(a); }
-
-/** \internal \returns the log10 of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet plog10(const Packet& a) { using std::log10; return log10(a); }
-
-/** \internal \returns the square-root of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet psqrt(const Packet& a) { using std::sqrt; return sqrt(a); }
-
-/** \internal \returns the reciprocal square-root of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet prsqrt(const Packet& a) {
- return pdiv(pset1(1), psqrt(a));
-}
-
-/** \internal \returns the rounded value of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet pround(const Packet& a) { using numext::round; return round(a); }
-
-/** \internal \returns the floor of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet pfloor(const Packet& a) { using numext::floor; return floor(a); }
-
-/** \internal \returns the ceil of \a a (coeff-wise) */
-template EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
-Packet pceil(const Packet& a) { using numext::ceil; return ceil(a); }
-
-/***************************************************************************
-* The following functions might not have to be overwritten for vectorized types
-***************************************************************************/
-
-/** \internal copy a packet with constant coeficient \a a (e.g., [a,a,a,a]) to \a *to. \a to must be 16 bytes aligned */
-// NOTE: this function must really be templated on the packet type (think about different packet types for the same scalar type)
-template
-inline void pstore1(typename unpacket_traits::type* to, const typename unpacket_traits::type& a)
-{
- pstore(to, pset1(a));
-}
-
-/** \internal \returns a * b + c (coeff-wise) */
-template EIGEN_DEVICE_FUNC inline Packet
-pmadd(const Packet& a,
- const Packet& b,
- const Packet& c)
-{ return padd(pmul(a, b),c); }
-
-/** \internal \returns a packet version of \a *from.
- * The pointer \a from must be aligned on a \a Alignment bytes boundary. */
-template
-EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet ploadt(const typename unpacket_traits::type* from)
-{
- if(Alignment >= unpacket_traits::alignment)
- return pload(from);
- else
- return ploadu(from);
-}
-
-/** \internal copy the packet \a from to \a *to.
- * The pointer \a from must be aligned on a \a Alignment bytes boundary. */
-template
-EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void pstoret(Scalar* to, const Packet& from)
-{
- if(Alignment >= unpacket_traits::alignment)
- pstore(to, from);
- else
- pstoreu(to, from);
-}
-
-/** \internal \returns a packet version of \a *from.
- * Unlike ploadt, ploadt_ro takes advantage of the read-only memory path on the
- * hardware if available to speedup the loading of data that won't be modified
- * by the current computation.
- */
-template
-EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Packet ploadt_ro(const typename unpacket_traits::type* from)
-{
- return ploadt(from);
-}
-
-/** \internal default implementation of palign() allowing partial specialization */
-template
-struct palign_impl
-{
- // by default data are aligned, so there is nothing to be done :)
- static inline void run(PacketType&, const PacketType&) {}
-};
-
-/** \internal update \a first using the concatenation of the packet_size minus \a Offset last elements
- * of \a first and \a Offset first elements of \a second.
- *
- * This function is currently only used to optimize matrix-vector products on unligned matrices.
- * It takes 2 packets that represent a contiguous memory array, and returns a packet starting
- * at the position \a Offset. For instance, for packets of 4 elements, we have:
- * Input:
- * - first = {f0,f1,f2,f3}
- * - second = {s0,s1,s2,s3}
- * Output:
- * - if Offset==0 then {f0,f1,f2,f3}
- * - if Offset==1 then {f1,f2,f3,s0}
- * - if Offset==2 then {f2,f3,s0,s1}
- * - if Offset==3 then {f3,s0,s1,s3}
- */
-template
-inline void palign(PacketType& first, const PacketType& second)
-{
- palign_impl::run(first,second);
-}
-
-/***************************************************************************
-* Fast complex products (GCC generates a function call which is very slow)
-***************************************************************************/
-
-// Eigen+CUDA does not support complexes.
-#ifndef __CUDACC__
-
-template<> inline std::complex pmul(const std::complex& a, const std::complex& b)
-{ return std::complex(a.real()*b.real() - a.imag()*b.imag(), a.imag()*b.real() + a.real()*b.imag()); }
-
-template<> inline std::complex pmul(const std::complex& a, const std::complex& b)
-{ return std::complex(a.real()*b.real() - a.imag()*b.imag(), a.imag()*b.real() + a.real()*b.imag()); }
-
-#endif
-
-
-/***************************************************************************
- * PacketBlock, that is a collection of N packets where the number of words
- * in the packet is a multiple of N.
-***************************************************************************/
-template ::size> struct PacketBlock {
- Packet packet[N];
-};
-
-template EIGEN_DEVICE_FUNC inline void
-ptranspose(PacketBlock& /*kernel*/) {
- // Nothing to do in the scalar case, i.e. a 1x1 matrix.
-}
-
-/***************************************************************************
- * Selector, i.e. vector of N boolean values used to select (i.e. blend)
- * words from 2 packets.
-***************************************************************************/
-template struct Selector {
- bool select[N];
-};
-
-template EIGEN_DEVICE_FUNC inline Packet
-pblend(const Selector::size>& ifPacket, const Packet& thenPacket, const Packet& elsePacket) {
- return ifPacket.select[0] ? thenPacket : elsePacket;
-}
-
-/** \internal \returns \a a with the first coefficient replaced by the scalar b */
-template EIGEN_DEVICE_FUNC inline Packet
-pinsertfirst(const Packet& a, typename unpacket_traits::type b)
-{
- // Default implementation based on pblend.
- // It must be specialized for higher performance.
- Selector::size> mask;
- mask.select[0] = true;
- // This for loop should be optimized away by the compiler.
- for(Index i=1; i::size; ++i)
- mask.select[i] = false;
- return pblend(mask, pset1(b), a);
-}
-
-/** \internal \returns \a a with the last coefficient replaced by the scalar b */
-template EIGEN_DEVICE_FUNC inline Packet
-pinsertlast(const Packet& a, typename unpacket_traits::type b)
-{
- // Default implementation based on pblend.
- // It must be specialized for higher performance.
- Selector::size> mask;
- // This for loop should be optimized away by the compiler.
- for(Index i=0; i::size-1; ++i)
- mask.select[i] = false;
- mask.select[unpacket_traits::size-1] = true;
- return pblend(mask, pset1(b), a);
-}
-
-} // end namespace internal
-
-} // end namespace Eigen
-
-#endif // EIGEN_GENERIC_PACKET_MATH_H
diff --git a/lib/eigen_3.3.9/Eigen/src/Core/MathFunctionsImpl.h b/lib/eigen_3.3.9/Eigen/src/Core/MathFunctionsImpl.h
deleted file mode 100644
index 9c1ceb0eb0f..00000000000
--- a/lib/eigen_3.3.9/Eigen/src/Core/MathFunctionsImpl.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2014 Pedro Gonnet (pedro.gonnet@gmail.com)
-// Copyright (C) 2016 Gael Guennebaud
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_MATHFUNCTIONSIMPL_H
-#define EIGEN_MATHFUNCTIONSIMPL_H
-
-namespace Eigen {
-
-namespace internal {
-
-/** \internal \returns the hyperbolic tan of \a a (coeff-wise)
- Doesn't do anything fancy, just a 13/6-degree rational interpolant which
- is accurate up to a couple of ulp in the range [-9, 9], outside of which
- the tanh(x) = +/-1.
-
- This implementation works on both scalars and packets.
-*/
-template
-T generic_fast_tanh_float(const T& a_x)
-{
- // Clamp the inputs to the range [-9, 9] since anything outside
- // this range is +/-1.0f in single-precision.
- const T plus_9 = pset1(9.f);
- const T minus_9 = pset1(-9.f);
- // NOTE GCC prior to 6.3 might improperly optimize this max/min
- // step such that if a_x is nan, x will be either 9 or -9,
- // and tanh will return 1 or -1 instead of nan.
- // This is supposed to be fixed in gcc6.3,
- // see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72867
- const T x = pmax(minus_9,pmin(plus_9,a_x));
- // The monomial coefficients of the numerator polynomial (odd).
- const T alpha_1 = pset1(4.89352455891786e-03f);
- const T alpha_3 = pset1(6.37261928875436e-04f);
- const T alpha_5 = pset1(1.48572235717979e-05f);
- const T alpha_7 = pset1(5.12229709037114e-08f);
- const T alpha_9 = pset1(-8.60467152213735e-11f);
- const T alpha_11 = pset1(2.00018790482477e-13f);
- const T alpha_13 = pset1(-2.76076847742355e-16f);
-
- // The monomial coefficients of the denominator polynomial (even).
- const T beta_0 = pset1(4.89352518554385e-03f);
- const T beta_2 = pset1(2.26843463243900e-03f);
- const T beta_4 = pset1(1.18534705686654e-04f);
- const T beta_6 = pset1(1.19825839466702e-06f);
-
- // Since the polynomials are odd/even, we need x^2.
- const T x2 = pmul(x, x);
-
- // Evaluate the numerator polynomial p.
- T p = pmadd(x2, alpha_13, alpha_11);
- p = pmadd(x2, p, alpha_9);
- p = pmadd(x2, p, alpha_7);
- p = pmadd(x2, p, alpha_5);
- p = pmadd(x2, p, alpha_3);
- p = pmadd(x2, p, alpha_1);
- p = pmul(x, p);
-
- // Evaluate the denominator polynomial p.
- T q = pmadd(x2, beta_6, beta_4);
- q = pmadd(x2, q, beta_2);
- q = pmadd(x2, q, beta_0);
-
- // Divide the numerator by the denominator.
- return pdiv(p, q);
-}
-
-template
-EIGEN_STRONG_INLINE
-RealScalar positive_real_hypot(const RealScalar& x, const RealScalar& y)
-{
- EIGEN_USING_STD_MATH(sqrt);
- RealScalar p, qp;
- p = numext::maxi(x,y);
- if(p==RealScalar(0)) return RealScalar(0);
- qp = numext::mini(y,x) / p;
- return p * sqrt(RealScalar(1) + qp*qp);
-}
-
-template
-struct hypot_impl
-{
- typedef typename NumTraits::Real RealScalar;
- static inline RealScalar run(const Scalar& x, const Scalar& y)
- {
- EIGEN_USING_STD_MATH(abs);
- return positive_real_hypot(abs(x), abs(y));
- }
-};
-
-} // end namespace internal
-
-} // end namespace Eigen
-
-#endif // EIGEN_MATHFUNCTIONSIMPL_H
diff --git a/lib/eigen_3.3.9/Eigen/src/Core/Redux.h b/lib/eigen_3.3.9/Eigen/src/Core/Redux.h
deleted file mode 100644
index 760e9f86154..00000000000
--- a/lib/eigen_3.3.9/Eigen/src/Core/Redux.h
+++ /dev/null
@@ -1,505 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2008 Gael Guennebaud
-// Copyright (C) 2006-2008 Benoit Jacob
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_REDUX_H
-#define EIGEN_REDUX_H
-
-namespace Eigen {
-
-namespace internal {
-
-// TODO
-// * implement other kind of vectorization
-// * factorize code
-
-/***************************************************************************
-* Part 1 : the logic deciding a strategy for vectorization and unrolling
-***************************************************************************/
-
-template
-struct redux_traits
-{
-public:
- typedef typename find_best_packet::type PacketType;
- enum {
- PacketSize = unpacket_traits::size,
- InnerMaxSize = int(Derived::IsRowMajor)
- ? Derived::MaxColsAtCompileTime
- : Derived::MaxRowsAtCompileTime
- };
-
- enum {
- MightVectorize = (int(Derived::Flags)&ActualPacketAccessBit)
- && (functor_traits::PacketAccess),
- MayLinearVectorize = bool(MightVectorize) && (int(Derived::Flags)&LinearAccessBit),
- MaySliceVectorize = bool(MightVectorize) && int(InnerMaxSize)>=3*PacketSize
- };
-
-public:
- enum {
- Traversal = int(MayLinearVectorize) ? int(LinearVectorizedTraversal)
- : int(MaySliceVectorize) ? int(SliceVectorizedTraversal)
- : int(DefaultTraversal)
- };
-
-public:
- enum {
- Cost = Derived::SizeAtCompileTime == Dynamic ? HugeCost
- : Derived::SizeAtCompileTime * Derived::CoeffReadCost + (Derived::SizeAtCompileTime-1) * functor_traits::Cost,
- UnrollingLimit = EIGEN_UNROLLING_LIMIT * (int(Traversal) == int(DefaultTraversal) ? 1 : int(PacketSize))
- };
-
-public:
- enum {
- Unrolling = Cost <= UnrollingLimit ? CompleteUnrolling : NoUnrolling
- };
-
-#ifdef EIGEN_DEBUG_ASSIGN
- static void debug()
- {
- std::cerr << "Xpr: " << typeid(typename Derived::XprType).name() << std::endl;
- std::cerr.setf(std::ios::hex, std::ios::basefield);
- EIGEN_DEBUG_VAR(Derived::Flags)
- std::cerr.unsetf(std::ios::hex);
- EIGEN_DEBUG_VAR(InnerMaxSize)
- EIGEN_DEBUG_VAR(PacketSize)
- EIGEN_DEBUG_VAR(MightVectorize)
- EIGEN_DEBUG_VAR(MayLinearVectorize)
- EIGEN_DEBUG_VAR(MaySliceVectorize)
- EIGEN_DEBUG_VAR(Traversal)
- EIGEN_DEBUG_VAR(UnrollingLimit)
- EIGEN_DEBUG_VAR(Unrolling)
- std::cerr << std::endl;
- }
-#endif
-};
-
-/***************************************************************************
-* Part 2 : unrollers
-***************************************************************************/
-
-/*** no vectorization ***/
-
-template
-struct redux_novec_unroller
-{
- enum {
- HalfLength = Length/2
- };
-
- typedef typename Derived::Scalar Scalar;
-
- EIGEN_DEVICE_FUNC
- static EIGEN_STRONG_INLINE Scalar run(const Derived &mat, const Func& func)
- {
- return func(redux_novec_unroller::run(mat,func),
- redux_novec_unroller::run(mat,func));
- }
-};
-
-template
-struct redux_novec_unroller
-{
- enum {
- outer = Start / Derived::InnerSizeAtCompileTime,
- inner = Start % Derived::InnerSizeAtCompileTime
- };
-
- typedef typename Derived::Scalar Scalar;
-
- EIGEN_DEVICE_FUNC
- static EIGEN_STRONG_INLINE Scalar run(const Derived &mat, const Func&)
- {
- return mat.coeffByOuterInner(outer, inner);
- }
-};
-
-// This is actually dead code and will never be called. It is required
-// to prevent false warnings regarding failed inlining though
-// for 0 length run() will never be called at all.
-template
-struct redux_novec_unroller
-{
- typedef typename Derived::Scalar Scalar;
- EIGEN_DEVICE_FUNC
- static EIGEN_STRONG_INLINE Scalar run(const Derived&, const Func&) { return Scalar(); }
-};
-
-/*** vectorization ***/
-
-template
-struct redux_vec_unroller
-{
- enum {
- PacketSize = redux_traits::PacketSize,
- HalfLength = Length/2
- };
-
- typedef typename Derived::Scalar Scalar;
- typedef typename redux_traits::PacketType PacketScalar;
-
- static EIGEN_STRONG_INLINE PacketScalar run(const Derived &mat, const Func& func)
- {
- return func.packetOp(
- redux_vec_unroller::run(mat,func),
- redux_vec_unroller::run(mat,func) );
- }
-};
-
-template
-struct redux_vec_unroller
-{
- enum {
- index = Start * redux_traits::PacketSize,
- outer = index / int(Derived::InnerSizeAtCompileTime),
- inner = index % int(Derived::InnerSizeAtCompileTime),
- alignment = Derived::Alignment
- };
-
- typedef typename Derived::Scalar Scalar;
- typedef typename redux_traits::PacketType PacketScalar;
-
- static EIGEN_STRONG_INLINE PacketScalar run(const Derived &mat, const Func&)
- {
- return mat.template packetByOuterInner(outer, inner);
- }
-};
-
-/***************************************************************************
-* Part 3 : implementation of all cases
-***************************************************************************/
-
-template::Traversal,
- int Unrolling = redux_traits::Unrolling
->
-struct redux_impl;
-
-template
-struct redux_impl
-{
- typedef typename Derived::Scalar Scalar;
- EIGEN_DEVICE_FUNC
- static EIGEN_STRONG_INLINE Scalar run(const Derived &mat, const Func& func)
- {
- eigen_assert(mat.rows()>0 && mat.cols()>0 && "you are using an empty matrix");
- Scalar res;
- res = mat.coeffByOuterInner(0, 0);
- for(Index i = 1; i < mat.innerSize(); ++i)
- res = func(res, mat.coeffByOuterInner(0, i));
- for(Index i = 1; i < mat.outerSize(); ++i)
- for(Index j = 0; j < mat.innerSize(); ++j)
- res = func(res, mat.coeffByOuterInner(i, j));
- return res;
- }
-};
-
-template
-struct redux_impl
- : public redux_novec_unroller
-{};
-
-template
-struct redux_impl
-{
- typedef typename Derived::Scalar Scalar;
- typedef typename redux_traits::PacketType PacketScalar;
-
- static Scalar run(const Derived &mat, const Func& func)
- {
- const Index size = mat.size();
-
- const Index packetSize = redux_traits::PacketSize;
- const int packetAlignment = unpacket_traits::alignment;
- enum {
- alignment0 = (bool(Derived::Flags & DirectAccessBit) && bool(packet_traits::AlignedOnScalar)) ? int(packetAlignment) : int(Unaligned),
- alignment = EIGEN_PLAIN_ENUM_MAX(alignment0, Derived::Alignment)
- };
- const Index alignedStart = internal::first_default_aligned(mat.nestedExpression());
- const Index alignedSize2 = ((size-alignedStart)/(2*packetSize))*(2*packetSize);
- const Index alignedSize = ((size-alignedStart)/(packetSize))*(packetSize);
- const Index alignedEnd2 = alignedStart + alignedSize2;
- const Index alignedEnd = alignedStart + alignedSize;
- Scalar res;
- if(alignedSize)
- {
- PacketScalar packet_res0 = mat.template packet(alignedStart);
- if(alignedSize>packetSize) // we have at least two packets to partly unroll the loop
- {
- PacketScalar packet_res1 = mat.template packet(alignedStart+packetSize);
- for(Index index = alignedStart + 2*packetSize; index < alignedEnd2; index += 2*packetSize)
- {
- packet_res0 = func.packetOp(packet_res0, mat.template packet(index));
- packet_res1 = func.packetOp(packet_res1, mat.template packet(index+packetSize));
- }
-
- packet_res0 = func.packetOp(packet_res0,packet_res1);
- if(alignedEnd>alignedEnd2)
- packet_res0 = func.packetOp(packet_res0, mat.template packet(alignedEnd2));
- }
- res = func.predux(packet_res0);
-
- for(Index index = 0; index < alignedStart; ++index)
- res = func(res,mat.coeff(index));
-
- for(Index index = alignedEnd; index < size; ++index)
- res = func(res,mat.coeff(index));
- }
- else // too small to vectorize anything.
- // since this is dynamic-size hence inefficient anyway for such small sizes, don't try to optimize.
- {
- res = mat.coeff(0);
- for(Index index = 1; index < size; ++index)
- res = func(res,mat.coeff(index));
- }
-
- return res;
- }
-};
-
-// NOTE: for SliceVectorizedTraversal we simply bypass unrolling
-template
-struct redux_impl
-{
- typedef typename Derived::Scalar Scalar;
- typedef typename redux_traits::PacketType PacketType;
-
- EIGEN_DEVICE_FUNC static Scalar run(const Derived &mat, const Func& func)
- {
- eigen_assert(mat.rows()>0 && mat.cols()>0 && "you are using an empty matrix");
- const Index innerSize = mat.innerSize();
- const Index outerSize = mat.outerSize();
- enum {
- packetSize = redux_traits::PacketSize
- };
- const Index packetedInnerSize = ((innerSize)/packetSize)*packetSize;
- Scalar res;
- if(packetedInnerSize)
- {
- PacketType packet_res = mat.template packet(0,0);
- for(Index j=0; j(j,i));
-
- res = func.predux(packet_res);
- for(Index j=0; j::run(mat, func);
- }
-
- return res;
- }
-};
-
-template
-struct redux_impl
-{
- typedef typename Derived::Scalar Scalar;
-
- typedef typename redux_traits::PacketType PacketScalar;
- enum {
- PacketSize = redux_traits::PacketSize,
- Size = Derived::SizeAtCompileTime,
- VectorizedSize = (Size / PacketSize) * PacketSize
- };
- EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Scalar run(const Derived &mat, const Func& func)
- {
- eigen_assert(mat.rows()>0 && mat.cols()>0 && "you are using an empty matrix");
- if (VectorizedSize > 0) {
- Scalar res = func.predux(redux_vec_unroller::run(mat,func));
- if (VectorizedSize != Size)
- res = func(res,redux_novec_unroller::run(mat,func));
- return res;
- }
- else {
- return redux_novec_unroller::run(mat,func);
- }
- }
-};
-
-// evaluator adaptor
-template
-class redux_evaluator
-{
-public:
- typedef _XprType XprType;
- EIGEN_DEVICE_FUNC explicit redux_evaluator(const XprType &xpr) : m_evaluator(xpr), m_xpr(xpr) {}
-
- typedef typename XprType::Scalar Scalar;
- typedef typename XprType::CoeffReturnType CoeffReturnType;
- typedef typename XprType::PacketScalar PacketScalar;
- typedef typename XprType::PacketReturnType PacketReturnType;
-
- enum {
- MaxRowsAtCompileTime = XprType::MaxRowsAtCompileTime,
- MaxColsAtCompileTime = XprType::MaxColsAtCompileTime,
- // TODO we should not remove DirectAccessBit and rather find an elegant way to query the alignment offset at runtime from the evaluator
- Flags = evaluator::Flags & ~DirectAccessBit,
- IsRowMajor = XprType::IsRowMajor,
- SizeAtCompileTime = XprType::SizeAtCompileTime,
- InnerSizeAtCompileTime = XprType::InnerSizeAtCompileTime,
- CoeffReadCost = evaluator::CoeffReadCost,
- Alignment = evaluator::Alignment
- };
-
- EIGEN_DEVICE_FUNC Index rows() const { return m_xpr.rows(); }
- EIGEN_DEVICE_FUNC Index cols() const { return m_xpr.cols(); }
- EIGEN_DEVICE_FUNC Index size() const { return m_xpr.size(); }
- EIGEN_DEVICE_FUNC Index innerSize() const { return m_xpr.innerSize(); }
- EIGEN_DEVICE_FUNC Index outerSize() const { return m_xpr.outerSize(); }
-
- EIGEN_DEVICE_FUNC
- CoeffReturnType coeff(Index row, Index col) const
- { return m_evaluator.coeff(row, col); }
-
- EIGEN_DEVICE_FUNC
- CoeffReturnType coeff(Index index) const
- { return m_evaluator.coeff(index); }
-
- template
- PacketType packet(Index row, Index col) const
- { return m_evaluator.template packet(row, col); }
-
- template
- PacketType packet(Index index) const
- { return m_evaluator.template packet(index); }
-
- EIGEN_DEVICE_FUNC
- CoeffReturnType coeffByOuterInner(Index outer, Index inner) const
- { return m_evaluator.coeff(IsRowMajor ? outer : inner, IsRowMajor ? inner : outer); }
-
- template
- PacketType packetByOuterInner(Index outer, Index inner) const
- { return m_evaluator.template packet(IsRowMajor ? outer : inner, IsRowMajor ? inner : outer); }
-
- const XprType & nestedExpression() const { return m_xpr; }
-
-protected:
- internal::evaluator m_evaluator;
- const XprType &m_xpr;
-};
-
-} // end namespace internal
-
-/***************************************************************************
-* Part 4 : public API
-***************************************************************************/
-
-
-/** \returns the result of a full redux operation on the whole matrix or vector using \a func
- *
- * The template parameter \a BinaryOp is the type of the functor \a func which must be
- * an associative operator. Both current C++98 and C++11 functor styles are handled.
- *
- * \sa DenseBase::sum(), DenseBase::minCoeff(), DenseBase::maxCoeff(), MatrixBase::colwise(), MatrixBase::rowwise()
- */
-template
-template
-EIGEN_STRONG_INLINE typename internal::traits::Scalar
-DenseBase::redux(const Func& func) const
-{
- eigen_assert(this->rows()>0 && this->cols()>0 && "you are using an empty matrix");
-
- typedef typename internal::redux_evaluator ThisEvaluator;
- ThisEvaluator thisEval(derived());
-
- return internal::redux_impl::run(thisEval, func);
-}
-
-/** \returns the minimum of all coefficients of \c *this.
- * \warning the result is undefined if \c *this contains NaN.
- */
-template
-EIGEN_STRONG_INLINE typename internal::traits::Scalar
-DenseBase::minCoeff() const
-{
- return derived().redux(Eigen::internal::scalar_min_op());
-}
-
-/** \returns the maximum of all coefficients of \c *this.
- * \warning the result is undefined if \c *this contains NaN.
- */
-template
-EIGEN_STRONG_INLINE typename internal::traits::Scalar
-DenseBase::maxCoeff() const
-{
- return derived().redux(Eigen::internal::scalar_max_op());
-}
-
-/** \returns the sum of all coefficients of \c *this
- *
- * If \c *this is empty, then the value 0 is returned.
- *
- * \sa trace(), prod(), mean()
- */
-template
-EIGEN_STRONG_INLINE typename internal::traits::Scalar
-DenseBase::sum() const
-{
- if(SizeAtCompileTime==0 || (SizeAtCompileTime==Dynamic && size()==0))
- return Scalar(0);
- return derived().redux(Eigen::internal::scalar_sum_op());
-}
-
-/** \returns the mean of all coefficients of *this
-*
-* \sa trace(), prod(), sum()
-*/
-template
-EIGEN_STRONG_INLINE typename internal::traits::Scalar
-DenseBase::mean() const
-{
-#ifdef __INTEL_COMPILER
- #pragma warning push
- #pragma warning ( disable : 2259 )
-#endif
- return Scalar(derived().redux(Eigen::internal::scalar_sum_op())) / Scalar(this->size());
-#ifdef __INTEL_COMPILER
- #pragma warning pop
-#endif
-}
-
-/** \returns the product of all coefficients of *this
- *
- * Example: \include MatrixBase_prod.cpp
- * Output: \verbinclude MatrixBase_prod.out
- *
- * \sa sum(), mean(), trace()
- */
-template
-EIGEN_STRONG_INLINE typename internal::traits::Scalar
-DenseBase::prod() const
-{
- if(SizeAtCompileTime==0 || (SizeAtCompileTime==Dynamic && size()==0))
- return Scalar(1);
- return derived().redux(Eigen::internal::scalar_product_op());
-}
-
-/** \returns the trace of \c *this, i.e. the sum of the coefficients on the main diagonal.
- *
- * \c *this can be any matrix, not necessarily square.
- *
- * \sa diagonal(), sum()
- */
-template
-EIGEN_STRONG_INLINE typename internal::traits::Scalar
-MatrixBase::trace() const
-{
- return derived().diagonal().sum();
-}
-
-} // end namespace Eigen
-
-#endif // EIGEN_REDUX_H
diff --git a/lib/eigen_3.3.9/Eigen/src/Core/arch/AVX/MathFunctions.h b/lib/eigen_3.3.9/Eigen/src/Core/arch/AVX/MathFunctions.h
deleted file mode 100644
index 6af67ce2d65..00000000000
--- a/lib/eigen_3.3.9/Eigen/src/Core/arch/AVX/MathFunctions.h
+++ /dev/null
@@ -1,439 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra.
-//
-// Copyright (C) 2014 Pedro Gonnet (pedro.gonnet@gmail.com)
-//
-// This Source Code Form is subject to the terms of the Mozilla
-// Public License v. 2.0. If a copy of the MPL was not distributed
-// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef EIGEN_MATH_FUNCTIONS_AVX_H
-#define EIGEN_MATH_FUNCTIONS_AVX_H
-
-/* The sin, cos, exp, and log functions of this file are loosely derived from
- * Julien Pommier's sse math library: http://gruntthepeon.free.fr/ssemath/
- */
-
-namespace Eigen {
-
-namespace internal {
-
-inline Packet8i pshiftleft(Packet8i v, int n)
-{
-#ifdef EIGEN_VECTORIZE_AVX2
- return _mm256_slli_epi32(v, n);
-#else
- __m128i lo = _mm_slli_epi32(_mm256_extractf128_si256(v, 0), n);
- __m128i hi = _mm_slli_epi32(_mm256_extractf128_si256(v, 1), n);
- return _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1);
-#endif
-}
-
-inline Packet8f pshiftright(Packet8f v, int n)
-{
-#ifdef EIGEN_VECTORIZE_AVX2
- return _mm256_cvtepi32_ps(_mm256_srli_epi32(_mm256_castps_si256(v), n));
-#else
- __m128i lo = _mm_srli_epi32(_mm256_extractf128_si256(_mm256_castps_si256(v), 0), n);
- __m128i hi = _mm_srli_epi32(_mm256_extractf128_si256(_mm256_castps_si256(v), 1), n);
- return _mm256_cvtepi32_ps(_mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1));
-#endif
-}
-
-// Sine function
-// Computes sin(x) by wrapping x to the interval [-Pi/4,3*Pi/4] and
-// evaluating interpolants in [-Pi/4,Pi/4] or [Pi/4,3*Pi/4]. The interpolants
-// are (anti-)symmetric and thus have only odd/even coefficients
-template <>
-EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet8f
-psin