[CoinUtils-tickets] [COIN-OR Common Utilities] #42: CoinPackedMatrix: use of extraMajor_

COIN-OR Common Utilities coin-trac at coin-or.org
Thu Nov 15 09:05:29 EST 2007


#42: CoinPackedMatrix: use of extraMajor_
-----------------------------+----------------------------------------------
Reporter:  jherbers          |       Type:  defect                        
  Status:  new               |   Priority:  minor                         
 Version:  stable/2.0 (SVN)  |   Keywords:  extraMajor_, memory allocation
-----------------------------+----------------------------------------------
 I have encountered performance problems am attaching column-ordered
 CoinPackedMatrices to each other, using
 CoinPackedMatrix::rightAppendPackedMatrix(). Boiling the problem down, I
 have found the following piece of code in
 CoinPackedMatrix::resizeForAddingMajorVectors():

 maxSize_ = CoinMax(maxSize_,newStart[majorDim_]+ (int) extraMajor_);

 However, extraMajor_ is 0.25 by default, meaning that the last argument to
 CoinMax equals newStart[majorDim_]. In other places, extraMajor_ is taken
 as a relative surcharge on the size of the matrix, using the
 CoinLengthWithExtra() function (e.g. in resizeForAddingMinorVectors()).
 Changing the above code in this way, the performance of my code is much
 better.

 The same (faulty?) use applies to a statement in
 CoinPackedMatrix::reverseOrderedCopyOf().

-- 
Ticket URL: <https://projects.coin-or.org/CoinUtils/ticket/42>
COIN-OR Common Utilities <http://projects.coin-or.org/CoinUtils>
Common data structures and linear algebra functions for COIN-OR projects



More information about the CoinUtils-tickets mailing list