Lines Matching refs:q_fixed
184 auto q_fixed = static_cast<int64_t>(std::round(q * (1ll << 31))); in QuantizeMultiplier() local
185 NN_RET_CHECK(q_fixed <= (1ll << 31)); in QuantizeMultiplier()
186 if (q_fixed == (1ll << 31)) { in QuantizeMultiplier()
187 q_fixed /= 2; in QuantizeMultiplier()
190 NN_RET_CHECK_LE(q_fixed, std::numeric_limits<int32_t>::max()); in QuantizeMultiplier()
203 q_fixed = 0; in QuantizeMultiplier()
205 *quantized_multiplier = static_cast<int32_t>(q_fixed); in QuantizeMultiplier()
230 int64_t q_fixed = static_cast<int64_t>(std::round(q * (1LL << 31))); in QuantizeMultiplierSmallerThanOne() local
231 NN_OPS_CHECK(q_fixed <= (1LL << 31)); in QuantizeMultiplierSmallerThanOne()
232 if (q_fixed == (1LL << 31)) { in QuantizeMultiplierSmallerThanOne()
233 q_fixed /= 2; in QuantizeMultiplierSmallerThanOne()
237 NN_OPS_CHECK(q_fixed <= std::numeric_limits<int32_t>::max()); in QuantizeMultiplierSmallerThanOne()
238 *quantized_multiplier = static_cast<int32_t>(q_fixed); in QuantizeMultiplierSmallerThanOne()
246 int64_t q_fixed = static_cast<int64_t>(std::round(q * (1LL << 31))); in QuantizeMultiplierGreaterThanOne() local
247 NN_OPS_CHECK(q_fixed <= (1LL << 31)); in QuantizeMultiplierGreaterThanOne()
248 if (q_fixed == (1LL << 31)) { in QuantizeMultiplierGreaterThanOne()
249 q_fixed /= 2; in QuantizeMultiplierGreaterThanOne()
253 NN_OPS_CHECK(q_fixed <= std::numeric_limits<int32_t>::max()); in QuantizeMultiplierGreaterThanOne()
254 *quantized_multiplier = static_cast<int32_t>(q_fixed); in QuantizeMultiplierGreaterThanOne()