• Home
  • Raw
  • Download

Lines Matching refs:operand

124     for (size_t operand = 0; operand < model.operands.size(); ++operand) {  in mutateOperandTypeTest()  local
127 std::to_string(operand) + " set to value " + in mutateOperandTypeTest()
129 validate(device, message, model, [operand, invalidOperandType](Model* model) { in mutateOperandTypeTest()
130 model->operands[operand].type = static_cast<OperandType>(invalidOperandType); in mutateOperandTypeTest()
154 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in mutateOperandRankTest() local
155 const uint32_t invalidRank = getInvalidRank(model.operands[operand].type); in mutateOperandRankTest()
156 const std::string message = "mutateOperandRankTest: operand " + std::to_string(operand) + in mutateOperandRankTest()
158 validate(device, message, model, [operand, invalidRank](Model* model) { in mutateOperandRankTest()
159 model->operands[operand].dimensions = std::vector<uint32_t>(invalidRank, 0); in mutateOperandRankTest()
183 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in mutateOperandScaleTest() local
184 const float invalidScale = getInvalidScale(model.operands[operand].type); in mutateOperandScaleTest()
185 const std::string message = "mutateOperandScaleTest: operand " + std::to_string(operand) + in mutateOperandScaleTest()
187 validate(device, message, model, [operand, invalidScale](Model* model) { in mutateOperandScaleTest()
188 model->operands[operand].scale = invalidScale; in mutateOperandScaleTest()
211 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in mutateOperandZeroPointTest() local
213 getInvalidZeroPoints(model.operands[operand].type); in mutateOperandZeroPointTest()
216 std::to_string(operand) + " has zero point of " + in mutateOperandZeroPointTest()
218 validate(device, message, model, [operand, invalidZeroPoint](Model* model) { in mutateOperandZeroPointTest()
219 model->operands[operand].zeroPoint = invalidZeroPoint; in mutateOperandZeroPointTest()
232 static void mutateOperand(Operand* operand, OperandType type) { in mutateOperand() argument
233 Operand newOperand = *operand; in mutateOperand()
245 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1}); in mutateOperand()
251 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1}); in mutateOperand()
256 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1}); in mutateOperand()
257 newOperand.scale = operand->scale != 0.0f ? operand->scale : 1.0f; in mutateOperand()
264 *operand = newOperand; in mutateOperand()
267 static bool mutateOperationOperandTypeSkip(size_t operand, const V1_0::Model& model) { in mutateOperationOperandTypeSkip() argument
274 if (operation.type == OperationType::LSH_PROJECTION && operand == operation.inputs[1]) { in mutateOperationOperandTypeSkip()
282 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in mutateOperationOperandTypeTest() local
283 if (mutateOperationOperandTypeSkip(operand, model)) { in mutateOperationOperandTypeTest()
288 if (invalidOperandType == model.operands[operand].type || in mutateOperationOperandTypeTest()
294 std::to_string(operand) + " set to type " + in mutateOperationOperandTypeTest()
296 validate(device, message, model, [operand, invalidOperandType](Model* model) { in mutateOperationOperandTypeTest()
297 mutateOperand(&model->operands[operand], invalidOperandType); in mutateOperationOperandTypeTest()
385 for (size_t operand = 0; operand < model.operands.size(); ++operand) { in removeOperandTest() local
386 const std::string message = "removeOperandTest: operand " + std::to_string(operand); in removeOperandTest()
388 [operand](Model* model) { removeOperand(model, operand); }); in removeOperandTest()
395 for (uint32_t operand : model->operations[index].inputs) { in removeOperation() local
396 model->operands[operand].numberOfConsumers--; in removeOperation()
426 uint32_t operand = model->operations[operation].inputs[input]; in removeOperationInputTest() local
427 model->operands[operand].numberOfConsumers--; in removeOperationInputTest()