Lines Matching refs:q_fixed

80     auto q_fixed = static_cast<int64_t>(std::round(q * (1LL << 31)));  in QuantizeMultiplier()  local
81 NN_RET_CHECK(q_fixed <= (1LL << 31)); in QuantizeMultiplier()
82 if (q_fixed == (1LL << 31)) { in QuantizeMultiplier()
83 q_fixed /= 2; in QuantizeMultiplier()
86 NN_RET_CHECK_LE(q_fixed, std::numeric_limits<int32_t>::max()); in QuantizeMultiplier()
99 q_fixed = 0; in QuantizeMultiplier()
101 *quantized_multiplier = static_cast<int32_t>(q_fixed); in QuantizeMultiplier()
126 int64_t q_fixed = static_cast<int64_t>(std::round(q * (1LL << 31))); in QuantizeMultiplierSmallerThanOne() local
127 NN_OPS_CHECK(q_fixed <= (1LL << 31)); in QuantizeMultiplierSmallerThanOne()
128 if (q_fixed == (1LL << 31)) { in QuantizeMultiplierSmallerThanOne()
129 q_fixed /= 2; in QuantizeMultiplierSmallerThanOne()
133 NN_OPS_CHECK(q_fixed <= std::numeric_limits<int32_t>::max()); in QuantizeMultiplierSmallerThanOne()
134 *quantized_multiplier = static_cast<int32_t>(q_fixed); in QuantizeMultiplierSmallerThanOne()
142 int64_t q_fixed = static_cast<int64_t>(std::round(q * (1LL << 31))); in QuantizeMultiplierGreaterThanOne() local
143 NN_OPS_CHECK(q_fixed <= (1LL << 31)); in QuantizeMultiplierGreaterThanOne()
144 if (q_fixed == (1LL << 31)) { in QuantizeMultiplierGreaterThanOne()
145 q_fixed /= 2; in QuantizeMultiplierGreaterThanOne()
149 NN_OPS_CHECK(q_fixed <= std::numeric_limits<int32_t>::max()); in QuantizeMultiplierGreaterThanOne()
150 *quantized_multiplier = static_cast<int32_t>(q_fixed); in QuantizeMultiplierGreaterThanOne()