• 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_QUANT8_ASYMM,
7             .dimensions = {2},
8             .numberOfConsumers = 1,
9             .scale = 2.0f,
10             .zeroPoint = 0,
11             .lifetime = OperandLifeTime::MODEL_INPUT,
12             .location = {.poolIndex = 0, .offset = 0, .length = 0},
13         },
14         {
15             .type = OperandType::TENSOR_QUANT8_ASYMM,
16             .dimensions = {2},
17             .numberOfConsumers = 1,
18             .scale = 1.0f,
19             .zeroPoint = 0,
20             .lifetime = OperandLifeTime::MODEL_INPUT,
21             .location = {.poolIndex = 0, .offset = 0, .length = 0},
22         },
23         {
24             .type = OperandType::INT32,
25             .dimensions = {},
26             .numberOfConsumers = 1,
27             .scale = 0.0f,
28             .zeroPoint = 0,
29             .lifetime = OperandLifeTime::CONSTANT_COPY,
30             .location = {.poolIndex = 0, .offset = 0, .length = 4},
31         },
32         {
33             .type = OperandType::TENSOR_QUANT8_ASYMM,
34             .dimensions = {2},
35             .numberOfConsumers = 0,
36             .scale = 1.0f,
37             .zeroPoint = 0,
38             .lifetime = OperandLifeTime::MODEL_OUTPUT,
39             .location = {.poolIndex = 0, .offset = 0, .length = 0},
40         }
41     };
42 
43     const std::vector<Operation> operations = {
44         {
45             .type = OperationType::ADD,
46             .inputs = {0, 1, 2},
47             .outputs = {3},
48         }
49     };
50 
51     const std::vector<uint32_t> inputIndexes = {0, 1};
52     const std::vector<uint32_t> outputIndexes = {3};
53     std::vector<uint8_t> operandValues = {
54       0, 0, 0, 0
55     };
56     const std::vector<hidl_memory> pools = {};
57 
58     return {
59         .operands = operands,
60         .operations = operations,
61         .inputIndexes = inputIndexes,
62         .outputIndexes = outputIndexes,
63         .operandValues = operandValues,
64         .pools = pools,
65     };
66 }
67 
is_ignored(int i)68 bool is_ignored(int i) {
69   static std::set<int> ignore = {};
70   return ignore.find(i) != ignore.end();
71 }
72