-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
30 lines (26 loc) · 942 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "cmatrix.h"
#include "cmatrix.cpp" // This shouldn't be necessary, need to figure out why I can't compile without it
#include "mtcmatrix.h"
#include "mtcmatrix.cpp" // This shouldn't be necessary either
#include <chrono>
using namespace std;
using Clock = std::chrono::steady_clock;
using std::chrono::time_point;
using std::chrono::duration_cast;
using std::chrono::milliseconds;
//using namespace std::literals::chrono_literals;
using std::this_thread::sleep_for;
int main(){
time_point<Clock> start = Clock::now();
vector<int> t1;
for(int i=1; i<10001; i++)
t1.push_back(i);
cmatrix<int> m1(t1, 100, 100);
cmatrix<int> m2(t1, 100, 100);
cmatrix<int> m3 = m1 * m2;
//m3.print();
time_point<Clock> end = Clock::now();
milliseconds diff = duration_cast<milliseconds>(end - start);
std::cout << diff.count() << "ms" << std::endl;
return 0;
}