Loading src/TNL/Matrices/MatrixReader_impl.h +15 −0 Original line number Diff line number Diff line Loading @@ -69,8 +69,14 @@ bool MatrixReader< Matrix >::readMtxFileHostMatrix( std::istream& file, if( ! computeCompressedRowLengthsFromMtxFile( file, rowLengths, columns, rows, symmetricMatrix, verbose ) ) return false; std::cout << " rowLengths sizeof: " << sizeof( rowLengths ) << std::endl; std::cout << " rowLengths element sizeof: " << sizeof( rowLengths[0] ) << std::endl; std::cout << " rowLengths getSize(): " << rowLengths.getSize() << std::endl; matrix.setCompressedRowLengths( rowLengths ); std::cout << "->CompressedRowLengths SET" << std::endl; if( ! readMatrixElementsFromMtxFile( file, matrix, symmetricMatrix, verbose, symReader ) ) return false; return true; Loading Loading @@ -340,6 +346,9 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, IndexType processedElements( 0 ); Timer timer; timer.start(); std::cout << "\nBefore while..." << std::endl; while( std::getline( file, line ) ) { if( line[ 0 ] == '%' ) continue; Loading Loading @@ -370,6 +379,9 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, processedElements++; } } std::cout << "\nAfter while..." << std::endl; file.clear(); long int fileSize = file.tellg(); timer.stop(); Loading @@ -377,6 +389,9 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, std::cout << " Reading the matrix elements ... " << processedElements << " / " << matrix.getNumberOfMatrixElements() << " -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; std::cout << "->END of reading matrix elements from file" << std::endl; return true; } Loading Loading
src/TNL/Matrices/MatrixReader_impl.h +15 −0 Original line number Diff line number Diff line Loading @@ -69,8 +69,14 @@ bool MatrixReader< Matrix >::readMtxFileHostMatrix( std::istream& file, if( ! computeCompressedRowLengthsFromMtxFile( file, rowLengths, columns, rows, symmetricMatrix, verbose ) ) return false; std::cout << " rowLengths sizeof: " << sizeof( rowLengths ) << std::endl; std::cout << " rowLengths element sizeof: " << sizeof( rowLengths[0] ) << std::endl; std::cout << " rowLengths getSize(): " << rowLengths.getSize() << std::endl; matrix.setCompressedRowLengths( rowLengths ); std::cout << "->CompressedRowLengths SET" << std::endl; if( ! readMatrixElementsFromMtxFile( file, matrix, symmetricMatrix, verbose, symReader ) ) return false; return true; Loading Loading @@ -340,6 +346,9 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, IndexType processedElements( 0 ); Timer timer; timer.start(); std::cout << "\nBefore while..." << std::endl; while( std::getline( file, line ) ) { if( line[ 0 ] == '%' ) continue; Loading Loading @@ -370,6 +379,9 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, processedElements++; } } std::cout << "\nAfter while..." << std::endl; file.clear(); long int fileSize = file.tellg(); timer.stop(); Loading @@ -377,6 +389,9 @@ bool MatrixReader< Matrix >::readMatrixElementsFromMtxFile( std::istream& file, std::cout << " Reading the matrix elements ... " << processedElements << " / " << matrix.getNumberOfMatrixElements() << " -> " << timer.getRealTime() << " sec. i.e. " << fileSize / ( timer.getRealTime() * ( 1 << 20 )) << "MB/s." << std::endl; std::cout << "->END of reading matrix elements from file" << std::endl; return true; } Loading