-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSource.cpp
More file actions
58 lines (48 loc) · 1.09 KB
/
Source.cpp
File metadata and controls
58 lines (48 loc) · 1.09 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
#include "tests.hpp"
#include "Training.hpp"
class A{
virtual void a() = 0;
};
int main() {
Timer::start();
size_t x = 0;
for(size_t i = 0; i < 1000000000; i++){
x += AbstractTensor::indexing(1,2,3,4,5,i,i/2,i/4, i/5);
}
std::cout << "Time 1: " << Timer::time() << " final value: " << x << std::endl;
x = 0;
Timer::start();
for(size_t i = 0; i < 1000000000; i++){
x += AbstractTensor::indexing_in_one(1,2,3,4,5,i,i/2,i/4, i/5);
}
std::cout << "Time 2: " << Timer::time() << " final value: " << x << std::endl;
//Test::XORTest();
//Test::CNNTest();
//BigCNNTest();
//Test::mult();
//Test::ElementTimed();
/* class A{
public:
int a;
A(int b){
a = b;
}
static int v(A* c, void*){
std::cout << c->a << std::endl;
return 0;
}
};
AsyncJob<A> jbs(A::v, 0);
for(int i = 0; i < 100; i++){
jbs.addJob(new A(i));
} */
//Test::tensor_copy();
//Test::testAll();
//Test::simpleXOR();
//Test::convBackprop();
//Test::testAll();
//Test::conv();
//std::string a;
//std::cin >> a;
}