Line | |
---|
1 | #ifndef INSTRUCTION_H
|
---|
2 | #define INSTRUCTION_H
|
---|
3 |
|
---|
4 | #include <cstdint>
|
---|
5 |
|
---|
6 | #include "vector_operations.h"
|
---|
7 |
|
---|
8 | enum OpCodes : uint8_t
|
---|
9 | {
|
---|
10 | // same values as in OpCodes.cs
|
---|
11 | Add = 1,
|
---|
12 | Sub = 2,
|
---|
13 | Mul = 3,
|
---|
14 | Div = 4,
|
---|
15 | Sin = 5,
|
---|
16 | Cos = 6,
|
---|
17 | Tan = 7,
|
---|
18 | Log = 8,
|
---|
19 | Exp = 9,
|
---|
20 | Var = 18,
|
---|
21 | Const = 20,
|
---|
22 | Power = 22,
|
---|
23 | Root = 23,
|
---|
24 | Square = 28,
|
---|
25 | Sqrt = 29,
|
---|
26 | Absolute = 48,
|
---|
27 | AnalyticalQuotient = 49,
|
---|
28 | Cube = 50,
|
---|
29 | CubeRoot = 51
|
---|
30 | };
|
---|
31 |
|
---|
32 | struct instruction
|
---|
33 | {
|
---|
34 | // from Instruction.cs
|
---|
35 | uint8_t opcode;
|
---|
36 | uint16_t narg;
|
---|
37 |
|
---|
38 | int childIndex;
|
---|
39 |
|
---|
40 | // from LinearInstruction.cs
|
---|
41 | double value;
|
---|
42 | double weight; // necessary for variables
|
---|
43 |
|
---|
44 | // pointer to data
|
---|
45 | double *buf;
|
---|
46 | double *data;
|
---|
47 | };
|
---|
48 |
|
---|
49 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.