Commit fbceed2d authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixes and new todo notes for matrices

parent 51040db2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -38,7 +38,9 @@ public:

   virtual IndexType getRowLength( const IndexType row ) const = 0;

   virtual void getCompressedRowLengths( Containers::Vector< IndexType, DeviceType, IndexType >& rowLengths ) const;
   // TODO: implementation is not parallel
   // TODO: it would be nice if padding zeros could be stripped
   virtual void getCompressedRowLengths( CompressedRowLengthsVector& rowLengths ) const;

   template< typename Real2, typename Device2, typename Index2 >
   void setLike( const Matrix< Real2, Device2, Index2 >& matrix );
@@ -88,6 +90,7 @@ public:
   
   ValuesVector& getValues();

   // TODO: parallelize and optimize for sparse matrices
   template< typename Matrix >
   bool operator == ( const Matrix& matrix ) const;

+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ void Matrix< Real, Device, Index >::setDimensions( const IndexType rows,
template< typename Real,
          typename Device,
          typename Index >
void Matrix< Real, Device, Index >::getCompressedRowLengths( Containers::Vector< IndexType, DeviceType, IndexType >& rowLengths ) const
void Matrix< Real, Device, Index >::getCompressedRowLengths( CompressedRowLengthsVector& rowLengths ) const
{
   rowLengths.setSize( this->getRows() );
   for( IndexType row = 0; row < this->getRows(); row++ )
+2 −1
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ void Sparse< Real, Device, Index >::allocateMatrixElements( const IndexType& num
    * Setting a column index to this->columns means that the
    * index is undefined.
    */
   if( numberOfMatrixElements > 0 )
      this->columnIndexes.setValue( this->columns );
}