source: branches/2965_CancelablePersistence/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/src/instruction.h @ 16433

Last change on this file since 16433 was 16433, checked in by pfleck, 8 months ago

#2965 Merged recent trunk changes.
Enabled the prepared hooks that allows to cancel the save file using the recently introduced cancelable progressbars (in FileManager).

File size: 778 bytes
Line 
1#ifndef INSTRUCTION_H
2#define INSTRUCTION_H
3
4#include <cstdint>
5
6#include "vector_operations.h"
7
8enum 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
32struct 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.