Loading src/Python/pytnl/tnl/SparseMatrix.h +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ void export_Matrix( py::module & m, const char* name ) .def("getCompressedRowLengths", _getCompressedRowLengths) // TODO: export for more types .def("setLike", &Matrix::template setLike< typename Matrix::RealType, typename Matrix::DeviceType, typename Matrix::IndexType >) .def("getNumberOfMatrixElements", &Matrix::getNumberOfMatrixElements) .def("getAllocatedElementsCount", &Matrix::getAllocatedElementsCount) .def("getNumberOfNonzeroMatrixElements", &Matrix::getNumberOfNonzeroMatrixElements) .def("reset", &Matrix::reset) .def("getRows", &Matrix::getRows) Loading src/TNL/Matrices/Legacy/Sparse_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ template< typename Real, void Sparse< Real, Device, Index >::setLike( const Sparse< Real2, Device2, Index2 >& matrix ) { Matrix< Real, Device, Index >::setLike( matrix ); this->allocateMatrixElements( matrix.getNumberOfMatrixElements() ); this->allocateMatrixElements( matrix.getAllocatedElementsCount() ); } Loading src/TNL/Matrices/MatrixReader_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ void MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, long int fileSize = file.tellg(); timer.stop(); if( verbose ) std::cout << " Reading the matrix elements ... " << processedElements << " / " << matrix.getNumberOfMatrixElements() std::cout << " Reading the matrix elements ... " << processedElements << " / " << matrix.getAllocatedElementsCount() << " -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; } Loading src/TNL/Matrices/SparseMatrix.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,9 @@ vectorProduct( const InVector& inVector, const RealType& matrixMultiplicator, const RealType& inVectorAddition ) const { TNL_ASSERT_EQ( this->getColumns(), inVector.getSize(), "Matrix columns do not fit with input vector." ); TNL_ASSERT_EQ( this->getRows(), outVector.getSize(), "Matrix rows do not fit with output vector." ); const auto inVectorView = inVector.getConstView(); auto outVectorView = outVector.getView(); const auto valuesView = this->values.getConstView(); Loading Loading
src/Python/pytnl/tnl/SparseMatrix.h +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ void export_Matrix( py::module & m, const char* name ) .def("getCompressedRowLengths", _getCompressedRowLengths) // TODO: export for more types .def("setLike", &Matrix::template setLike< typename Matrix::RealType, typename Matrix::DeviceType, typename Matrix::IndexType >) .def("getNumberOfMatrixElements", &Matrix::getNumberOfMatrixElements) .def("getAllocatedElementsCount", &Matrix::getAllocatedElementsCount) .def("getNumberOfNonzeroMatrixElements", &Matrix::getNumberOfNonzeroMatrixElements) .def("reset", &Matrix::reset) .def("getRows", &Matrix::getRows) Loading
src/TNL/Matrices/Legacy/Sparse_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ template< typename Real, void Sparse< Real, Device, Index >::setLike( const Sparse< Real2, Device2, Index2 >& matrix ) { Matrix< Real, Device, Index >::setLike( matrix ); this->allocateMatrixElements( matrix.getNumberOfMatrixElements() ); this->allocateMatrixElements( matrix.getAllocatedElementsCount() ); } Loading
src/TNL/Matrices/MatrixReader_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ void MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, long int fileSize = file.tellg(); timer.stop(); if( verbose ) std::cout << " Reading the matrix elements ... " << processedElements << " / " << matrix.getNumberOfMatrixElements() std::cout << " Reading the matrix elements ... " << processedElements << " / " << matrix.getAllocatedElementsCount() << " -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; } Loading
src/TNL/Matrices/SparseMatrix.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,9 @@ vectorProduct( const InVector& inVector, const RealType& matrixMultiplicator, const RealType& inVectorAddition ) const { TNL_ASSERT_EQ( this->getColumns(), inVector.getSize(), "Matrix columns do not fit with input vector." ); TNL_ASSERT_EQ( this->getRows(), outVector.getSize(), "Matrix rows do not fit with output vector." ); const auto inVectorView = inVector.getConstView(); auto outVectorView = outVector.getView(); const auto valuesView = this->values.getConstView(); Loading