• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated code. Do not edit
2 // Create the model
createTestModel()3 Model createTestModel() {
4     const std::vector<Operand> operands = {
5         {
6             .type = OperandType::TENSOR_FLOAT32,
7             .dimensions = {2, 3},
8             .numberOfConsumers = 1,
9             .scale = 0.0f,
10             .zeroPoint = 0,
11             .lifetime = OperandLifeTime::MODEL_INPUT,
12             .location = {.poolIndex = 0, .offset = 0, .length = 0},
13         },
14         {
15             .type = OperandType::TENSOR_FLOAT32,
16             .dimensions = {4, 3},
17             .numberOfConsumers = 1,
18             .scale = 0.0f,
19             .zeroPoint = 0,
20             .lifetime = OperandLifeTime::MODEL_INPUT,
21             .location = {.poolIndex = 0, .offset = 0, .length = 0},
22         },
23         {
24             .type = OperandType::TENSOR_FLOAT32,
25             .dimensions = {4, 10},
26             .numberOfConsumers = 1,
27             .scale = 0.0f,
28             .zeroPoint = 0,
29             .lifetime = OperandLifeTime::MODEL_INPUT,
30             .location = {.poolIndex = 0, .offset = 0, .length = 0},
31         },
32         {
33             .type = OperandType::TENSOR_FLOAT32,
34             .dimensions = {4},
35             .numberOfConsumers = 1,
36             .scale = 0.0f,
37             .zeroPoint = 0,
38             .lifetime = OperandLifeTime::MODEL_INPUT,
39             .location = {.poolIndex = 0, .offset = 0, .length = 0},
40         },
41         {
42             .type = OperandType::TENSOR_FLOAT32,
43             .dimensions = {2, 40},
44             .numberOfConsumers = 1,
45             .scale = 0.0f,
46             .zeroPoint = 0,
47             .lifetime = OperandLifeTime::MODEL_INPUT,
48             .location = {.poolIndex = 0, .offset = 0, .length = 0},
49         },
50         {
51             .type = OperandType::TENSOR_INT32,
52             .dimensions = {1},
53             .numberOfConsumers = 1,
54             .scale = 0.0f,
55             .zeroPoint = 0,
56             .lifetime = OperandLifeTime::MODEL_INPUT,
57             .location = {.poolIndex = 0, .offset = 0, .length = 0},
58         },
59         {
60             .type = OperandType::TENSOR_INT32,
61             .dimensions = {1},
62             .numberOfConsumers = 1,
63             .scale = 0.0f,
64             .zeroPoint = 0,
65             .lifetime = OperandLifeTime::MODEL_INPUT,
66             .location = {.poolIndex = 0, .offset = 0, .length = 0},
67         },
68         {
69             .type = OperandType::TENSOR_FLOAT32,
70             .dimensions = {2, 40},
71             .numberOfConsumers = 0,
72             .scale = 0.0f,
73             .zeroPoint = 0,
74             .lifetime = OperandLifeTime::MODEL_OUTPUT,
75             .location = {.poolIndex = 0, .offset = 0, .length = 0},
76         },
77         {
78             .type = OperandType::TENSOR_FLOAT32,
79             .dimensions = {2, 4},
80             .numberOfConsumers = 0,
81             .scale = 0.0f,
82             .zeroPoint = 0,
83             .lifetime = OperandLifeTime::MODEL_OUTPUT,
84             .location = {.poolIndex = 0, .offset = 0, .length = 0},
85         }
86     };
87 
88     const std::vector<Operation> operations = {
89         {
90             .type = OperationType::SVDF,
91             .inputs = {0, 1, 2, 3, 4, 5, 6},
92             .outputs = {7, 8},
93         }
94     };
95 
96     const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4, 5, 6};
97     const std::vector<uint32_t> outputIndexes = {7, 8};
98     std::vector<uint8_t> operandValues = {};
99     const std::vector<hidl_memory> pools = {};
100 
101     return {
102         .operands = operands,
103         .operations = operations,
104         .inputIndexes = inputIndexes,
105         .outputIndexes = outputIndexes,
106         .operandValues = operandValues,
107         .pools = pools,
108     };
109 }
110 
is_ignored(int i)111 bool is_ignored(int i) {
112   static std::set<int> ignore = {0};
113   return ignore.find(i) != ignore.end();
114 }
115