Skip to content
Snippets Groups Projects
Commit 1ad0339b authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Removed unused parameter in BLAS benchmarks

fixes #23
parent 0d025f21
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,6 @@ template< typename Real = double,
typename Index = int >
bool
benchmarkArrayOperations( Benchmark & benchmark,
const int & loops,
const long & size )
{
typedef Containers::Array< Real, Devices::Host, Index > HostArray;
......
......@@ -95,7 +95,6 @@ template< typename Real,
template< typename, typename, typename > class Vector = Containers::Vector >
bool
benchmarkSpMV( Benchmark & benchmark,
const int & loops,
const int & size,
const int elementsPerRow = 5 )
{
......@@ -176,16 +175,15 @@ template< typename Real = double,
typename Index = int >
bool
benchmarkSpmvSynthetic( Benchmark & benchmark,
const int & loops,
const int & size,
const int & elementsPerRow )
{
bool result = true;
// TODO: benchmark all formats from tnl-benchmark-spmv (different parameters of the base formats)
result |= benchmarkSpMV< Real, Matrices::CSR >( benchmark, loops, size, elementsPerRow );
result |= benchmarkSpMV< Real, Matrices::Ellpack >( benchmark, loops, size, elementsPerRow );
result |= benchmarkSpMV< Real, SlicedEllpack >( benchmark, loops, size, elementsPerRow );
result |= benchmarkSpMV< Real, Matrices::ChunkedEllpack >( benchmark, loops, size, elementsPerRow );
result |= benchmarkSpMV< Real, Matrices::CSR >( benchmark, size, elementsPerRow );
result |= benchmarkSpMV< Real, Matrices::Ellpack >( benchmark, size, elementsPerRow );
result |= benchmarkSpMV< Real, SlicedEllpack >( benchmark, size, elementsPerRow );
result |= benchmarkSpMV< Real, Matrices::ChunkedEllpack >( benchmark, size, elementsPerRow );
return result;
}
......
......@@ -32,7 +32,6 @@ runBlasBenchmarks( Benchmark & benchmark,
const std::size_t & minSize,
const std::size_t & maxSize,
const double & sizeStepFactor,
const unsigned & loops,
const unsigned & elementsPerRow )
{
const String precision = getType< Real >();
......@@ -45,7 +44,7 @@ runBlasBenchmarks( Benchmark & benchmark,
benchmark.setMetadataColumns( Benchmark::MetadataColumns({
{"size", convertToString( size ) },
} ));
benchmarkArrayOperations< Real >( benchmark, loops, size );
benchmarkArrayOperations< Real >( benchmark, size );
}
// Vector operations
......@@ -55,7 +54,7 @@ runBlasBenchmarks( Benchmark & benchmark,
benchmark.setMetadataColumns( Benchmark::MetadataColumns({
{ "size", convertToString( size ) },
} ));
benchmarkVectorOperations< Real >( benchmark, loops, size );
benchmarkVectorOperations< Real >( benchmark, size );
}
// Sparse matrix-vector multiplication
......@@ -67,7 +66,7 @@ runBlasBenchmarks( Benchmark & benchmark,
{"columns", convertToString( size ) },
{"elements per row", convertToString( elementsPerRow ) },
} ));
benchmarkSpmvSynthetic< Real >( benchmark, loops, size, elementsPerRow );
benchmarkSpmvSynthetic< Real >( benchmark, size, elementsPerRow );
}
}
......@@ -145,9 +144,9 @@ main( int argc, char* argv[] )
Benchmark::MetadataMap metadata = getHardwareMetadata();
if( precision == "all" || precision == "float" )
runBlasBenchmarks< float >( benchmark, metadata, minSize, maxSize, sizeStepFactor, loops, elementsPerRow );
runBlasBenchmarks< float >( benchmark, metadata, minSize, maxSize, sizeStepFactor, elementsPerRow );
if( precision == "all" || precision == "double" )
runBlasBenchmarks< double >( benchmark, metadata, minSize, maxSize, sizeStepFactor, loops, elementsPerRow );
runBlasBenchmarks< double >( benchmark, metadata, minSize, maxSize, sizeStepFactor, elementsPerRow );
if( ! benchmark.save( logFile ) ) {
std::cerr << "Failed to write the benchmark results to file '" << parameters.getParameter< String >( "log-file" ) << "'." << std::endl;
......
......@@ -29,7 +29,6 @@ template< typename Real = double,
typename Index = int >
bool
benchmarkVectorOperations( Benchmark & benchmark,
const int & loops,
const long & size )
{
typedef Containers::Vector< Real, Devices::Host, Index > HostVector;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment