-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
52 lines (43 loc) · 1.11 KB
/
test.cpp
File metadata and controls
52 lines (43 loc) · 1.11 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
#include "matlib/matlib.h"
#include <iostream>
#include <sstream>
#include <unistd.h>
class koopman_nn {
public:
inline koopman_nn(std::vector<unsigned> topology) : m_topology(topology) {
unsigned num = 0;
for (int i = 1; i < m_topology.size(); i++)
num += m_topology[i] * m_topology[i - 1];
m_weights.reserve(num);
}
inline ~koopman_nn() {}
struct derivative {
koopman_nn *koop;
inline std::vector<double> operator()(std::vector<double> inputs){
return inputs;
}
};
struct cost {
koopman_nn *koop;
inline double operator()(std::vector<double> inputs){
return 0;
}
};
inline std::vector<double> operator()(std::vector<double> inputs = {}){
return inputs;
}
private:
std::vector<unsigned> m_topology;
std::vector<double> m_weights;
};
int test(int y){
return y * y;
}
int main(int, char **) {
thread_pool<8> tp;
std::vector<double> A = {2, 3, 4}, B = {1, 2, 1, -1, 1, -1, 2};
std::vector<double> C = {0, 0};
matlib::matmult_strassen(A, 1, 3, 0, B, 3, 2, 0, C, 2, 1, 0, tp);
std::cout << C[0] << std::endl;
return 0;
}