Lines Matching refs:numBits
99 static inline deUint32 reverseBits (deUint32 src, int numBits) in reverseBits() argument
101 DE_ASSERT(de::inRange(numBits, 0, 32)); in reverseBits()
103 for (int i = 0; i < numBits; i++) in reverseBits()
104 result |= ((src >> i) & 1) << (numBits-1-i); in reverseBits()
116 const int numBits = (high-low) + 1; in getBits() local
117 if (numBits == 0) in getBits()
119 DE_ASSERT(de::inRange(numBits, 1, 32)); in getBits()
120 return (src >> low) & ((1u<<numBits)-1); in getBits()
309 int numBits; member
311 ISEParams (ISEMode mode_, int numBits_) : mode(mode_), numBits(numBits_) {} in ISEParams()
344 case ISEMODE_TRIT: return divRoundUp(numValues*8, 5) + numValues*iseParams.numBits; in computeNumRequiredBits()
345 case ISEMODE_QUINT: return divRoundUp(numValues*7, 3) + numValues*iseParams.numBits; in computeNumRequiredBits()
346 case ISEMODE_PLAIN_BIT: return numValues*iseParams.numBits; in computeNumRequiredBits()
357 case ISEMODE_TRIT: return (1u << iseParams.numBits) * 3 - 1; in computeISERangeMax()
358 case ISEMODE_QUINT: return (1u << iseParams.numBits) * 5 - 1; in computeISERangeMax()
359 case ISEMODE_PLAIN_BIT: return (1u << iseParams.numBits) - 1; in computeISERangeMax()
659 static void encodeISETritBlock (BitAssignAccessStream& dst, int numBits, bool fromExplicitInputBloc… in encodeISETritBlock() argument
697 bitParts[i] = getBits(nonBlockInput[i], 0, numBits-1); in encodeISETritBlock()
698 tritParts[i] = nonBlockInput[i] >> numBits; in encodeISETritBlock()
714 dst.setNext(numBits, bitParts[0]); in encodeISETritBlock()
716 dst.setNext(numBits, bitParts[1]); in encodeISETritBlock()
718 dst.setNext(numBits, bitParts[2]); in encodeISETritBlock()
720 dst.setNext(numBits, bitParts[3]); in encodeISETritBlock()
722 dst.setNext(numBits, bitParts[4]); in encodeISETritBlock()
726 static void encodeISEQuintBlock (BitAssignAccessStream& dst, int numBits, bool fromExplicitInputBlo… in encodeISEQuintBlock() argument
754 bitParts[i] = getBits(nonBlockInput[i], 0, numBits-1); in encodeISEQuintBlock()
755 quintParts[i] = nonBlockInput[i] >> numBits; in encodeISEQuintBlock()
769 dst.setNext(numBits, bitParts[0]); in encodeISEQuintBlock()
771 dst.setNext(numBits, bitParts[1]); in encodeISEQuintBlock()
773 dst.setNext(numBits, bitParts[2]); in encodeISEQuintBlock()
777 static void encodeISEBitBlock (BitAssignAccessStream& dst, int numBits, deUint32 value) in encodeISEBitBlock() argument
779 DE_ASSERT(de::inRange(value, 0u, (1u<<numBits)-1)); in encodeISEBitBlock()
780 dst.setNext(numBits, value); in encodeISEBitBlock()
791 encodeISETritBlock(dst, params.numBits, input.isGivenInBlockForm, in encodeISE()
803 encodeISEQuintBlock(dst, params.numBits, input.isGivenInBlockForm, in encodeISE()
813 …encodeISEBitBlock(dst, params.numBits, input.isGivenInBlockForm ? input.value.block[i].bitValues[0… in encodeISE()
1447 const int iseBitMax = (1 << iseParams.numBits) - 1; in generateBlockCaseTestData()