Lines Matching refs:numBitsToDiscard
177 * the last `numBitsToDiscard` bits.
179 * \param numBitsToDiscard number of (least significant) bits to discard
180 * \return The rounded value with the last `numBitsToDiscard` removed
182 static deUint32 roundToNearestEven (deUint32 val, const deUint32 numBitsToDiscard)
184 const deUint32 lastBits = val & ((1 << numBitsToDiscard) - 1);
185 const deUint32 headBit = val & (1 << (numBitsToDiscard - 1));
187 DE_ASSERT(numBitsToDiscard > 0 && numBitsToDiscard < 32); /* Make sure no overflow. */
188 val >>= numBitsToDiscard;
334 * the last `numBitsToDiscard` bits.
336 * \param numBitsToDiscard number of (least significant) bits to discard
337 * \return The rounded value with the last `numBitsToDiscard` removed
339 static deUint64 roundToNearestEven64 (deUint64 val, const deUint64 numBitsToDiscard)
341 const deUint64 lastBits = val & (((deUint64)1 << numBitsToDiscard) - 1);
342 const deUint64 headBit = val & ((deUint64)1 << (numBitsToDiscard - 1));
344 DE_ASSERT(numBitsToDiscard > 0 && numBitsToDiscard < 64); /* Make sure no overflow. */
345 val >>= numBitsToDiscard;