diff --git a/src/Python/pytnl/tnl/SparseMatrix.h b/src/Python/pytnl/tnl/SparseMatrix.h index b4cc0fc1a5c2f346ea38bd49d40dd5d1f8dcdc51..e4064e1a411364084e2422d1a18f8814a1271f0b 100644 --- a/src/Python/pytnl/tnl/SparseMatrix.h +++ b/src/Python/pytnl/tnl/SparseMatrix.h @@ -51,7 +51,7 @@ void export_Matrix( py::module & m, const char* name ) using VectorType = TNL::Containers::Vector< typename Matrix::RealType, typename Matrix::DeviceType, typename Matrix::IndexType >; - void (Matrix::* _getCompressedRowLengths)(typename Matrix::CompressedRowLengthsVector&) const = &Matrix::getCompressedRowLengths; + void (Matrix::* _getCompressedRowLengths)(typename Matrix::CompressedRowLengthsVectorView) const = &Matrix::getCompressedRowLengths; auto matrix = py::class_< Matrix, TNL::Object >( m, name ) .def(py::init<>()) diff --git a/src/TNL/Matrices/Matrix.h b/src/TNL/Matrices/Matrix.h index 0b34a5a57f2426d211a57854d311a55a85a50422..a5f2b6b8ff377aac4192977edf8d385f070abfb1 100644 --- a/src/TNL/Matrices/Matrix.h +++ b/src/TNL/Matrices/Matrix.h @@ -57,7 +57,7 @@ public: // TODO: implementation is not parallel // TODO: it would be nice if padding zeros could be stripped - void getCompressedRowLengths( CompressedRowLengthsVector& rowLengths ) const; + //void getCompressedRowLengths( CompressedRowLengthsVector& rowLengths ) const; virtual void getCompressedRowLengths( CompressedRowLengthsVectorView rowLengths ) const; diff --git a/src/TNL/Matrices/Matrix.hpp b/src/TNL/Matrices/Matrix.hpp index 4ddbacde5fd396a71b90f1d4881c3969996d9976..0710ca829dfe2a6082ef1a456f6304613aaf2d7c 100644 --- a/src/TNL/Matrices/Matrix.hpp +++ b/src/TNL/Matrices/Matrix.hpp @@ -56,7 +56,7 @@ void Matrix< Real, Device, Index, RealAllocator >::setDimensions( const IndexTyp this->columns = columns; } -template< typename Real, +/*template< typename Real, typename Device, typename Index, typename RealAllocator > @@ -64,7 +64,7 @@ void Matrix< Real, Device, Index, RealAllocator >::getCompressedRowLengths( Comp { rowLengths.setSize( this->getRows() ); getCompressedRowLengths( rowLengths.getView() ); -} +}*/ template< typename Real, typename Device, @@ -72,9 +72,9 @@ template< typename Real, typename RealAllocator > void Matrix< Real, Device, Index, RealAllocator >::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 ) ); + 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,