Commit 950bc455 authored by Jakub Klinkovský's avatar Jakub Klinkovský Committed by Tomáš Oberhuber
Browse files

Changed default value for lastRow in vectorProduct from -1 to 0

Otherwise the compiler would complain for unsigned types, see also Array
and Vector methods.
parent 7676df55
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ class SparseMatrix : public Matrix< Real, Device, Index, RealAllocator >
                          const RealType& matrixMultiplicator = 1.0,
                          const RealType& outVectorMultiplicator = 0.0,
                          const IndexType firstRow = 0,
                          const IndexType lastRow = -1 ) const;
                          const IndexType lastRow = 0 ) const;

      /*template< typename Real2, typename Index2 >
      void addMatrix( const SparseMatrix< Real2, Segments, Device, Index2 >& matrix,
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ class SparseMatrixView : public MatrixView< Real, Device, Index >
                          const RealType matrixMultiplicator = 1.0,
                          const RealType outVectorMultiplicator = 0.0,
                          const IndexType firstRow = 0,
                          IndexType lastRow = -1 ) const;
                          IndexType lastRow = 0 ) const;

      template< typename Fetch, typename Reduce, typename Keep, typename FetchReal >
      void rowsReduction( IndexType first, IndexType last, Fetch& fetch, const Reduce& reduce, Keep& keep, const FetchReal& zero ) const;
+1 −1
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ vectorProduct( const InVector& inVector,
            outVectorView[ row ] = outVectorMultiplicator * outVectorView[ row ] + matrixMultiplicator * value;
      }
   };
   if( lastRow == -1 )
   if( lastRow == 0 )
      lastRow = this->getRows();
   if( isSymmetric() )
      this->segments.segmentsReduction( firstRow, lastRow, symmetricFetch, std::plus<>{}, keeper, ( RealType ) 0.0 );