#include #include "MatrixT.h" #include #include using namespace std; using namespace chrono; const int ROWS{200}; const int SAME{300}; const int COLS{400}; int main() { double totalTime = 0; for(int i = 0; i < 10; ++i) { auto start = high_resolution_clock::now(); MatrixVT a{ROWS, SAME}; MatrixVT b{SAME, COLS}; MakeRandomMatrix(a); MakeRandomMatrix(b); MatrixVT c = a * b; MatrixDT w{a}; MatrixDT x{b}; MatrixDT y = w * x; if (Compare(c, y) ) { cout << "They are the same" << endl; } else { cout << "ERROR THEY ARE DIFFERENT" << endl; } auto end = high_resolution_clock::now(); cout << "Time: " << duration(end - start).count() << " seconds\n"; totalTime += duration(end - start).count(); } cout << " Average Time " << totalTime/ 10 << " seconds" << endl; return 0; }