/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-10.0/llvm/lib/Support/ |
D | StringMap.cpp | 47 NumBuckets = 0; in StringMapImpl() 65 NumBuckets = NewNumBuckets; in init() 69 TheTable[NumBuckets] = (StringMapEntryBase*)2; in init() 78 unsigned HTSize = NumBuckets; in LookupBucketFor() 81 HTSize = NumBuckets; in LookupBucketFor() 85 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in LookupBucketFor() 135 unsigned HTSize = NumBuckets; in FindKey() 139 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in FindKey() 193 assert(NumItems + NumTombstones <= NumBuckets); in RemoveKey() 202 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); 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**>(safe_calloc(NumBuckets + 1, in AllocateBuckets() 219 Buckets[NumBuckets] = reinterpret_cast<void*>(-1); in AllocateBuckets() 231 NumBuckets = 1 << Log2InitSize; in FoldingSetBase() 232 Buckets = AllocateBuckets(NumBuckets); in FoldingSetBase() 237 : Buckets(Arg.Buckets), NumBuckets(Arg.NumBuckets), NumNodes(Arg.NumNodes) { in FoldingSetBase() 239 Arg.NumBuckets = 0; in FoldingSetBase() 246 NumBuckets = RHS.NumBuckets; in operator =() [all …]
|
/external/llvm-project/llvm/lib/Support/ |
D | StringMap.cpp | 45 NumBuckets = 0; in StringMapImpl() 62 NumBuckets = NewNumBuckets; in init() 66 TheTable[NumBuckets] = (StringMapEntryBase *)2; in init() 75 unsigned HTSize = NumBuckets; in LookupBucketFor() 78 HTSize = NumBuckets; in LookupBucketFor() 82 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in LookupBucketFor() 133 unsigned HTSize = NumBuckets; in FindKey() 138 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in FindKey() 193 assert(NumItems + NumTombstones <= NumBuckets); in RemoveKey() 202 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); in RehashTable() [all …]
|
D | FoldingSet.cpp | 213 static void **GetBucketFor(unsigned Hash, void **Buckets, unsigned NumBuckets) { in GetBucketFor() argument 215 unsigned BucketNum = Hash & (NumBuckets-1); in GetBucketFor() 220 static void **AllocateBuckets(unsigned NumBuckets) { in AllocateBuckets() argument 221 void **Buckets = static_cast<void**>(safe_calloc(NumBuckets + 1, in AllocateBuckets() 224 Buckets[NumBuckets] = reinterpret_cast<void*>(-1); in AllocateBuckets() 234 NumBuckets = 1 << Log2InitSize; in FoldingSetBase() 235 Buckets = AllocateBuckets(NumBuckets); in FoldingSetBase() 240 : Buckets(Arg.Buckets), NumBuckets(Arg.NumBuckets), NumNodes(Arg.NumNodes) { in FoldingSetBase() 242 Arg.NumBuckets = 0; in FoldingSetBase() 249 NumBuckets = RHS.NumBuckets; in operator =() [all …]
|
/external/llvm-project/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/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 …]
|
/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 …]
|
/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-10.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-project/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-project/llvm/include/llvm/ADT/ |
D | StringMap.h | 36 unsigned NumBuckets = 0; variable 44 : TheTable(RHS.TheTable), NumBuckets(RHS.NumBuckets), in StringMapImpl() 48 RHS.NumBuckets = 0; in StringMapImpl() 89 unsigned getNumBuckets() const { return NumBuckets; } in getNumBuckets() 97 std::swap(NumBuckets, Other.NumBuckets); in swap() 145 init(RHS.NumBuckets); in StringMap() 146 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1), in StringMap() 147 *RHSHashTable = (unsigned *)(RHS.TheTable + NumBuckets + 1); in StringMap() 151 for (unsigned I = 0, E = NumBuckets; I != E; ++I) { in StringMap() 183 for (unsigned I = 0, E = NumBuckets; I != E; ++I) { in ~StringMap() [all …]
|
D | DenseMap.h | 104 auto NumBuckets = getMinBucketToReserveForEntries(NumEntries); in reserve() local 106 if (NumBuckets > getNumBuckets()) in reserve() 107 grow(NumBuckets); in reserve() 578 unsigned NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() local 579 if (LLVM_UNLIKELY(NewNumEntries * 4 >= NumBuckets * 3)) { in InsertIntoBucketImpl() 580 this->grow(NumBuckets * 2); in InsertIntoBucketImpl() 582 NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() 583 } else if (LLVM_UNLIKELY(NumBuckets-(NewNumEntries+getNumTombstones()) <= in InsertIntoBucketImpl() 584 NumBuckets/8)) { in InsertIntoBucketImpl() 585 this->grow(NumBuckets); in InsertIntoBucketImpl() [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()
|
/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/llvm-project/clang/unittests/Lex/ |
D | HeaderMapTest.cpp | 24 template <unsigned NumBuckets, unsigned NumBytes> struct MapFile { 26 HMapBucket Buckets[NumBuckets]; 33 Header.NumBuckets = NumBuckets; in init() 41 Header.NumBuckets = getSwappedBytes(Header.NumBuckets); in swapBytes() 75 assert(!(File.Header.NumBuckets & (File.Header.NumBuckets - 1))); in addBucket() 76 unsigned I = Hash & (File.Header.NumBuckets - 1); in addBucket() 86 I &= File.Header.NumBuckets - 1; in addBucket() 87 } while (I != (Hash & (File.Header.NumBuckets - 1))); in addBucket() 149 File.Header.NumBuckets = 0; in TEST() 157 File.Header.NumBuckets = 8; in TEST()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/DebugInfo/DWARF/ |
D | DWARFUnitIndex.cpp | 27 NumBuckets = IndexData.getU32(OffsetPtr); in parse() 32 OS << format("version = %u slots = %u\n\n", Version, NumBuckets); in dump() 39 Header.NumBuckets = 0; in parse() 53 Offset, Header.NumBuckets * (8 + 4) + in parseImpl() 57 Rows = std::make_unique<Entry[]>(Header.NumBuckets); in parseImpl() 63 for (unsigned i = 0; i != Header.NumBuckets; ++i) in parseImpl() 67 for (unsigned i = 0; i != Header.NumBuckets; ++i) { in parseImpl() 136 for (unsigned i = 0; i != Header.NumBuckets; ++i) { in dump() 167 for (uint32_t i = 0; i != Header.NumBuckets; ++i) in getFromOffset() 189 uint64_t Mask = Header.NumBuckets - 1; in getFromHash()
|
/external/libtextclassifier/native/utils/grammar/parsing/ |
D | chart.h | 30 template <int NumBuckets = 1 << 8> 87 static constexpr int kChartHashTableBitmask = NumBuckets - 1; 88 std::array<ParseTree*, NumBuckets> chart_; 92 template <int NumBuckets> 93 bool Chart<NumBuckets>::HasMatch(const Nonterm nonterm, in HasMatch() 96 for (Chart<NumBuckets>::Iterator it = MatchesEndingAt(span.second); in HasMatch()
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/ADT/ |
D | StringMap.h | 55 unsigned NumBuckets = 0; variable 64 : TheTable(RHS.TheTable), NumBuckets(RHS.NumBuckets), in StringMapImpl() 68 RHS.NumBuckets = 0; in StringMapImpl() 107 unsigned getNumBuckets() const { return NumBuckets; } in getNumBuckets() 115 std::swap(NumBuckets, Other.NumBuckets); in swap() 278 init(RHS.NumBuckets); in StringMap() 279 unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1), in StringMap() 280 *RHSHashTable = (unsigned *)(RHS.TheTable + NumBuckets + 1); in StringMap() 284 for (unsigned I = 0, E = NumBuckets; I != E; ++I) { in StringMap() 316 for (unsigned I = 0, E = NumBuckets; I != E; ++I) { in ~StringMap() [all …]
|
D | DenseMap.h | 104 auto NumBuckets = getMinBucketToReserveForEntries(NumEntries); in reserve() local 106 if (NumBuckets > getNumBuckets()) in reserve() 107 grow(NumBuckets); in reserve() 549 unsigned NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() local 550 if (LLVM_UNLIKELY(NewNumEntries * 4 >= NumBuckets * 3)) { in InsertIntoBucketImpl() 551 this->grow(NumBuckets * 2); in InsertIntoBucketImpl() 553 NumBuckets = getNumBuckets(); in InsertIntoBucketImpl() 554 } else if (LLVM_UNLIKELY(NumBuckets-(NewNumEntries+getNumTombstones()) <= in InsertIntoBucketImpl() 555 NumBuckets/8)) { in InsertIntoBucketImpl() 556 this->grow(NumBuckets); in InsertIntoBucketImpl() [all …]
|