Loading src/Benchmarks/SpMV/spmv.h +13 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,18 @@ std::string getMatrixFormat( const Matrix& matrix ) return format; } template< typename Matrix > std::string getFormatShort( const Matrix& matrix ) { std::string mtrxFullType = getType( matrix ); std::string mtrxType = mtrxFullType.substr( 0, mtrxFullType.find( "<" ) ); std::string format = mtrxType.substr( mtrxType.find( ':' ) + 2 ); format = format.substr( format.find(':') + 2); format = format.substr( 0, 3 ); return format; } // Print information about the matrix. template< typename Matrix > void printMatrixInfo( const Matrix& matrix, Loading Loading @@ -221,7 +233,7 @@ benchmarkSpMV( Benchmark& benchmark, { "non-zeros", convertToString( hostMatrix.getNumberOfNonzeroMatrixElements() ) }, { "rows", convertToString( hostMatrix.getRows() ) }, { "columns", convertToString( hostMatrix.getColumns() ) }, { "matrix format", convertToString( "CSR-cuSPARSE" ) } { "matrix format", convertToString( "CSR-cuSPARSE-" + getFormatShort( hostMatrix ) ) } } )); benchmark.time< Devices::Cuda >( reset, "GPU", spmvCusparse ); Loading Loading
src/Benchmarks/SpMV/spmv.h +13 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,18 @@ std::string getMatrixFormat( const Matrix& matrix ) return format; } template< typename Matrix > std::string getFormatShort( const Matrix& matrix ) { std::string mtrxFullType = getType( matrix ); std::string mtrxType = mtrxFullType.substr( 0, mtrxFullType.find( "<" ) ); std::string format = mtrxType.substr( mtrxType.find( ':' ) + 2 ); format = format.substr( format.find(':') + 2); format = format.substr( 0, 3 ); return format; } // Print information about the matrix. template< typename Matrix > void printMatrixInfo( const Matrix& matrix, Loading Loading @@ -221,7 +233,7 @@ benchmarkSpMV( Benchmark& benchmark, { "non-zeros", convertToString( hostMatrix.getNumberOfNonzeroMatrixElements() ) }, { "rows", convertToString( hostMatrix.getRows() ) }, { "columns", convertToString( hostMatrix.getColumns() ) }, { "matrix format", convertToString( "CSR-cuSPARSE" ) } { "matrix format", convertToString( "CSR-cuSPARSE-" + getFormatShort( hostMatrix ) ) } } )); benchmark.time< Devices::Cuda >( reset, "GPU", spmvCusparse ); Loading