New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 629 - eliminate redundant counter & fix rowmajor version of reserve()
Summary: eliminate redundant counter & fix rowmajor version of reserve()
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Sparse (show other bugs)
Version: 3.1
Hardware: All All
: Normal enhancement
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-14 19:53 UTC by cDc
Modified: 2013-07-14 19:53 UTC (History)
0 users



Attachments

Description cDc 2013-07-14 19:53:33 UTC
In SparseMatrix.h, function reserveInnerVectors90, line 294, change:

        Index count = 0;
        for(Index j=0; j<m_outerSize; ++j)
        {
          newOuterIndex[j] = count;
          count += reserveSizes[j] + (m_outerIndex[j+1]-m_outerIndex[j]);
          totalReserveSize += reserveSizes[j];
        }
        m_data.reserve(totalReserveSize);

to:

        for(Index j=0; j<m_outerSize; ++j)
        {
          newOuterIndex[j] = totalReserveSize;
          totalReserveSize += reserveSizes[j];
        }
        m_data.reserve(totalReserveSize);

Please enhance this function to support rowmajor matrices as well.

Note You need to log in before you can comment on or make changes to this bug.