/device/google/contexthub/firmware/inc/cpu/cortexm4f/ |
atomicBitset.h | 25 uint32_t numBits; 29 #define ATOMIC_BITSET_NUM_WORDS(numbits) (((numbits) + 31) / 32) 30 #define ATOMIC_BITSET_SZ(numbits) (sizeof(struct AtomicBitset) + sizeof(uint32_t) * ATOMIC_BITSET_NUM_WORDS(numbits)) 31 #define ATOMIC_BITSET_DECL(nam, numbits, extra_keyword) DECLARE_OS_ALIGNMENT(nam, ATOMIC_BITSET_SZ(numbits), extra_keyword, struct AtomicBitset) 33 void atomicBitsetInit(struct AtomicBitset *set, uint32_t numBits);
|
/device/google/contexthub/firmware/src/cpu/cortexm4f/ |
atomicBitset.c | 23 void atomicBitsetInit(struct AtomicBitset *set, uint32_t numBits) 25 set->numBits = numBits; 26 memset(set->words, 0, sizeof(uint32_t) * ATOMIC_BITSET_NUM_WORDS(numBits)); 27 if (numBits & 31) //mark all high bits so that atomicBitsetFindClearAndSet() is simpler 28 set->words[numBits / 32] = ((uint32_t)((int32_t)-1LL)) << (numBits & 31); 33 return set->numBits; 38 if (num >= set->numBits) /* any value is as good as the next */ 49 if (num >= set->numBits) [all...] |
/external/pdfium/xfa/src/fxbarcode/common/ |
BC_CommonBitSource.cpp | 31 int32_t CBC_CommonBitSource::ReadBits(int32_t numBits, int32_t& e) {
32 if (numBits < 1 || numBits > 32) {
39 int32_t toRead = numBits < bitsLeft ? numBits : bitsLeft;
43 numBits -= toRead;
50 if (numBits > 0) {
51 while (numBits >= 8) {
54 numBits -= 8;
56 if (numBits > 0) { [all...] |
BC_CommonBitSource.h | 13 int32_t ReadBits(int32_t numBits, int32_t& e);
|
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/boxes/mp4/objectdescriptors/ |
BitWriterBuffer.java | 16 public void writeBits(int i, int numBits) { 17 assert i <= ((1 << numBits)-1): String.format("Trying to write a value bigger (%s) than the number bits (%s) allows. " + 18 "Please mask the value before writing it and make your code is really working as intended.", i, (1<<numBits)-1); 21 if (numBits <= left) { 24 current += i << (left - numBits); 26 position += numBits; 28 int bitsSecondWrite = numBits - left;
|
/external/guava/guava-tests/test/com/google/common/math/ |
MathBenchmarking.java | 52 static BigInteger randomPositiveBigInteger(int numBits) { 55 result = randomNonNegativeBigInteger(numBits); 61 * Generates a number in [0, 2^numBits) with an exponential distribution. 63 * [0, numBits), and then the result is chosen in that range uniformly at random. 66 static BigInteger randomNonNegativeBigInteger(int numBits) { 67 int digits = RANDOM_SOURCE.nextInt(numBits); 77 * Equivalent to calling randomPositiveBigInteger(numBits) and then flipping 80 static BigInteger randomNonZeroBigInteger(int numBits) { 81 BigInteger result = randomPositiveBigInteger(numBits); 86 * Chooses a number in (-2^numBits, 2^numBits) at random, with densit [all...] |
/device/google/contexthub/firmware/src/cpu/x86/ |
atomicBitset.c | 24 void atomicBitsetInit(struct AtomicBitset *set, uint32_t numBits) 26 set->numBits = numBits; 27 memset(set->words, 0, (numBits + 31) / 8); 28 if (numBits & 31) //mark all high bits so that atomicBitsetFindClearAndSet() is simpler 29 set->words[numBits / 32] = ((uint32_t)((int32_t)-1LL)) << (numBits & 31); 34 return set->numBits; 39 if (num >= set->numBits) /* any value is as good as the next */ 51 if (num >= set->numBits) [all...] |
/device/google/contexthub/firmware/inc/cpu/x86/ |
atomicBitset.h | 24 uint32_t numBits; 28 #define ATOMIC_BITSET_SZ(numbits) (sizeof(struct AtomicBitset) + ((numbits) + 31) / 8) 29 #define ATOMIC_BITSET_DECL(nam, numbits, extra_keyword) extra_keyword uint8_t _##nam##_store [ATOMIC_BITSET_SZ(numbits)] __attribute__((aligned(4))); extra_keyword struct AtomicBitset *nam = (struct AtomicBitset*)_##nam##_store 32 void atomicBitsetInit(struct AtomicBitset *set, uint32_t numBits);
|
/system/media/audio_utils/spdif/ |
BitFieldParser.cpp | 38 uint32_t BitFieldParser::readBits(uint32_t numBits) 40 ALOG_ASSERT(numBits <= 32); 47 uint32_t bitsFromByte = (bitsLeftInByte < numBits) ? bitsLeftInByte : numBits; 52 uint32_t bitsRemaining = numBits - bitsFromByte;
|
BitFieldParser.h | 34 * Read numBits bits from the data array. 39 uint32_t readBits(uint32_t numBits);
|
/external/antlr/antlr-3.4/runtime/ActionScript/project/test/org/antlr/runtime/test/ |
TestBitSet.as | 12 assertEquals(0, bitSet.numBits); 19 assertEquals(32, bitSet.numBits);
|
/device/google/contexthub/firmware/inc/ |
atomicBitset.h | 27 // ATOMIC_BITSET_SZ(numbits) 29 // ATOMIC_BITSET_DECL(nam, numbits, [static]); 31 // uint32_t sz = atomicBitsetSize(uint32_t numBits); 33 // atomicBitsetInit(set, numBits); 36 void atomicBitsetInit(struct AtomicBitset *set, uint32_t numBits); //inited state is all zeroes 55 // returns false if the number of bits in set is not numBits 60 bool atomicBitsetBulkRead(struct AtomicBitset *set, uint32_t *dest, uint32_t numBits);
|
/external/deqp/framework/delibs/debase/ |
deInt32Test.c | 74 int numBits; 123 for (numBits = 0; numBits < 32; numBits++) 125 DE_TEST_ASSERT(dePop32(1u<<numBits) == 1); 126 DE_TEST_ASSERT(dePop32(~(1u<<numBits)) == 31); 130 for (numBits = 0; numBits < 32; numBits++) 132 deUint32 val = (1u<<numBits); [all...] |
deMathTest.c | 77 int numBits; 85 for (numBits = 0; numBits < 32; ++numBits) 88 const deInt64 x = (deInt64)(sign == -1 ? (-1) : (+1)) * (1LL << (deInt64)numBits) + (deInt64)delta;
|
/external/lzma/CS/7zip/Compress/LzmaAlone/ |
LzmaBench.cs | 35 int NumBits;
39 NumBits = 0;
41 public UInt32 GetRnd(int numBits)
44 if (NumBits > numBits)
46 result = Value & (((UInt32)1 << numBits) - 1);
47 Value >>= numBits;
48 NumBits -= numBits;
51 numBits -= NumBits; [all...] |
/external/lzma/Java/SevenZip/ |
LzmaBench.java | 30 int NumBits;
34 NumBits = 0;
36 public int GetRnd(int numBits)
39 if (NumBits > numBits)
41 result = Value & ((1 << numBits) - 1);
42 Value >>>= numBits;
43 NumBits -= numBits;
46 numBits -= NumBits; [all...] |
/external/antlr/antlr-3.4/runtime/ObjC/Framework/test/runtime/sets/ |
ANTLRBitSetTest.m | 20 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 STAssertEquals(actual, (CFIndex)[bitSet numBits], @"There should be three bits set in bitvector. But I have %d", [copy numBits]);
|
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/ |
SecureRandom2Test.java | 163 int numBits = 29; 164 int random = mySecureRandom.getNext(numBits); 165 assertEquals(numBits, Integer.bitCount(random)); 167 numBits = 0; 168 random = mySecureRandom.getNext(numBits); 169 assertEquals(numBits, Integer.bitCount(random)); 171 numBits = 40; 172 random = mySecureRandom.getNext(numBits); 175 numBits = -1; 176 random = mySecureRandom.getNext(numBits); [all...] |
/external/libdrm/amdgpu/ |
util_hash.c | 51 static int primeForNumBits(int numBits) 53 return (1 << numBits) + prime_deltas[numBits]; 61 int numBits = 0; 66 numBits++; 69 if (numBits >= (int)sizeof(prime_deltas)) { 70 numBits = sizeof(prime_deltas) - 1; 71 } else if (primeForNumBits(numBits) < hint) { 72 ++numBits; 74 return numBits; [all...] |
/external/mesa3d/src/gallium/auxiliary/cso_cache/ |
cso_hash.c | 47 static int primeForNumBits(int numBits) 49 return (1 << numBits) + prime_deltas[numBits]; 58 int numBits = 0; 63 numBits++; 66 if (numBits >= (int)sizeof(prime_deltas)) { 67 numBits = sizeof(prime_deltas) - 1; 68 } else if (primeForNumBits(numBits) < hint) { 69 ++numBits; 71 return numBits; [all...] |
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
SecureRandom2Test.java | 276 int numBits = 29; 277 int random = mySecureRandom.getNext(numBits); 278 assertEquals(numBits, Integer.bitCount(random)); 280 numBits = 0; 281 random = mySecureRandom.getNext(numBits); 282 assertEquals(numBits, Integer.bitCount(random)); 284 numBits = 40; 285 random = mySecureRandom.getNext(numBits); 288 numBits = -1; 289 random = mySecureRandom.getNext(numBits); [all...] |
/external/llvm/lib/Support/ |
APSInt.cpp | 24 unsigned NumBits = ((Str.size() * 64) / 19) + 2; 25 APInt Tmp(NumBits, Str, /*Radix=*/10); 28 if (MinBits > 0 && MinBits < NumBits) 34 if (ActiveBits > 0 && ActiveBits < NumBits)
|
/hardware/intel/common/libmix/mix_vbp/viddec_fw/fw/codecs/vc1/parser/ |
vc1parse.h | 24 assumed that numBits is less than ten. */
36 /* This macro gets the next numBits from the bitstream. */
38 #define VC1_GET_BITS9(numBits, value) \
40 viddec_pm_get_bits(ctxt, (uint32_t*)&__tmp__, numBits ); \
42 DEBUGBITS("BIT:%40s= 0x%x\tNo. of bits=%d\tbyte = %02x\t%s[%d]\n", #value, value, numBits, 0, __FILE__, __LINE__); \
45 #define VC1_PEEK_BITS(numBits, value) \
47 viddec_pm_peek_bits(ctxt, (uint32_t*)&__tmp__, numBits ); \
49 DEBUGBITS("PEEK%40s= 0x%x\tNo. of bits=%d\tbyte = %02x\t%s[%d]\n", #value, value, numBits, 0, __FILE__, __LINE__); \
|
/external/lzma/CPP/7zip/Compress/ |
RangeCoder.h | 73 void EncodeDirectBits(UInt32 value, int numBits)
75 for (numBits--; numBits >= 0; numBits--)
78 Low += Range & (0 - ((value >> numBits) & 1));
|
/external/llvm/include/llvm/Bitcode/ |
BitstreamWriter.h | 115 void Emit(uint32_t Val, unsigned NumBits) { 116 assert(NumBits && NumBits <= 32 && "Invalid value size!"); 117 assert((Val & ~(~0U >> (32-NumBits))) == 0 && "High bits set!"); 119 if (CurBit + NumBits < 32) { 120 CurBit += NumBits; 131 CurBit = (CurBit+NumBits) & 31; 134 void Emit64(uint64_t Val, unsigned NumBits) { 135 if (NumBits <= 32) 136 Emit((uint32_t)Val, NumBits); [all...] |