Home
last modified time | relevance | path

Searched refs:numBits (Results 1 – 25 of 70) sorted by relevance

123

/external/deqp/framework/delibs/debase/
DdeInt32Test.c74 int numBits; in deInt32_selfTest() local
98 for (numBits = 0; numBits < 32; numBits++) in deInt32_selfTest()
100 DE_TEST_ASSERT(dePop32(1<<numBits) == 1); in deInt32_selfTest()
101 DE_TEST_ASSERT(dePop32(~(1<<numBits)) == 31); in deInt32_selfTest()
105 for (numBits = 0; numBits < 32; numBits++) in deInt32_selfTest()
107 deUint32 val = (1u<<numBits); in deInt32_selfTest()
111 DE_TEST_ASSERT(exp == numBits); in deInt32_selfTest()
115 for (numBits = 0; numBits < 32; numBits++) in deInt32_selfTest()
117 int NUM_ITERS = deMax32(16, 1 << (numBits/2)); in deInt32_selfTest()
124 deUint32 val = (deRandom_getUint32(&rnd) & ((1u<<numBits)-1)) | (1u<<numBits); in deInt32_selfTest()
[all …]
DdeInt32.h485 DE_INLINE deUint32 deBitMask32 (int leastSignificantBitNdx, int numBits) in deBitMask32() argument
488 DE_ASSERT(deInRange32(numBits, 0, 32)); in deBitMask32()
489 DE_ASSERT(deInRange32(leastSignificantBitNdx+numBits, 0, 32)); in deBitMask32()
491 if (numBits < 32 && leastSignificantBitNdx < 32) in deBitMask32()
492 return ((1u<<numBits)-1u) << (deUint32)leastSignificantBitNdx; in deBitMask32()
493 else if (numBits == 0 && leastSignificantBitNdx == 32) in deBitMask32()
497 DE_ASSERT(numBits == 32 && leastSignificantBitNdx == 0); in deBitMask32()
502 DE_INLINE deUint32 deUintMaxValue32 (int numBits) in deUintMaxValue32() argument
504 DE_ASSERT(deInRange32(numBits, 1, 32)); in deUintMaxValue32()
505 if (numBits < 32) in deUintMaxValue32()
[all …]
DdeMathTest.c77 int numBits; in testInt32ToFloat() local
85 for (numBits = 0; numBits < 32; ++numBits) in testInt32ToFloat()
88 …const deInt64 x = (deInt64)(sign == -1 ? (-1) : (+1)) * (1LL << (deInt64)numBits) + (deInt64)delta; in testInt32ToFloat()
/external/llvm/include/llvm/ADT/
DAPInt.h172 void fromString(unsigned numBits, StringRef str, uint8_t radix);
184 void initSlowCase(unsigned numBits, uint64_t val, bool isSigned);
236 APInt(unsigned numBits, uint64_t val, bool isSigned = false)
237 : BitWidth(numBits), VAL(0) { in BitWidth() argument
242 initSlowCase(numBits, val, isSigned); in BitWidth()
253 APInt(unsigned numBits, ArrayRef<uint64_t> bigVal);
262 APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]);
275 APInt(unsigned numBits, StringRef str, uint8_t radix);
422 static APInt getMaxValue(unsigned numBits) { in getMaxValue() argument
423 return getAllOnesValue(numBits); in getMaxValue()
[all …]
DAPSInt.h267 static APSInt getMaxValue(uint32_t numBits, bool Unsigned) { in getMaxValue() argument
268 return APSInt(Unsigned ? APInt::getMaxValue(numBits) in getMaxValue()
269 : APInt::getSignedMaxValue(numBits), Unsigned); in getMaxValue()
274 static APSInt getMinValue(uint32_t numBits, bool Unsigned) { in getMinValue() argument
275 return APSInt(Unsigned ? APInt::getMinValue(numBits) in getMinValue()
276 : APInt::getSignedMinValue(numBits), Unsigned); in getMinValue()
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/
DSecureRandom2Test.java163 int numBits = 29; in test_nextJ() local
164 int random = mySecureRandom.getNext(numBits); in test_nextJ()
165 assertEquals(numBits, Integer.bitCount(random)); in test_nextJ()
167 numBits = 0; in test_nextJ()
168 random = mySecureRandom.getNext(numBits); in test_nextJ()
169 assertEquals(numBits, Integer.bitCount(random)); in test_nextJ()
171 numBits = 40; in test_nextJ()
172 random = mySecureRandom.getNext(numBits); in test_nextJ()
175 numBits = -1; in test_nextJ()
176 random = mySecureRandom.getNext(numBits); in test_nextJ()
[all …]
/external/guava/guava-tests/test/com/google/common/math/
DMathBenchmarking.java43 static BigInteger randomPositiveBigInteger(int numBits) { in randomPositiveBigInteger() argument
44 int digits = RANDOM_SOURCE.nextInt(numBits) + 1; in randomPositiveBigInteger()
48 static BigInteger randomNonNegativeBigInteger(int numBits) { in randomNonNegativeBigInteger() argument
49 int digits = RANDOM_SOURCE.nextInt(numBits) + 1; in randomNonNegativeBigInteger()
53 static BigInteger randomNonZeroBigInteger(int numBits) { in randomNonZeroBigInteger() argument
54 BigInteger result = randomPositiveBigInteger(numBits); in randomNonZeroBigInteger()
58 static BigInteger randomBigInteger(int numBits) { in randomBigInteger() argument
59 BigInteger result = randomNonNegativeBigInteger(numBits); in randomBigInteger()
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/boxes/mp4/objectdescriptors/
DBitWriterBuffer.java16 public void writeBits(int i, int numBits) { in writeBits() argument
17 …assert i <= ((1 << numBits)-1): String.format("Trying to write a value bigger (%s) than the number… in writeBits()
18 …the value before writing it and make your code is really working as intended.", i, (1<<numBits)-1); in writeBits()
21 if (numBits <= left) { in writeBits()
24 current += i << (left - numBits); in writeBits()
26 position += numBits; in writeBits()
28 int bitsSecondWrite = numBits - left; in writeBits()
/external/mesa3d/src/gallium/auxiliary/cso_cache/
Dcso_hash.c47 static int primeForNumBits(int numBits) in primeForNumBits() argument
49 return (1 << numBits) + prime_deltas[numBits]; in primeForNumBits()
58 int numBits = 0; in countBits() local
63 numBits++; in countBits()
66 if (numBits >= (int)sizeof(prime_deltas)) { in countBits()
67 numBits = sizeof(prime_deltas) - 1; in countBits()
68 } else if (primeForNumBits(numBits) < hint) { in countBits()
69 ++numBits; in countBits()
71 return numBits; in countBits()
86 short numBits; member
[all …]
/external/lzma/Java/SevenZip/
DLzmaBench.java36 public int GetRnd(int numBits) in GetRnd() argument
39 if (NumBits > numBits) in GetRnd()
41 result = Value & ((1 << numBits) - 1); in GetRnd()
42 Value >>>= numBits; in GetRnd() local
43 NumBits -= numBits; in GetRnd()
46 numBits -= NumBits; in GetRnd()
47 result = (Value << numBits); in GetRnd()
49 result |= Value & (((int)1 << numBits) - 1); in GetRnd()
50 Value >>>= numBits; in GetRnd() local
51 NumBits = 32 - numBits; in GetRnd()
[all …]
/external/lzma/CS/7zip/Compress/LzmaAlone/
DLzmaBench.cs41 public UInt32 GetRnd(int numBits) in GetRnd() argument
44 if (NumBits > numBits) in GetRnd()
46 result = Value & (((UInt32)1 << numBits) - 1); in GetRnd()
47 Value >>= numBits; in GetRnd()
48 NumBits -= numBits; in GetRnd()
51 numBits -= NumBits; in GetRnd()
52 result = (Value << numBits); in GetRnd()
54 result |= Value & (((UInt32)1 << numBits) - 1); in GetRnd()
55 Value >>= numBits; in GetRnd()
56 NumBits = 32 - numBits; in GetRnd()
[all …]
/external/antlr/antlr-3.4/runtime/ObjC/Framework/test/runtime/sets/
DANTLRBitSetTest.m20 CFIndex actual = (CFIndex)[bitSet numBits];
43 CFIndex actual = (CFIndex)[bitSet numBits];
56 CFIndex actual = (CFIndex)[bitSet numBits];
66 CFIndex actual = (CFIndex)[bitSet numBits];
71 actual = [bitSet numBits];
82 CFIndex actual = (CFIndex)[copy numBits];
83 …tEquals(actual, (CFIndex)[bitSet numBits], @"There should be three bits set in bitvector. But I ha…
/external/lzma/CPP/7zip/Compress/
DRangeCoder.h75 void EncodeDirectBits(UInt32 value, int numBits) in EncodeDirectBits() argument
77 for (numBits--; numBits >= 0; numBits--) in EncodeDirectBits()
80 Low += Range & (0 - ((value >> numBits) & 1)); in EncodeDirectBits()
/external/antlr/antlr-3.4/runtime/C/src/
Dantlr3bitset.c76 antlr3BitsetNew(ANTLR3_UINT32 numBits) in antlr3BitsetNew() argument
93 if (numBits < (8 * ANTLR3_BITSET_BITS)) in antlr3BitsetNew()
95 numBits = 8 * ANTLR3_BITSET_BITS; in antlr3BitsetNew()
101 numelements = ((numBits -1) >> ANTLR3_BITSET_LOG_BITS) + 1; in antlr3BitsetNew()
132 bitset->numBits = antlr3BitsetNumBits; in antlr3BitsetSetAPI()
649 ANTLR3_UINT32 numBits; // How many bits are in the set in antlr3BitsetToIntList() local
656 numBits = bitset->numBits(bitset); in antlr3BitsetToIntList()
669 for (i = 0, index = 1; i<numBits; i++) in antlr3BitsetToIntList()
/external/deqp/modules/gles3/functional/
Des3fASTCDecompressionCases.cpp99 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()
[all …]
/external/deqp/framework/common/
DtcuTextureUtil.cpp1292 static tcu::UVec4 getNBitUnsignedIntegerVec4MaxValue (const tcu::IVec4& numBits) in getNBitUnsignedIntegerVec4MaxValue() argument
1294 return tcu::UVec4((numBits[0] > 0) ? (deUintMaxValue32(numBits[0])) : (0), in getNBitUnsignedIntegerVec4MaxValue()
1295 (numBits[1] > 0) ? (deUintMaxValue32(numBits[1])) : (0), in getNBitUnsignedIntegerVec4MaxValue()
1296 (numBits[2] > 0) ? (deUintMaxValue32(numBits[2])) : (0), in getNBitUnsignedIntegerVec4MaxValue()
1297 (numBits[3] > 0) ? (deUintMaxValue32(numBits[3])) : (0)); in getNBitUnsignedIntegerVec4MaxValue()
1300 static tcu::IVec4 getNBitSignedIntegerVec4MaxValue (const tcu::IVec4& numBits) in getNBitSignedIntegerVec4MaxValue() argument
1302 return tcu::IVec4((numBits[0] > 0) ? (deIntMaxValue32(numBits[0])) : (0), in getNBitSignedIntegerVec4MaxValue()
1303 (numBits[1] > 0) ? (deIntMaxValue32(numBits[1])) : (0), in getNBitSignedIntegerVec4MaxValue()
1304 (numBits[2] > 0) ? (deIntMaxValue32(numBits[2])) : (0), in getNBitSignedIntegerVec4MaxValue()
1305 (numBits[3] > 0) ? (deIntMaxValue32(numBits[3])) : (0)); in getNBitSignedIntegerVec4MaxValue()
[all …]
DtcuCompressedTexture.cpp330 const int numBits = (high-low) + 1; in getBits() local
331 DE_ASSERT(de::inRange(numBits, 1, 32)); in getBits()
332 if (numBits < 32) in getBits()
333 return (src >> low) & ((1u<<numBits)-1); in getBits()
1018 const int numBits = (high-low) + 1; in getBits() local
1019 DE_ASSERT(de::inRange(numBits, 1, 32)); in getBits()
1020 return (src >> low) & ((1u<<numBits)-1); in getBits()
1028 inline deUint32 reverseBits (deUint32 src, int numBits) in reverseBits() argument
1030 DE_ASSERT(de::inRange(numBits, 0, 32)); in reverseBits()
1032 for (int i = 0; i < numBits; i++) in reverseBits()
[all …]
/external/antlr/antlr-3.4/runtime/ActionScript/project/test/org/antlr/runtime/test/
DTestBitSet.as12 assertEquals(0, bitSet.numBits);
19 assertEquals(32, bitSet.numBits);
/external/guava/guava/src/com/google/common/hash/
DBloomFilter.java312 long numBits = optimalNumOfBits(expectedInsertions, fpp); in create()
313 int numHashFunctions = optimalNumOfHashFunctions(expectedInsertions, numBits); in create()
315 return new BloomFilter<T>(new BitArray(numBits), numHashFunctions, funnel, strategy); in create()
317 throw new IllegalArgumentException("Could not create BloomFilter of " + numBits + " bits", e); in create()
/external/deqp/modules/gles31/functional/
Des31fShaderAtomicOpTests.cpp578 const int numBits = m_precision == PRECISION_HIGHP ? 32 : in ShaderAtomicAndCase() local
580 const deUint32 valueMask = numBits == 32 ? ~0u : (1u<<numBits)-1u; in ShaderAtomicAndCase()
581 …m_initialValue = ~((1u<<(numBits-1u)) | 1u) & valueMask; // All bits except lowest and highest set. in ShaderAtomicAndCase()
590 const int numBits = m_precision == PRECISION_HIGHP ? 32 : in getInputs() local
592 const deUint32 valueMask = numBits == 32 ? ~0u : (1u<<numBits)-1u; in getInputs()
597 const deUint32 groupMask = 1<<rnd.getInt(0, numBits-2); // One bit is always set. in getInputs()
660 const int numBits = m_precision == PRECISION_HIGHP ? 32 : in getInputs() local
668 *(deUint32*)((deUint8*)inputs + stride*(groupOffset+localNdx)) = 1u<<rnd.getInt(0, numBits-1); in getInputs()
746 const int numBits = m_precision == PRECISION_HIGHP ? 32 : in verify() local
748 const deUint32 compareMask = numBits == 32 ? ~0u : (1u<<numBits)-1u; in verify()
Des31fTextureBorderClampTests.cpp352 int getNBitIntegerMaxValue (bool isSigned, int numBits) in getNBitIntegerMaxValue() argument
354 DE_ASSERT(numBits < 32); in getNBitIntegerMaxValue()
356 if (numBits == 0) in getNBitIntegerMaxValue()
359 return deIntMaxValue32(numBits); in getNBitIntegerMaxValue()
361 return deUintMaxValue32(numBits); in getNBitIntegerMaxValue()
364 int getNBitIntegerMinValue (bool isSigned, int numBits) in getNBitIntegerMinValue() argument
366 DE_ASSERT(numBits < 32); in getNBitIntegerMinValue()
368 if (numBits == 0) in getNBitIntegerMinValue()
371 return deIntMinValue32(numBits); in getNBitIntegerMinValue()
376 tcu::IVec4 getNBitIntegerVec4MaxValue (bool isSigned, const tcu::IVec4& numBits) in getNBitIntegerVec4MaxValue() argument
[all …]
/external/guava/guava-tests/test/com/google/common/hash/
DBloomFilterTest.java42 long numBits = Integer.MAX_VALUE; in testLargeBloomFilterDoesntOverflow() local
43 numBits++; in testLargeBloomFilterDoesntOverflow()
45 BitArray bitArray = new BitArray(numBits); in testLargeBloomFilterDoesntOverflow()
254 long numBits = BloomFilter.optimalNumOfBits(i, fpp); in testBitSize() local
255 int arraySize = Ints.checkedCast(LongMath.divide(numBits, 64, RoundingMode.CEILING)); in testBitSize()
/external/skia/forth/
DForth.cpp335 static bool parse_num(const char str[], size_t len, int32_t* numBits) { in parse_num() argument
351 *numBits = num; in parse_num()
364 *numBits = num; in parse_num()
384 *numBits = f2i_bits(x); in parse_num()
/external/llvm/utils/TableGen/
DCodeGenTarget.cpp348 unsigned numBits = BI->getNumBits(); in reverseBitsForLittleEndianEncoding() local
350 SmallVector<Init *, 16> NewBits(numBits); in reverseBitsForLittleEndianEncoding()
352 for (unsigned bit = 0, end = numBits / 2; bit != end; ++bit) { in reverseBitsForLittleEndianEncoding()
353 unsigned bitSwapIdx = numBits - bit - 1; in reverseBitsForLittleEndianEncoding()
359 if (numBits % 2) { in reverseBitsForLittleEndianEncoding()
360 unsigned middle = (numBits + 1) / 2; in reverseBitsForLittleEndianEncoding()
/external/deqp/framework/referencerenderer/
DrrRasterizer.hpp45 const int numBits = sizeof(deUint64)*8; in getCoverageBit() local
46 const int maxSamples = numBits/4; in getCoverageBit()

123