• Home
  • Raw
  • Download

Lines Matching refs:operand

140     for (size_t operand = 0; operand < model.operands.size(); ++operand) {  in mutateOperandTypeTest()  local
143 std::to_string(operand) + " set to value " + in mutateOperandTypeTest()
145 validate(device, message, model, [operand, invalidOperandType](Model* model) { in mutateOperandTypeTest()
146 model->operands[operand].type = static_cast<OperandType>(invalidOperandType); in mutateOperandTypeTest()
178 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in mutateOperandRankTest() local
179 const uint32_t invalidRank = getInvalidRank(model.operands[operand].type); in mutateOperandRankTest()
183 const std::string message = "mutateOperandRankTest: operand " + std::to_string(operand) + in mutateOperandRankTest()
185 validate(device, message, model, [operand, invalidRank](Model* model) { in mutateOperandRankTest()
186 model->operands[operand].dimensions = std::vector<uint32_t>(invalidRank, 0); in mutateOperandRankTest()
218 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in mutateOperandScaleTest() local
219 const float invalidScale = getInvalidScale(model.operands[operand].type); in mutateOperandScaleTest()
220 const std::string message = "mutateOperandScaleTest: operand " + std::to_string(operand) + in mutateOperandScaleTest()
222 validate(device, message, model, [operand, invalidScale](Model* model) { in mutateOperandScaleTest()
223 model->operands[operand].scale = invalidScale; in mutateOperandScaleTest()
257 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in mutateOperandZeroPointTest() local
259 getInvalidZeroPoints(model.operands[operand].type); in mutateOperandZeroPointTest()
262 std::to_string(operand) + " has zero point of " + in mutateOperandZeroPointTest()
264 validate(device, message, model, [operand, invalidZeroPoint](Model* model) { in mutateOperandZeroPointTest()
265 model->operands[operand].zeroPoint = invalidZeroPoint; in mutateOperandZeroPointTest()
278 static void mutateOperand(Operand* operand, OperandType type) { in mutateOperand() argument
279 Operand newOperand = *operand; in mutateOperand()
295 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1}); in mutateOperand()
301 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1}); in mutateOperand()
309 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1}); in mutateOperand()
310 newOperand.scale = operand->scale != 0.0f ? operand->scale : 1.0f; in mutateOperand()
314 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1}); in mutateOperand()
321 operand->dimensions.size() > 0 ? static_cast<size_t>(operand->dimensions[0]) : 0); in mutateOperand()
332 *operand = newOperand; in mutateOperand()
335 static bool mutateOperationOperandTypeSkip(size_t operand, OperandType type, const Model& model) { in mutateOperationOperandTypeSkip() argument
337 if (type == model.operands[operand].type || type == OperandType::OEM || in mutateOperationOperandTypeSkip()
358 if (operand == operation.inputs[1]) { in mutateOperationOperandTypeSkip()
372 if (operand == operation.inputs[0] && in mutateOperationOperandTypeSkip()
378 if (operand == operation.inputs[0] && in mutateOperationOperandTypeSkip()
384 if (operand == operation.outputs[0] && in mutateOperationOperandTypeSkip()
393 if (operand == operation.inputs[1] && in mutateOperationOperandTypeSkip()
407 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in mutateOperationOperandTypeTest() local
409 if (mutateOperationOperandTypeSkip(operand, invalidOperandType, model)) { in mutateOperationOperandTypeTest()
413 std::to_string(operand) + " set to type " + in mutateOperationOperandTypeTest()
415 validate(device, message, model, [operand, invalidOperandType](Model* model) { in mutateOperationOperandTypeTest()
416 mutateOperand(&model->operands[operand], invalidOperandType); in mutateOperationOperandTypeTest()
500 static bool removeOperandSkip(size_t operand, const Model& model) { in removeOperandSkip() argument
506 if (operand == outOprand) { in removeOperandSkip()
516 if (operand == outOprand) { in removeOperandSkip()
526 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in removeOperandTest() local
527 if (removeOperandSkip(operand, model)) { in removeOperandTest()
530 const std::string message = "removeOperandTest: operand " + std::to_string(operand); in removeOperandTest()
532 [operand](Model* model) { removeOperand(model, operand); }); in removeOperandTest()
539 for (uint32_t operand : model->operations[index].inputs) { in removeOperation() local
540 model->operands[operand].numberOfConsumers--; in removeOperation()
631 uint32_t operand = model->operations[operation].inputs[input]; in removeOperationInputTest() local
632 model->operands[operand].numberOfConsumers--; in removeOperationInputTest()