Skip to content
Snippets Groups Projects

Matrices revision

Merged Tomáš Oberhuber requested to merge matrices-revision into develop
1 file
+ 13
1
Compare changes
  • Side-by-side
  • Inline
+ 13
1
@@ -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,
@@ -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