1 #include <hayai.hpp> 2 #include <vector> 3 4 #include "matrixutils.h" 5 #include "munkres.h" 6 7 8 9 std::vector <Matrix <double> *> matrices; 10 11 size_t i {0}; 12 13 14 15 class MunkresFixture : public ::hayai::Fixture 16 { 17 public: SetUp()18 void SetUp () override 19 { 20 matrix = * matrices [i]; 21 } 22 23 Munkres munkres; 24 Matrix <double> matrix; 25 }; 26 27 28 29 BENCHMARK_F (MunkresFixture, Solve, 5000, 1) 30 { 31 munkres.solve (matrix); 32 } 33 34 35 36 // Main function. main(int argc,char * argv[])37int main (int argc, char * argv []) 38 { 39 read <double> (matrices); 40 41 hayai::ConsoleOutputter consoleOutputter; 42 hayai::Benchmarker::AddOutputter (consoleOutputter); 43 for (const auto x : matrices) { 44 hayai::Benchmarker::RunAllTests (); 45 ++i; 46 } 47 } 48