Commit 939b17f9 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Removed useless virtual methods from Matrix.

parent 41348dac
Loading
Loading
Loading
Loading
+18 −15
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ public:
    typedef Index IndexType;
    typedef typename Sparse< RealType, DeviceType, IndexType >::CompressedRowLengthsVector CompressedRowLengthsVector;
    typedef typename Sparse< RealType, DeviceType, IndexType >::ConstCompressedRowLengthsVectorView ConstCompressedRowLengthsVectorView;
    typedef typename Sparse< RealType, DeviceType, IndexType >::CompressedRowLengthsVectorView CompressedRowLengthsVectorView;

    template< typename _Real = Real,
              typename _Device = Device,
@@ -132,6 +133,8 @@ public:

    void setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths );

    void getCompressedRowLengths( CompressedRowLengthsVectorView rowLengths ) const;

    IndexType getWarp( const IndexType row ) const;

    IndexType getInWarpOffset( const IndexType row,
+10 −0
Original line number Diff line number Diff line
@@ -220,6 +220,16 @@ setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths )
    }
}

template< typename Real,
          typename Device,
          typename Index >
void AdEllpack< Real, Device, Index >::getCompressedRowLengths( CompressedRowLengthsVectorView rowLengths ) const
{
   TNL_ASSERT_EQ( rowLengths.getSize(), this->getRows(), "invalid size of the rowLengths vector" );
   for( IndexType row = 0; row < this->getRows(); row++ )
      rowLengths.setElement( row, this->getRowLength( row ) );
}

template< typename Real,
          typename Device,
          typename Index >
+9 −6
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ public:
	typedef Index IndexType;
	typedef typename Sparse< RealType, DeviceType, IndexType >::CompressedRowLengthsVector CompressedRowLengthsVector;
   typedef typename Sparse< RealType, DeviceType, IndexType >::ConstCompressedRowLengthsVectorView ConstCompressedRowLengthsVectorView;
   typedef typename Sparse< RealType, DeviceType, IndexType >::CompressedRowLengthsVectorView CompressedRowLengthsVectorView;
	typedef typename Sparse< RealType, DeviceType, IndexType >::ValuesVector ValuesVector;
	typedef typename Sparse< RealType, DeviceType, IndexType >::ColumnIndexesVector ColumnIndexesVector;

@@ -62,6 +63,8 @@ public:

   void setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths );

   void getCompressedRowLengths( CompressedRowLengthsVectorView rowLengths ) const;

	IndexType getRowLength( const IndexType row ) const;

	template< typename Real2,
+28 −18
Original line number Diff line number Diff line
@@ -103,6 +103,16 @@ setCompressedRowLengths( ConstCompressedRowLengthsVectorView constRowLengths )
    return this->allocateMatrixElements( this->warpSize * this->groupPointers.getElement( strips * ( this->logWarpSize + 1 ) ) );
}

template< typename Real,
          typename Device,
          typename Index >
void BiEllpack< Real, Device, Index >::getCompressedRowLengths( CompressedRowLengthsVectorView rowLengths ) const
{
   TNL_ASSERT_EQ( rowLengths.getSize(), this->getRows(), "invalid size of the rowLengths vector" );
   for( IndexType row = 0; row < this->getRows(); row++ )
      rowLengths.setElement( row, this->getRowLength( row ) );
}

template< typename Real,
          typename Device,
          typename Index >
+7 −4
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ public:
   using DeviceType = Device;
   using IndexType = Index;
   typedef typename Sparse< RealType, DeviceType, IndexType >::CompressedRowLengthsVector CompressedRowLengthsVector;
   typedef typename Sparse< RealType, DeviceType, IndexType >::CompressedRowLengthsVectorView CompressedRowLengthsVectorView;
   typedef typename Sparse< RealType, DeviceType, IndexType >::ConstCompressedRowLengthsVectorView ConstCompressedRowLengthsVectorView;
   typedef Sparse< Real, Device, Index > BaseType;
   using MatrixRow = typename BaseType::MatrixRow;
@@ -71,6 +72,8 @@ public:

   void setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths );

   void getCompressedRowLengths( CompressedRowLengthsVectorView rowLengths ) const;

   IndexType getRowLength( const IndexType row ) const;

   __cuda_callable__
Loading