/external/swiftshader/third_party/LLVM/include/llvm/ADT/ |
D | DenseMap.h | 41 unsigned NumBuckets; variable 52 NumBuckets = 0; in DenseMap() 68 for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) { in ~DenseMap() 75 if (NumBuckets) in ~DenseMap() 76 memset((void*)Buckets, 0x5a, sizeof(BucketT)*NumBuckets); in ~DenseMap() 86 return empty() ? end() : iterator(Buckets, Buckets+NumBuckets); in begin() 89 return iterator(Buckets+NumBuckets, Buckets+NumBuckets); in end() 92 return empty() ? end() : const_iterator(Buckets, Buckets+NumBuckets); in begin() 95 return const_iterator(Buckets+NumBuckets, Buckets+NumBuckets); in end() 103 if (Size > NumBuckets) in resize() [all …]
|
D | StringMap.h | 68 unsigned NumBuckets; variable 76 NumBuckets = 0; in StringMapImpl() 109 unsigned getNumBuckets() const { return NumBuckets; } in getNumBuckets() 277 return iterator(TheTable, NumBuckets == 0); in begin() 280 return iterator(TheTable+NumBuckets, true); in end() 283 return const_iterator(TheTable, NumBuckets == 0); in begin() 286 return const_iterator(TheTable+NumBuckets, true); in end() 331 assert(NumItems + NumTombstones <= NumBuckets); in insert() 343 for (ItemBucket *I = TheTable, *E = TheTable+NumBuckets; I != E; ++I) { in clear() 370 assert(NumItems + NumTombstones <= NumBuckets); in GetOrCreateValue()
|
/external/llvm/lib/Support/ |
D | StringMap.cpp | 45 NumBuckets = 0; in StringMapImpl() 53 NumBuckets = InitSize ? InitSize : 16; in init() 57 TheTable = (StringMapEntryBase **)calloc(NumBuckets+1, in init() 63 TheTable[NumBuckets] = (StringMapEntryBase*)2; in init() 73 unsigned HTSize = NumBuckets; in LookupBucketFor() 76 HTSize = NumBuckets; in LookupBucketFor() 80 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in LookupBucketFor() 131 unsigned HTSize = NumBuckets; in FindKey() 135 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in FindKey() 189 assert(NumItems + NumTombstones <= NumBuckets); in RemoveKey() [all …]
|
D | FoldingSet.cpp | 209 static void **GetBucketFor(unsigned Hash, void **Buckets, unsigned NumBuckets) { in GetBucketFor() argument 211 unsigned BucketNum = Hash & (NumBuckets-1); in GetBucketFor() 216 static void **AllocateBuckets(unsigned NumBuckets) { in AllocateBuckets() argument 217 void **Buckets = static_cast<void**>(calloc(NumBuckets+1, sizeof(void*))); in AllocateBuckets() 219 Buckets[NumBuckets] = reinterpret_cast<void*>(-1); in AllocateBuckets() 231 NumBuckets = 1 << Log2InitSize; in FoldingSetImpl() 232 Buckets = AllocateBuckets(NumBuckets); in FoldingSetImpl() 237 : Buckets(Arg.Buckets), NumBuckets(Arg.NumBuckets), NumNodes(Arg.NumNodes) { in FoldingSetImpl() 239 Arg.NumBuckets = 0; in FoldingSetImpl() 246 NumBuckets = RHS.NumBuckets; in operator =() [all …]
|
/external/swiftshader/third_party/llvm-subzero/lib/Support/ |
D | StringMap.cpp | 47 NumBuckets = 0; in StringMapImpl() 55 NumBuckets = InitSize ? InitSize : 16; in init() 59 TheTable = (StringMapEntryBase **)calloc(NumBuckets+1, in init() 65 TheTable[NumBuckets] = (StringMapEntryBase*)2; in init() 74 unsigned HTSize = NumBuckets; in LookupBucketFor() 77 HTSize = NumBuckets; in LookupBucketFor() 81 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in LookupBucketFor() 131 unsigned HTSize = NumBuckets; in FindKey() 135 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in FindKey() 189 assert(NumItems + NumTombstones <= NumBuckets); in RemoveKey() [all …]
|
D | FoldingSet.cpp | 209 static void **GetBucketFor(unsigned Hash, void **Buckets, unsigned NumBuckets) { in GetBucketFor() argument 211 unsigned BucketNum = Hash & (NumBuckets-1); in GetBucketFor() 216 static void **AllocateBuckets(unsigned NumBuckets) { in AllocateBuckets() argument 217 void **Buckets = static_cast<void**>(calloc(NumBuckets+1, sizeof(void*))); in AllocateBuckets() 219 Buckets[NumBuckets] = reinterpret_cast<void*>(-1); in AllocateBuckets() 231 NumBuckets = 1 << Log2InitSize; in FoldingSetImpl() 232 Buckets = AllocateBuckets(NumBuckets); in FoldingSetImpl() 237 : Buckets(Arg.Buckets), NumBuckets(Arg.NumBuckets), NumNodes(Arg.NumNodes) { in FoldingSetImpl() 239 Arg.NumBuckets = 0; in FoldingSetImpl() 246 NumBuckets = RHS.NumBuckets; in operator =() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Support/ |
D | StringMap.cpp | 48 NumBuckets = 0; in StringMapImpl() 66 NumBuckets = NewNumBuckets; in init() 70 TheTable[NumBuckets] = (StringMapEntryBase*)2; in init() 79 unsigned HTSize = NumBuckets; in LookupBucketFor() 82 HTSize = NumBuckets; in LookupBucketFor() 86 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in LookupBucketFor() 136 unsigned HTSize = NumBuckets; in FindKey() 140 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in FindKey() 194 assert(NumItems + NumTombstones <= NumBuckets); in RemoveKey() 203 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in RehashTable() [all …]
|
D | FoldingSet.cpp | 209 static void **GetBucketFor(unsigned Hash, void **Buckets, unsigned NumBuckets) { in GetBucketFor() argument 211 unsigned BucketNum = Hash & (NumBuckets-1); in GetBucketFor() 216 static void **AllocateBuckets(unsigned NumBuckets) { in AllocateBuckets() argument 217 void **Buckets = static_cast<void**>(safe_calloc(NumBuckets + 1, in AllocateBuckets() 220 Buckets[NumBuckets] = reinterpret_cast<void*>(-1); in AllocateBuckets() 232 NumBuckets = 1 << Log2InitSize; in FoldingSetBase() 233 Buckets = AllocateBuckets(NumBuckets); in FoldingSetBase() 238 : Buckets(Arg.Buckets), NumBuckets(Arg.NumBuckets), NumNodes(Arg.NumNodes) { in FoldingSetBase() 240 Arg.NumBuckets = 0; in FoldingSetBase() 247 NumBuckets = RHS.NumBuckets; in operator =() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Support/ |
D | StringMap.cpp | 30 NumBuckets = 0; in StringMapImpl() 38 NumBuckets = InitSize ? InitSize : 16; in init() 42 TheTable = (ItemBucket*)calloc(NumBuckets+1, sizeof(ItemBucket)); in init() 46 TheTable[NumBuckets].Item = (StringMapEntryBase*)2; in init() 56 unsigned HTSize = NumBuckets; in LookupBucketFor() 59 HTSize = NumBuckets; in LookupBucketFor() 114 unsigned HTSize = NumBuckets; in FindKey() 172 assert(NumItems + NumTombstones <= NumBuckets); in RemoveKey() 187 if (NumItems*4 > NumBuckets*3) { in RehashTable() 188 NewSize = NumBuckets*2; in RehashTable() [all …]
|
D | FoldingSet.cpp | 208 static void **GetBucketFor(unsigned Hash, void **Buckets, unsigned NumBuckets) { in GetBucketFor() argument 210 unsigned BucketNum = Hash & (NumBuckets-1); in GetBucketFor() 215 static void **AllocateBuckets(unsigned NumBuckets) { in AllocateBuckets() argument 216 void **Buckets = static_cast<void**>(calloc(NumBuckets+1, sizeof(void*))); in AllocateBuckets() 218 Buckets[NumBuckets] = reinterpret_cast<void*>(-1); in AllocateBuckets() 228 NumBuckets = 1 << Log2InitSize; in FoldingSetImpl() 229 Buckets = AllocateBuckets(NumBuckets); in FoldingSetImpl() 237 memset(Buckets, 0, NumBuckets*sizeof(void*)); in clear() 240 Buckets[NumBuckets] = reinterpret_cast<void*>(-1); in clear() 250 unsigned OldNumBuckets = NumBuckets; in GrowHashTable() [all …]
|
/external/clang/lib/Lex/ |
D | HeaderMap.cpp | 90 uint32_t NumBuckets = NeedsByteSwap in checkHeader() local 91 ? llvm::sys::getSwappedBytes(Header->NumBuckets) in checkHeader() 92 : Header->NumBuckets; in checkHeader() 93 if (!llvm::isPowerOf2_32(NumBuckets)) in checkHeader() 96 sizeof(HMapHeader) + sizeof(HMapBucket) * NumBuckets) in checkHeader() 174 unsigned NumBuckets = getEndianAdjustedWord(Hdr.NumBuckets); in dump() local 176 llvm::dbgs() << "Header Map " << getFileName() << ":\n " << NumBuckets in dump() 185 for (unsigned i = 0; i != NumBuckets; ++i) { in dump() 213 unsigned NumBuckets = getEndianAdjustedWord(Hdr.NumBuckets); in lookupFilename() local 216 assert(llvm::isPowerOf2_32(NumBuckets) && "Expected power of 2"); in lookupFilename() [all …]
|
/external/swiftshader/third_party/llvm-subzero/include/llvm/ADT/ |
D | StringMap.h | 56 unsigned NumBuckets; variable 65 NumBuckets(0), NumItems(0), NumTombstones(0), ItemSize(itemSize) {} in StringMapImpl() 67 : TheTable(RHS.TheTable), NumBuckets(RHS.NumBuckets), in StringMapImpl() 71 RHS.NumBuckets = 0; in StringMapImpl() 110 unsigned getNumBuckets() const { return NumBuckets; } in getNumBuckets() 118 std::swap(NumBuckets, Other.NumBuckets); in swap() 264 init(RHS.NumBuckets); in StringMap() 265 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1), in StringMap() 266 *RHSHashTable = (unsigned *)(RHS.TheTable + NumBuckets + 1); in StringMap() 270 for (unsigned I = 0, E = NumBuckets; I != E; ++I) { in StringMap() [all …]
|
D | DenseMap.h | 88 auto NumBuckets = getMinBucketToReserveForEntries(NumEntries); in reserve() local 90 if (NumBuckets > getNumBuckets()) in reserve() 91 grow(NumBuckets); in reserve() 482 unsigned NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() local 483 if (LLVM_UNLIKELY(NewNumEntries * 4 >= NumBuckets * 3)) { in InsertIntoBucketImpl() 484 this->grow(NumBuckets * 2); in InsertIntoBucketImpl() 486 NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() 487 } else if (LLVM_UNLIKELY(NumBuckets-(NewNumEntries+getNumTombstones()) <= in InsertIntoBucketImpl() 488 NumBuckets/8)) { in InsertIntoBucketImpl() 489 this->grow(NumBuckets); in InsertIntoBucketImpl() [all …]
|
D | FoldingSet.h | 123 unsigned NumBuckets; variable 198 return NumBuckets * 2; in capacity() 455 iterator end() { return iterator(Buckets+NumBuckets); } in end() 459 const_iterator end() const { return const_iterator(Buckets+NumBuckets); } in end() 464 return bucket_iterator(Buckets + (hash & (NumBuckets-1))); in bucket_begin() 468 return bucket_iterator(Buckets + (hash & (NumBuckets-1)), true); in bucket_end() 535 iterator end() { return iterator(Buckets+NumBuckets); } in end() 539 const_iterator end() const { return const_iterator(Buckets+NumBuckets); } in end() 544 return bucket_iterator(Buckets + (hash & (NumBuckets-1))); in bucket_begin() 548 return bucket_iterator(Buckets + (hash & (NumBuckets-1)), true); in bucket_end()
|
/external/llvm/include/llvm/ADT/ |
D | StringMap.h | 49 unsigned NumBuckets; variable 58 NumBuckets(0), NumItems(0), NumTombstones(0), ItemSize(itemSize) {} in StringMapImpl() 60 : TheTable(RHS.TheTable), NumBuckets(RHS.NumBuckets), in StringMapImpl() 64 RHS.NumBuckets = 0; in StringMapImpl() 103 unsigned getNumBuckets() const { return NumBuckets; } in getNumBuckets() 111 std::swap(NumBuckets, Other.NumBuckets); in swap() 258 init(RHS.NumBuckets); in StringMap() 259 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1), in StringMap() 260 *RHSHashTable = (unsigned *)(RHS.TheTable + NumBuckets + 1); in StringMap() 264 for (unsigned I = 0, E = NumBuckets; I != E; ++I) { in StringMap() [all …]
|
D | DenseMap.h | 87 auto NumBuckets = getMinBucketToReserveForEntries(NumEntries); in reserve() local 89 if (NumBuckets > getNumBuckets()) in reserve() 90 grow(NumBuckets); in reserve() 484 unsigned NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() local 485 if (LLVM_UNLIKELY(NewNumEntries * 4 >= NumBuckets * 3)) { in InsertIntoBucketImpl() 486 this->grow(NumBuckets * 2); in InsertIntoBucketImpl() 488 NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() 489 } else if (LLVM_UNLIKELY(NumBuckets-(NewNumEntries+getNumTombstones()) <= in InsertIntoBucketImpl() 490 NumBuckets/8)) { in InsertIntoBucketImpl() 491 this->grow(NumBuckets); in InsertIntoBucketImpl() [all …]
|
D | FoldingSet.h | 118 unsigned NumBuckets; variable 192 return NumBuckets * 2; in capacity() 447 iterator end() { return iterator(Buckets+NumBuckets); } in end() 451 const_iterator end() const { return const_iterator(Buckets+NumBuckets); } in end() 456 return bucket_iterator(Buckets + (hash & (NumBuckets-1))); in bucket_begin() 460 return bucket_iterator(Buckets + (hash & (NumBuckets-1)), true); in bucket_end() 525 iterator end() { return iterator(Buckets+NumBuckets); } in end() 529 const_iterator end() const { return const_iterator(Buckets+NumBuckets); } in end() 534 return bucket_iterator(Buckets + (hash & (NumBuckets-1))); in bucket_begin() 538 return bucket_iterator(Buckets + (hash & (NumBuckets-1)), true); in bucket_end()
|
/external/llvm/include/llvm/Support/ |
D | OnDiskHashTable.h | 75 offset_type NumBuckets; variable 101 for (size_t I = 0; I < NumBuckets; ++I) in resize() 110 NumBuckets = NewSize; in resize() 128 if (4 * NumEntries >= 3 * NumBuckets) in insert() 129 resize(NumBuckets * 2); in insert() 130 insert(Buckets, NumBuckets, new (BA.Allocate()) Item(Key, Data, InfoObj)); in insert() 136 for (Item *I = Buckets[Hash & (NumBuckets - 1)].Head; I; I = I->Next) in contains() 168 if (TargetNumBuckets != NumBuckets) in Emit() 172 for (offset_type I = 0; I < NumBuckets; ++I) { in Emit() 217 LE.write<offset_type>(NumBuckets); in Emit() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Support/ |
D | OnDiskHashTable.h | 74 offset_type NumBuckets; variable 101 for (size_t I = 0; I < NumBuckets; ++I) in resize() 110 NumBuckets = NewSize; in resize() 128 if (4 * NumEntries >= 3 * NumBuckets) in insert() 129 resize(NumBuckets * 2); in insert() 130 insert(Buckets, NumBuckets, new (BA.Allocate()) Item(Key, Data, InfoObj)); in insert() 136 for (Item *I = Buckets[Hash & (NumBuckets - 1)].Head; I; I = I->Next) in contains() 168 if (TargetNumBuckets != NumBuckets) in Emit() 172 for (offset_type I = 0; I < NumBuckets; ++I) { in Emit() 217 LE.write<offset_type>(NumBuckets); in Emit() [all …]
|
/external/llvm/lib/DebugInfo/DWARF/ |
D | DWARFUnitIndex.cpp | 24 NumBuckets = IndexData.getU32(OffsetPtr); in parse() 29 OS << format("version = %u slots = %u\n\n", Version, NumBuckets); in dump() 36 Header.NumBuckets = 0; in parse() 50 Offset, Header.NumBuckets * (8 + 4) + in parseImpl() 54 Rows = llvm::make_unique<Entry[]>(Header.NumBuckets); in parseImpl() 60 for (unsigned i = 0; i != Header.NumBuckets; ++i) in parseImpl() 64 for (unsigned i = 0; i != Header.NumBuckets; ++i) { in parseImpl() 122 if (!Header.NumBuckets) in dump() 133 for (unsigned i = 0; i != Header.NumBuckets; ++i) { in dump() 162 for (uint32_t i = 0; i != Header.NumBuckets; ++i) in getFromOffset()
|
D | DWARFAcceleratorTable.cpp | 27 Hdr.NumBuckets = AccelSection.getU32(&Offset); in extract() 34 Hdr.NumBuckets*4 + Hdr.NumHashes*8)) in extract() 54 << "Bucket count = " << Hdr.NumBuckets << '\n' in dump() 79 unsigned HashesBase = Offset + Hdr.NumBuckets * 4; in dump() 82 for (unsigned Bucket = 0; Bucket < Hdr.NumBuckets; ++Bucket) { in dump() 96 if (Hash % Hdr.NumBuckets != Bucket) in dump()
|
/external/clang/unittests/Lex/ |
D | HeaderMapTest.cpp | 25 template <unsigned NumBuckets, unsigned NumBytes> struct MapFile { 27 HMapBucket Buckets[NumBuckets]; 34 Header.NumBuckets = NumBuckets; in init() 42 Header.NumBuckets = getSwappedBytes(Header.NumBuckets); in swapBytes() 76 assert(!(File.Header.NumBuckets & (File.Header.NumBuckets - 1))); in addBucket() 77 unsigned I = Hash & (File.Header.NumBuckets - 1); in addBucket() 87 I &= File.Header.NumBuckets - 1; in addBucket() 88 } while (I != (Hash & (File.Header.NumBuckets - 1))); in addBucket() 150 File.Header.NumBuckets = 0; in TEST() 158 File.Header.NumBuckets = 8; in TEST()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/DebugInfo/DWARF/ |
D | DWARFUnitIndex.cpp | 28 NumBuckets = IndexData.getU32(OffsetPtr); in parse() 33 OS << format("version = %u slots = %u\n\n", Version, NumBuckets); in dump() 40 Header.NumBuckets = 0; in parse() 54 Offset, Header.NumBuckets * (8 + 4) + in parseImpl() 58 Rows = llvm::make_unique<Entry[]>(Header.NumBuckets); in parseImpl() 64 for (unsigned i = 0; i != Header.NumBuckets; ++i) in parseImpl() 68 for (unsigned i = 0; i != Header.NumBuckets; ++i) { in parseImpl() 137 for (unsigned i = 0; i != Header.NumBuckets; ++i) { in dump() 167 for (uint32_t i = 0; i != Header.NumBuckets; ++i) in getFromOffset() 178 uint64_t Mask = Header.NumBuckets - 1; in getFromHash()
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/ADT/ |
D | StringMap.h | 56 unsigned NumBuckets = 0; variable 65 : TheTable(RHS.TheTable), NumBuckets(RHS.NumBuckets), in StringMapImpl() 69 RHS.NumBuckets = 0; in StringMapImpl() 108 unsigned getNumBuckets() const { return NumBuckets; } in getNumBuckets() 116 std::swap(NumBuckets, Other.NumBuckets); in swap() 256 init(RHS.NumBuckets); in StringMap() 257 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1), in StringMap() 258 *RHSHashTable = (unsigned *)(RHS.TheTable + NumBuckets + 1); in StringMap() 262 for (unsigned I = 0, E = NumBuckets; I != E; ++I) { in StringMap() 294 for (unsigned I = 0, E = NumBuckets; I != E; ++I) { in ~StringMap() [all …]
|
D | DenseMap.h | 101 auto NumBuckets = getMinBucketToReserveForEntries(NumEntries); in reserve() local 103 if (NumBuckets > getNumBuckets()) in reserve() 104 grow(NumBuckets); in reserve() 544 unsigned NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() local 545 if (LLVM_UNLIKELY(NewNumEntries * 4 >= NumBuckets * 3)) { in InsertIntoBucketImpl() 546 this->grow(NumBuckets * 2); in InsertIntoBucketImpl() 548 NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() 549 } else if (LLVM_UNLIKELY(NumBuckets-(NewNumEntries+getNumTombstones()) <= in InsertIntoBucketImpl() 550 NumBuckets/8)) { in InsertIntoBucketImpl() 551 this->grow(NumBuckets); in InsertIntoBucketImpl() [all …]
|