Loading src/Benchmarks/JsonLogging.h +13 −7 Original line number Diff line number Diff line Loading @@ -116,11 +116,14 @@ public: } void writeHeader() { if( verbose ) { for( auto md : this->logsMetadata ) std::cout << md << "\t"; std::cout << std::endl; } } void writeRow( const RowElements& rowEls ) { Loading @@ -132,6 +135,8 @@ public: std::cout << el << "\t"; log << " \"" << *md++ << "\" = \"" << el << "," << std::endl; } if( verbose ) std::cout << std::endl; } void Loading Loading @@ -161,7 +166,7 @@ public: writeTableHeader( const String & spanningElement, const HeaderElements & subElements ) { if( verbose && header_changed ) { /*if( verbose && header_changed ) { for( auto & it : metadataColumns ) { std::cout << std::setw( 20 ) << it.first; } Loading Loading @@ -206,14 +211,15 @@ public: if( horizontalGroups.size() > 0 ) { horizontalGroups.back().second--; header_indent.pop_back(); } }*/ } void writeTableRow( const String & spanningElement, const RowElements & subElements ) { if( verbose ) { writeRow( subElements ); /*if( verbose ) { for( auto & it : metadataColumns ) { std::cout << std::setw( 20 ) << it.second; } Loading @@ -235,7 +241,7 @@ public: const String indent = " "; for( auto & it : subElements ) { log << indent << it << std::endl; } }*/ } void Loading src/Benchmarks/LinearSolvers/benchmarks.h +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ benchmarkSolver( Benchmark<>& benchmark, // subclass BenchmarkResult to add extra columns to the benchmark // (iterations, preconditioned residue, true residue) struct MyBenchmarkResult : public BenchmarkResult struct MyBenchmarkResult : public BenchmarkResult<> { using HeaderElements = BenchmarkResult::HeaderElements; using RowElements = BenchmarkResult::RowElements; Loading src/Benchmarks/SpMV/SpmvBenchmarkResult.h +3 −2 Original line number Diff line number Diff line Loading @@ -28,11 +28,12 @@ struct SpmvBenchmarkResult using HostVector = Containers::Vector< Real, Devices::Host, Index >; using BenchmarkVector = Containers::Vector< Real, Device, Index >; using typename Logger::HeaderElements; using typename Logger::RowElements; using typename BenchmarkResult< Logger >::HeaderElements; using typename BenchmarkResult< Logger >::RowElements; using BenchmarkResult< Logger >::stddev; using BenchmarkResult< Logger >::bandwidth; using BenchmarkResult< Logger >::speedup; using BenchmarkResult< Logger >::time; SpmvBenchmarkResult( const String& format, Loading src/Benchmarks/SpMV/spmv.h +4 −4 Original line number Diff line number Diff line Loading @@ -295,7 +295,7 @@ benchmarkSpMVLegacy( BenchmarkType& benchmark, SpmvBenchmarkResult< Real, Devices::Cuda, int > cudaBenchmarkResults( MatrixInfo< HostMatrix >::getFormat(), csrResultVector, cudaOutVector, cudaMatrix.getNonzeroElementsCount() ); benchmark.time< Devices::Cuda >( resetCudaVectors, "GPU", spmvCuda, cudaBenchmarkResults ); #endif std::cout << std::endl; // std::cout << std::endl; } template< typename Real, Loading Loading @@ -325,12 +325,12 @@ benchmarkSpMV( BenchmarkType& benchmark, return; } benchmark.setMetadataColumns( BenchmarkType::MetadataColumns({ /*benchmark.setMetadataColumns( BenchmarkType::MetadataColumns({ { "matrix name", convertToString( inputFileName ) }, { "rows", convertToString( hostMatrix.getRows() ) }, { "columns", convertToString( hostMatrix.getColumns() ) }, { "matrix format", MatrixInfo< HostMatrix >::getFormat() } } )); } ));*/ const int elements = hostMatrix.getNonzeroElementsCount(); const double datasetSize = (double) elements * ( 2 * sizeof( Real ) + sizeof( int ) ) / oneGB; benchmark.setOperation( datasetSize ); Loading Loading @@ -371,7 +371,7 @@ benchmarkSpMV( BenchmarkType& benchmark, SpmvBenchmarkResult< Real, Devices::Cuda, int > cudaBenchmarkResults( MatrixInfo< HostMatrix >::getFormat(), csrResultVector, cudaOutVector, cudaMatrix.getNonzeroElementsCount() ); benchmark.time< Devices::Cuda >( resetCudaVectors, "GPU", spmvCuda, cudaBenchmarkResults ); #endif std::cout << std::endl; // std::cout << std::endl; } template< typename Real = double, Loading Loading
src/Benchmarks/JsonLogging.h +13 −7 Original line number Diff line number Diff line Loading @@ -116,11 +116,14 @@ public: } void writeHeader() { if( verbose ) { for( auto md : this->logsMetadata ) std::cout << md << "\t"; std::cout << std::endl; } } void writeRow( const RowElements& rowEls ) { Loading @@ -132,6 +135,8 @@ public: std::cout << el << "\t"; log << " \"" << *md++ << "\" = \"" << el << "," << std::endl; } if( verbose ) std::cout << std::endl; } void Loading Loading @@ -161,7 +166,7 @@ public: writeTableHeader( const String & spanningElement, const HeaderElements & subElements ) { if( verbose && header_changed ) { /*if( verbose && header_changed ) { for( auto & it : metadataColumns ) { std::cout << std::setw( 20 ) << it.first; } Loading Loading @@ -206,14 +211,15 @@ public: if( horizontalGroups.size() > 0 ) { horizontalGroups.back().second--; header_indent.pop_back(); } }*/ } void writeTableRow( const String & spanningElement, const RowElements & subElements ) { if( verbose ) { writeRow( subElements ); /*if( verbose ) { for( auto & it : metadataColumns ) { std::cout << std::setw( 20 ) << it.second; } Loading @@ -235,7 +241,7 @@ public: const String indent = " "; for( auto & it : subElements ) { log << indent << it << std::endl; } }*/ } void Loading
src/Benchmarks/LinearSolvers/benchmarks.h +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ benchmarkSolver( Benchmark<>& benchmark, // subclass BenchmarkResult to add extra columns to the benchmark // (iterations, preconditioned residue, true residue) struct MyBenchmarkResult : public BenchmarkResult struct MyBenchmarkResult : public BenchmarkResult<> { using HeaderElements = BenchmarkResult::HeaderElements; using RowElements = BenchmarkResult::RowElements; Loading
src/Benchmarks/SpMV/SpmvBenchmarkResult.h +3 −2 Original line number Diff line number Diff line Loading @@ -28,11 +28,12 @@ struct SpmvBenchmarkResult using HostVector = Containers::Vector< Real, Devices::Host, Index >; using BenchmarkVector = Containers::Vector< Real, Device, Index >; using typename Logger::HeaderElements; using typename Logger::RowElements; using typename BenchmarkResult< Logger >::HeaderElements; using typename BenchmarkResult< Logger >::RowElements; using BenchmarkResult< Logger >::stddev; using BenchmarkResult< Logger >::bandwidth; using BenchmarkResult< Logger >::speedup; using BenchmarkResult< Logger >::time; SpmvBenchmarkResult( const String& format, Loading
src/Benchmarks/SpMV/spmv.h +4 −4 Original line number Diff line number Diff line Loading @@ -295,7 +295,7 @@ benchmarkSpMVLegacy( BenchmarkType& benchmark, SpmvBenchmarkResult< Real, Devices::Cuda, int > cudaBenchmarkResults( MatrixInfo< HostMatrix >::getFormat(), csrResultVector, cudaOutVector, cudaMatrix.getNonzeroElementsCount() ); benchmark.time< Devices::Cuda >( resetCudaVectors, "GPU", spmvCuda, cudaBenchmarkResults ); #endif std::cout << std::endl; // std::cout << std::endl; } template< typename Real, Loading Loading @@ -325,12 +325,12 @@ benchmarkSpMV( BenchmarkType& benchmark, return; } benchmark.setMetadataColumns( BenchmarkType::MetadataColumns({ /*benchmark.setMetadataColumns( BenchmarkType::MetadataColumns({ { "matrix name", convertToString( inputFileName ) }, { "rows", convertToString( hostMatrix.getRows() ) }, { "columns", convertToString( hostMatrix.getColumns() ) }, { "matrix format", MatrixInfo< HostMatrix >::getFormat() } } )); } ));*/ const int elements = hostMatrix.getNonzeroElementsCount(); const double datasetSize = (double) elements * ( 2 * sizeof( Real ) + sizeof( int ) ) / oneGB; benchmark.setOperation( datasetSize ); Loading Loading @@ -371,7 +371,7 @@ benchmarkSpMV( BenchmarkType& benchmark, SpmvBenchmarkResult< Real, Devices::Cuda, int > cudaBenchmarkResults( MatrixInfo< HostMatrix >::getFormat(), csrResultVector, cudaOutVector, cudaMatrix.getNonzeroElementsCount() ); benchmark.time< Devices::Cuda >( resetCudaVectors, "GPU", spmvCuda, cudaBenchmarkResults ); #endif std::cout << std::endl; // std::cout << std::endl; } template< typename Real = double, Loading