| 7 | namespace wrapper { |
| 8 | |
| 9 | OperandType::OperandType(Type type, std::vector<uint32_t> d, float scale, |
| 10 | int32_t zeroPoint) |
| 11 | : type(type), dimensions(std::move(d)), channelQuant(dnn::nullopt) { |
| 12 | if (dimensions.empty()) { |
| 13 | if (!isScalarType(type)) { |
| 14 | dimensions = {1}; |
| 15 | } |
| 16 | } else { |
| 17 | DNN_ASSERT(!isScalarType(type), typeToStr(type), " ", dimensions); |
| 18 | } |
| 19 | operandType = { |
| 20 | .type = static_cast<int32_t>(type), |
| 21 | .dimensionCount = static_cast<uint32_t>(dimensions.size()), |
| 22 | .dimensions = dimensions.size() > 0 ? dimensions.data() : nullptr, |
| 23 | .scale = scale, |
| 24 | .zeroPoint = zeroPoint, |
| 25 | }; |
| 26 | } |
| 27 | OperandType::OperandType(Type type, std::vector<uint32_t> data, float scale, |
| 28 | int32_t zeroPoint, |
| 29 | SymmPerChannelQuantParams&& channelQuant) |
nothing calls this directly
no test coverage detected