1 // clang-format off
2 // Generated file (from: logical_and.mod.py). Do not edit
3 // Create the model
createTestModel()4 Model createTestModel() {
5     const std::vector<Operand> operands = {
6         {
7             .type = OperandType::TENSOR_BOOL8,
8             .dimensions = {1, 1, 1, 4},
9             .numberOfConsumers = 1,
10             .scale = 0.0f,
11             .zeroPoint = 0,
12             .lifetime = OperandLifeTime::MODEL_INPUT,
13             .location = {.poolIndex = 0, .offset = 0, .length = 0},
14         },
15         {
16             .type = OperandType::TENSOR_BOOL8,
17             .dimensions = {1, 1, 1, 4},
18             .numberOfConsumers = 1,
19             .scale = 0.0f,
20             .zeroPoint = 0,
21             .lifetime = OperandLifeTime::MODEL_INPUT,
22             .location = {.poolIndex = 0, .offset = 0, .length = 0},
23         },
24         {
25             .type = OperandType::TENSOR_BOOL8,
26             .dimensions = {1, 1, 1, 4},
27             .numberOfConsumers = 0,
28             .scale = 0.0f,
29             .zeroPoint = 0,
30             .lifetime = OperandLifeTime::MODEL_OUTPUT,
31             .location = {.poolIndex = 0, .offset = 0, .length = 0},
32         }
33     };
34 
35     const std::vector<Operation> operations = {
36         {
37             .type = OperationType::LOGICAL_AND,
38             .inputs = {0, 1},
39             .outputs = {2},
40         }
41     };
42 
43     const std::vector<uint32_t> inputIndexes = {0, 1};
44     const std::vector<uint32_t> outputIndexes = {2};
45     std::vector<uint8_t> operandValues = {};
46     const std::vector<hidl_memory> pools = {};
47 
48     return {
49         .operands = operands,
50         .operations = operations,
51         .inputIndexes = inputIndexes,
52         .outputIndexes = outputIndexes,
53         .operandValues = operandValues,
54         .pools = pools,
55     };
56 }
57 
is_ignored(int i)58 inline bool is_ignored(int i) {
59   static std::set<int> ignore = {};
60   return ignore.find(i) != ignore.end();
61 }
62 
63 // Create the model
createTestModel_dynamic_output_shape()64 Model createTestModel_dynamic_output_shape() {
65     const std::vector<Operand> operands = {
66         {
67             .type = OperandType::TENSOR_BOOL8,
68             .dimensions = {1, 1, 1, 4},
69             .numberOfConsumers = 1,
70             .scale = 0.0f,
71             .zeroPoint = 0,
72             .lifetime = OperandLifeTime::MODEL_INPUT,
73             .location = {.poolIndex = 0, .offset = 0, .length = 0},
74         },
75         {
76             .type = OperandType::TENSOR_BOOL8,
77             .dimensions = {1, 1, 1, 4},
78             .numberOfConsumers = 1,
79             .scale = 0.0f,
80             .zeroPoint = 0,
81             .lifetime = OperandLifeTime::MODEL_INPUT,
82             .location = {.poolIndex = 0, .offset = 0, .length = 0},
83         },
84         {
85             .type = OperandType::TENSOR_BOOL8,
86             .dimensions = {0, 0, 0, 0},
87             .numberOfConsumers = 0,
88             .scale = 0.0f,
89             .zeroPoint = 0,
90             .lifetime = OperandLifeTime::MODEL_OUTPUT,
91             .location = {.poolIndex = 0, .offset = 0, .length = 0},
92         }
93     };
94 
95     const std::vector<Operation> operations = {
96         {
97             .type = OperationType::LOGICAL_AND,
98             .inputs = {0, 1},
99             .outputs = {2},
100         }
101     };
102 
103     const std::vector<uint32_t> inputIndexes = {0, 1};
104     const std::vector<uint32_t> outputIndexes = {2};
105     std::vector<uint8_t> operandValues = {};
106     const std::vector<hidl_memory> pools = {};
107 
108     return {
109         .operands = operands,
110         .operations = operations,
111         .inputIndexes = inputIndexes,
112         .outputIndexes = outputIndexes,
113         .operandValues = operandValues,
114         .pools = pools,
115     };
116 }
117 
is_ignored_dynamic_output_shape(int i)118 inline bool is_ignored_dynamic_output_shape(int i) {
119   static std::set<int> ignore = {};
120   return ignore.find(i) != ignore.end();
121 }
122 
123 // Create the model
createTestModel_2()124 Model createTestModel_2() {
125     const std::vector<Operand> operands = {
126         {
127             .type = OperandType::TENSOR_BOOL8,
128             .dimensions = {1, 1, 1, 4},
129             .numberOfConsumers = 1,
130             .scale = 0.0f,
131             .zeroPoint = 0,
132             .lifetime = OperandLifeTime::MODEL_INPUT,
133             .location = {.poolIndex = 0, .offset = 0, .length = 0},
134         },
135         {
136             .type = OperandType::TENSOR_BOOL8,
137             .dimensions = {1, 1},
138             .numberOfConsumers = 1,
139             .scale = 0.0f,
140             .zeroPoint = 0,
141             .lifetime = OperandLifeTime::MODEL_INPUT,
142             .location = {.poolIndex = 0, .offset = 0, .length = 0},
143         },
144         {
145             .type = OperandType::TENSOR_BOOL8,
146             .dimensions = {1, 1, 1, 4},
147             .numberOfConsumers = 0,
148             .scale = 0.0f,
149             .zeroPoint = 0,
150             .lifetime = OperandLifeTime::MODEL_OUTPUT,
151             .location = {.poolIndex = 0, .offset = 0, .length = 0},
152         }
153     };
154 
155     const std::vector<Operation> operations = {
156         {
157             .type = OperationType::LOGICAL_AND,
158             .inputs = {0, 1},
159             .outputs = {2},
160         }
161     };
162 
163     const std::vector<uint32_t> inputIndexes = {0, 1};
164     const std::vector<uint32_t> outputIndexes = {2};
165     std::vector<uint8_t> operandValues = {};
166     const std::vector<hidl_memory> pools = {};
167 
168     return {
169         .operands = operands,
170         .operations = operations,
171         .inputIndexes = inputIndexes,
172         .outputIndexes = outputIndexes,
173         .operandValues = operandValues,
174         .pools = pools,
175     };
176 }
177 
is_ignored_2(int i)178 inline bool is_ignored_2(int i) {
179   static std::set<int> ignore = {};
180   return ignore.find(i) != ignore.end();
181 }
182 
183 // Create the model
createTestModel_dynamic_output_shape_2()184 Model createTestModel_dynamic_output_shape_2() {
185     const std::vector<Operand> operands = {
186         {
187             .type = OperandType::TENSOR_BOOL8,
188             .dimensions = {1, 1, 1, 4},
189             .numberOfConsumers = 1,
190             .scale = 0.0f,
191             .zeroPoint = 0,
192             .lifetime = OperandLifeTime::MODEL_INPUT,
193             .location = {.poolIndex = 0, .offset = 0, .length = 0},
194         },
195         {
196             .type = OperandType::TENSOR_BOOL8,
197             .dimensions = {1, 1},
198             .numberOfConsumers = 1,
199             .scale = 0.0f,
200             .zeroPoint = 0,
201             .lifetime = OperandLifeTime::MODEL_INPUT,
202             .location = {.poolIndex = 0, .offset = 0, .length = 0},
203         },
204         {
205             .type = OperandType::TENSOR_BOOL8,
206             .dimensions = {0, 0, 0, 0},
207             .numberOfConsumers = 0,
208             .scale = 0.0f,
209             .zeroPoint = 0,
210             .lifetime = OperandLifeTime::MODEL_OUTPUT,
211             .location = {.poolIndex = 0, .offset = 0, .length = 0},
212         }
213     };
214 
215     const std::vector<Operation> operations = {
216         {
217             .type = OperationType::LOGICAL_AND,
218             .inputs = {0, 1},
219             .outputs = {2},
220         }
221     };
222 
223     const std::vector<uint32_t> inputIndexes = {0, 1};
224     const std::vector<uint32_t> outputIndexes = {2};
225     std::vector<uint8_t> operandValues = {};
226     const std::vector<hidl_memory> pools = {};
227 
228     return {
229         .operands = operands,
230         .operations = operations,
231         .inputIndexes = inputIndexes,
232         .outputIndexes = outputIndexes,
233         .operandValues = operandValues,
234         .pools = pools,
235     };
236 }
237 
is_ignored_dynamic_output_shape_2(int i)238 inline bool is_ignored_dynamic_output_shape_2(int i) {
239   static std::set<int> ignore = {};
240   return ignore.find(i) != ignore.end();
241 }
242 
243