Loading src/Benchmarks/Benchmarks.hpp +2 −3 Original line number Diff line number Diff line Loading @@ -146,7 +146,6 @@ time( ResetFunction reset, { result.time = std::numeric_limits<double>::quiet_NaN(); result.stddev = std::numeric_limits<double>::quiet_NaN(); FunctionTimer< Device > functionTimer; // run the monitor main loop Solvers::SolverMonitorThread monitor_thread( monitor ); Loading @@ -157,10 +156,10 @@ time( ResetFunction reset, std::string errorMessage; try { if( this->reset ) std::tie( result.loops, result.time, result.stddev ) = functionTimer.timeFunction( compute, reset, loops, minTime, monitor ); std::tie( result.loops, result.time, result.stddev ) = timeFunction< Device >( compute, reset, loops, minTime, monitor ); else { auto noReset = [] () {}; std::tie( result.loops, result.time, result.stddev ) = functionTimer.timeFunction( compute, noReset, loops, minTime, monitor ); std::tie( result.loops, result.time, result.stddev ) = timeFunction< Device >( compute, noReset, loops, minTime, monitor ); } } catch ( const std::exception& e ) { Loading src/Benchmarks/FunctionTimer.h +51 −55 Original line number Diff line number Diff line Loading @@ -23,14 +23,11 @@ namespace TNL { namespace Benchmarks { template< typename Device > class FunctionTimer { public: // returns a tuple of (loops, mean, stddev) where loops is the number of // performed loops (i.e. timing samples), mean is the arithmetic mean of the // computation times and stddev is the sample standard deviation template< typename ComputeFunction, template< typename Device, typename ComputeFunction, typename ResetFunction, typename Monitor = TNL::Solvers::IterativeSolverMonitor< double, int > > std::tuple< int, double, double > Loading Loading @@ -89,7 +86,6 @@ public: stddev = std::numeric_limits<double>::quiet_NaN(); return std::make_tuple( loops, mean, stddev ); } }; } // namespace Benchmarks } // namespace TNL Loading
src/Benchmarks/Benchmarks.hpp +2 −3 Original line number Diff line number Diff line Loading @@ -146,7 +146,6 @@ time( ResetFunction reset, { result.time = std::numeric_limits<double>::quiet_NaN(); result.stddev = std::numeric_limits<double>::quiet_NaN(); FunctionTimer< Device > functionTimer; // run the monitor main loop Solvers::SolverMonitorThread monitor_thread( monitor ); Loading @@ -157,10 +156,10 @@ time( ResetFunction reset, std::string errorMessage; try { if( this->reset ) std::tie( result.loops, result.time, result.stddev ) = functionTimer.timeFunction( compute, reset, loops, minTime, monitor ); std::tie( result.loops, result.time, result.stddev ) = timeFunction< Device >( compute, reset, loops, minTime, monitor ); else { auto noReset = [] () {}; std::tie( result.loops, result.time, result.stddev ) = functionTimer.timeFunction( compute, noReset, loops, minTime, monitor ); std::tie( result.loops, result.time, result.stddev ) = timeFunction< Device >( compute, noReset, loops, minTime, monitor ); } } catch ( const std::exception& e ) { Loading
src/Benchmarks/FunctionTimer.h +51 −55 Original line number Diff line number Diff line Loading @@ -23,14 +23,11 @@ namespace TNL { namespace Benchmarks { template< typename Device > class FunctionTimer { public: // returns a tuple of (loops, mean, stddev) where loops is the number of // performed loops (i.e. timing samples), mean is the arithmetic mean of the // computation times and stddev is the sample standard deviation template< typename ComputeFunction, template< typename Device, typename ComputeFunction, typename ResetFunction, typename Monitor = TNL::Solvers::IterativeSolverMonitor< double, int > > std::tuple< int, double, double > Loading Loading @@ -89,7 +86,6 @@ public: stddev = std::numeric_limits<double>::quiet_NaN(); return std::make_tuple( loops, mean, stddev ); } }; } // namespace Benchmarks } // namespace TNL