#include using namespace std; // TIMING CLASS class timer { public: timer() : start_timing(hi_res_clock::now()) {} void reset() { start_timing = hi_res_clock::now(); } double elapsed() const { return(std::chrono::duration_cast (hi_res_clock::now() - start_timing).count()); } private: typedef std::chrono::high_resolution_clock hi_res_clock; typedef std::chrono::duration< double, std::ratio<1> > second_; std::chrono::time_point start_timing; }; // REST OF HEADER FILES #include #include #include #include #include #include #include using namespace std; // PRINT HEADING FUNCTION void print_time(const string & heading , const double & t) { const int max_heading_length = 48; int l=heading.length(); int n_blanks = max_heading_length - l; cout << heading ; for(int i=0;i > matrix(nrows , vector< int > (ncols) ); t=timer_01.elapsed(); timer_01.reset(); print_time( heading , t); heading = " Check the data file"; string input_file_name = "test_file.csv"; ifstream input_file(input_file_name); if ( !( input_file.good() ) ) { cout << " File not found " << endl; cout << " Program terminates" << endl; exit(1); } t=timer_01.elapsed(); timer_01.reset(); print_time( heading , t); heading = " Read the input file"; for (i=0;i