Loading src/TNL/Matrices/CSR.h +3 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ class CSR : public Sparse< Real, Device, Index > IndexType getRowLength( const IndexType row ) const; __cuda_callable__ IndexType getRowLengthFast( const IndexType row ) const; template< typename Real2, typename Device2, typename Index2 > void setLike( const CSR< Real2, Device2, Index2 >& matrix ); Loading src/TNL/Matrices/CSR_impl.h +9 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,15 @@ template< typename Real, typename Device, typename Index > Index CSR< Real, Device, Index >::getRowLength( const IndexType row ) const { return this->rowPointers.getElement( row + 1 ) - this->rowPointers.getElement( row ); } template< typename Real, typename Device, typename Index > __cuda_callable__ Index CSR< Real, Device, Index >::getRowLengthFast( const IndexType row ) const { return this->rowPointers[ row + 1 ] - this->rowPointers[ row ]; } Loading src/TNL/Matrices/ChunkedEllpack.h +3 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,9 @@ class ChunkedEllpack : public Sparse< Real, Device, Index > IndexType getRowLength( const IndexType row ) const; __cuda_callable__ IndexType getRowLengthFast( const IndexType row ) const; template< typename Real2, typename Device2, typename Index2 > void setLike( const ChunkedEllpack< Real2, Device2, Index2 >& matrix ); Loading src/TNL/Matrices/ChunkedEllpack_impl.h +13 −1 Original line number Diff line number Diff line Loading @@ -262,9 +262,21 @@ template< typename Real, typename Index > Index ChunkedEllpack< Real, Device, Index >::getRowLength( const IndexType row ) const { const IndexType& sliceIndex = rowToSliceMapping[ row ]; const IndexType& sliceIndex = rowToSliceMapping.getElement( row ); TNL_ASSERT( sliceIndex < this->rows, ); const IndexType& chunkSize = slices.getElement( sliceIndex ).chunkSize; return rowPointers.getElement( row + 1 ) - rowPointers.getElement( row ); } template< typename Real, typename Device, typename Index > __cuda_callable__ Index ChunkedEllpack< Real, Device, Index >::getRowLengthFast( const IndexType row ) const { const IndexType& sliceIndex = rowToSliceMapping[ row ]; TNL_ASSERT( sliceIndex < this->rows, ); const IndexType& chunkSize = slices[ sliceIndex ].chunkSize; return rowPointers[ row + 1 ] - rowPointers[ row ]; } Loading src/TNL/Matrices/Dense.h +3 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,9 @@ class Dense : public Matrix< Real, Device, Index > */ IndexType getRowLength( const IndexType row ) const; __cuda_callable__ IndexType getRowLengthFast( const IndexType row ) const; IndexType getMaxRowLength() const; IndexType getNumberOfMatrixElements() const; Loading Loading
src/TNL/Matrices/CSR.h +3 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ class CSR : public Sparse< Real, Device, Index > IndexType getRowLength( const IndexType row ) const; __cuda_callable__ IndexType getRowLengthFast( const IndexType row ) const; template< typename Real2, typename Device2, typename Index2 > void setLike( const CSR< Real2, Device2, Index2 >& matrix ); Loading
src/TNL/Matrices/CSR_impl.h +9 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,15 @@ template< typename Real, typename Device, typename Index > Index CSR< Real, Device, Index >::getRowLength( const IndexType row ) const { return this->rowPointers.getElement( row + 1 ) - this->rowPointers.getElement( row ); } template< typename Real, typename Device, typename Index > __cuda_callable__ Index CSR< Real, Device, Index >::getRowLengthFast( const IndexType row ) const { return this->rowPointers[ row + 1 ] - this->rowPointers[ row ]; } Loading
src/TNL/Matrices/ChunkedEllpack.h +3 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,9 @@ class ChunkedEllpack : public Sparse< Real, Device, Index > IndexType getRowLength( const IndexType row ) const; __cuda_callable__ IndexType getRowLengthFast( const IndexType row ) const; template< typename Real2, typename Device2, typename Index2 > void setLike( const ChunkedEllpack< Real2, Device2, Index2 >& matrix ); Loading
src/TNL/Matrices/ChunkedEllpack_impl.h +13 −1 Original line number Diff line number Diff line Loading @@ -262,9 +262,21 @@ template< typename Real, typename Index > Index ChunkedEllpack< Real, Device, Index >::getRowLength( const IndexType row ) const { const IndexType& sliceIndex = rowToSliceMapping[ row ]; const IndexType& sliceIndex = rowToSliceMapping.getElement( row ); TNL_ASSERT( sliceIndex < this->rows, ); const IndexType& chunkSize = slices.getElement( sliceIndex ).chunkSize; return rowPointers.getElement( row + 1 ) - rowPointers.getElement( row ); } template< typename Real, typename Device, typename Index > __cuda_callable__ Index ChunkedEllpack< Real, Device, Index >::getRowLengthFast( const IndexType row ) const { const IndexType& sliceIndex = rowToSliceMapping[ row ]; TNL_ASSERT( sliceIndex < this->rows, ); const IndexType& chunkSize = slices[ sliceIndex ].chunkSize; return rowPointers[ row + 1 ] - rowPointers[ row ]; } Loading
src/TNL/Matrices/Dense.h +3 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,9 @@ class Dense : public Matrix< Real, Device, Index > */ IndexType getRowLength( const IndexType row ) const; __cuda_callable__ IndexType getRowLengthFast( const IndexType row ) const; IndexType getMaxRowLength() const; IndexType getNumberOfMatrixElements() const; Loading