This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 397 | Differences between
and this patch

Collapse All | Expand All

(-)a/Eigen/src/Core/Assign.h (-2 / +4 lines)
Lines 218-224 Link Here
218
template<typename Derived1, typename Derived2, int Index, int Stop>
218
template<typename Derived1, typename Derived2, int Index, int Stop>
219
struct assign_innervec_InnerUnrolling
219
struct assign_innervec_InnerUnrolling
220
{
220
{
221
  static EIGEN_STRONG_INLINE void run(Derived1 &dst, const Derived2 &src, int outer)
221
  typedef typename Derived1::Index IndexType;
222
  static EIGEN_STRONG_INLINE void run(Derived1 &dst, const Derived2 &src, IndexType outer)
222
  {
223
  {
223
    dst.template copyPacketByOuterInner<Derived2, Aligned, Aligned>(outer, Index, src);
224
    dst.template copyPacketByOuterInner<Derived2, Aligned, Aligned>(outer, Index, src);
224
    assign_innervec_InnerUnrolling<Derived1, Derived2,
225
    assign_innervec_InnerUnrolling<Derived1, Derived2,
Lines 229-235 Link Here
229
template<typename Derived1, typename Derived2, int Stop>
230
template<typename Derived1, typename Derived2, int Stop>
230
struct assign_innervec_InnerUnrolling<Derived1, Derived2, Stop, Stop>
231
struct assign_innervec_InnerUnrolling<Derived1, Derived2, Stop, Stop>
231
{
232
{
232
  static EIGEN_STRONG_INLINE void run(Derived1 &, const Derived2 &, int) {}
233
  typedef typename Derived1::Index IndexType;
234
  static EIGEN_STRONG_INLINE void run(Derived1 &, const Derived2 &, IndexType) {}
233
};
235
};
234
236
235
/***************************************************************************
237
/***************************************************************************
(-)a/Eigen/src/Core/PermutationMatrix.h (-9 / +9 lines)
Lines 295-301 Link Here
295
295
296
    /** Constructs an uninitialized permutation matrix of given size.
296
    /** Constructs an uninitialized permutation matrix of given size.
297
      */
297
      */
298
    inline PermutationMatrix(int size) : m_indices(size)
298
    inline PermutationMatrix(IndexType size) : m_indices(size)
299
    {}
299
    {}
300
300
301
    /** Copy constructor. */
301
    /** Copy constructor. */
Lines 541-557 Link Here
541
 : public ReturnByValue<permut_matrix_product_retval<PermutationType, MatrixType, Side, Transposed> >
541
 : public ReturnByValue<permut_matrix_product_retval<PermutationType, MatrixType, Side, Transposed> >
542
{
542
{
543
    typedef typename remove_all<typename MatrixType::Nested>::type MatrixTypeNestedCleaned;
543
    typedef typename remove_all<typename MatrixType::Nested>::type MatrixTypeNestedCleaned;
544
544
	typedef typename internal::traits<MatrixType>::Index Index;
545
    permut_matrix_product_retval(const PermutationType& perm, const MatrixType& matrix)
545
    permut_matrix_product_retval(const PermutationType& perm, const MatrixType& matrix)
546
      : m_permutation(perm), m_matrix(matrix)
546
      : m_permutation(perm), m_matrix(matrix)
547
    {}
547
    {}
548
548
549
    inline int rows() const { return m_matrix.rows(); }
549
    inline Index rows() const { return m_matrix.rows(); }
550
    inline int cols() const { return m_matrix.cols(); }
550
    inline Index cols() const { return m_matrix.cols(); }
551
551
552
    template<typename Dest> inline void evalTo(Dest& dst) const
552
    template<typename Dest> inline void evalTo(Dest& dst) const
553
    {
553
    {
554
      const int n = Side==OnTheLeft ? rows() : cols();
554
      const Index n = Side==OnTheLeft ? rows() : cols();
555
555
556
      if(is_same<MatrixTypeNestedCleaned,Dest>::value && extract_data(dst) == extract_data(m_matrix))
556
      if(is_same<MatrixTypeNestedCleaned,Dest>::value && extract_data(dst) == extract_data(m_matrix))
557
      {
557
      {
Lines 566-575 Link Here
566
          if(r>=m_permutation.size())
566
          if(r>=m_permutation.size())
567
            break;
567
            break;
568
          // we got one, let's follow it until we are back to the seed
568
          // we got one, let's follow it until we are back to the seed
569
          int k0 = r++;
569
          Index k0 = r++;
570
          int kPrev = k0;
570
          Index kPrev = k0;
571
          mask.coeffRef(k0) = true;
571
          mask.coeffRef(k0) = true;
572
          for(int k=m_permutation.indices().coeff(k0); k!=k0; k=m_permutation.indices().coeff(k))
572
          for(Index k=m_permutation.indices().coeff(k0); k!=k0; k=m_permutation.indices().coeff(k))
573
          {
573
          {
574
                  Block<Dest, Side==OnTheLeft ? 1 : Dest::RowsAtCompileTime, Side==OnTheRight ? 1 : Dest::ColsAtCompileTime>(dst, k)
574
                  Block<Dest, Side==OnTheLeft ? 1 : Dest::RowsAtCompileTime, Side==OnTheRight ? 1 : Dest::ColsAtCompileTime>(dst, k)
575
            .swap(Block<Dest, Side==OnTheLeft ? 1 : Dest::RowsAtCompileTime, Side==OnTheRight ? 1 : Dest::ColsAtCompileTime>
575
            .swap(Block<Dest, Side==OnTheLeft ? 1 : Dest::RowsAtCompileTime, Side==OnTheRight ? 1 : Dest::ColsAtCompileTime>
Lines 582-588 Link Here
582
      }
582
      }
583
      else
583
      else
584
      {
584
      {
585
        for(int i = 0; i < n; ++i)
585
        for(Index i = 0; i < n; ++i)
586
        {
586
        {
587
          Block<Dest, Side==OnTheLeft ? 1 : Dest::RowsAtCompileTime, Side==OnTheRight ? 1 : Dest::ColsAtCompileTime>
587
          Block<Dest, Side==OnTheLeft ? 1 : Dest::RowsAtCompileTime, Side==OnTheRight ? 1 : Dest::ColsAtCompileTime>
588
               (dst, ((Side==OnTheLeft) ^ Transposed) ? m_permutation.indices().coeff(i) : i)
588
               (dst, ((Side==OnTheLeft) ^ Transposed) ? m_permutation.indices().coeff(i) : i)
(-)a/Eigen/src/Core/Transpositions.h (-1 / +1 lines)
Lines 99-105 Link Here
99
    IndicesType& indices() { return derived().indices(); }
99
    IndicesType& indices() { return derived().indices(); }
100
100
101
    /** Resizes to given size. */
101
    /** Resizes to given size. */
102
    inline void resize(int newSize)
102
    inline void resize(Index newSize)
103
    {
103
    {
104
      indices().resize(newSize);
104
      indices().resize(newSize);
105
    }
105
    }
(-)a/Eigen/src/LU/PartialPivLU.h (-4 / +4 lines)
Lines 60-67 Link Here
60
    typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
60
    typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
61
    typedef typename internal::traits<MatrixType>::StorageKind StorageKind;
61
    typedef typename internal::traits<MatrixType>::StorageKind StorageKind;
62
    typedef typename MatrixType::Index Index;
62
    typedef typename MatrixType::Index Index;
63
    typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime> PermutationType;
63
    typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime, Index> PermutationType;
64
    typedef Transpositions<RowsAtCompileTime, MaxRowsAtCompileTime> TranspositionType;
64
    typedef Transpositions<RowsAtCompileTime, MaxRowsAtCompileTime, Index> TranspositionType;
65
65
66
66
67
    /**
67
    /**
Lines 242-248 Link Here
242
    const Index cols = lu.cols();
242
    const Index cols = lu.cols();
243
    const Index size = (std::min)(rows,cols);
243
    const Index size = (std::min)(rows,cols);
244
    nb_transpositions = 0;
244
    nb_transpositions = 0;
245
    int first_zero_pivot = -1;
245
    Index first_zero_pivot = -1;
246
    for(Index k = 0; k < size; ++k)
246
    for(Index k = 0; k < size; ++k)
247
    {
247
    {
248
      Index rrows = rows-k-1;
248
      Index rrows = rows-k-1;
Lines 318-324 Link Here
318
    }
318
    }
319
319
320
    nb_transpositions = 0;
320
    nb_transpositions = 0;
321
    int first_zero_pivot = -1;
321
    Index first_zero_pivot = -1;
322
    for(Index k = 0; k < size; k+=blockSize)
322
    for(Index k = 0; k < size; k+=blockSize)
323
    {
323
    {
324
      Index bs = (std::min)(size-k,blockSize); // actual size of the block
324
      Index bs = (std::min)(size-k,blockSize); // actual size of the block
(-)a/unsupported/Eigen/OpenGLSupport (-1 / +1 lines)
Lines 11-17 Link Here
11
#define EIGEN_OPENGL_MODULE
11
#define EIGEN_OPENGL_MODULE
12
12
13
#include <Eigen/Geometry>
13
#include <Eigen/Geometry>
14
#include <GL/gl.h>
14
#include <OpenGL/gl.h>
15
15
16
namespace Eigen {
16
namespace Eigen {
17
17

Return to bug 397