Home | History | Annotate | Download | only in ADT

Lines Matching refs:Sparse

1 //===--- llvm/ADT/SparseMultiSet.h - Sparse multiset ------------*- C++ -*-===//
13 // A sparse multiset holds a small number of objects identified by integer keys
14 // from a moderately sized universe. The sparse multiset uses more memory than
47 /// SparseMultiSet contains a dense vector holding all the objects and a sparse
49 /// the sparse array which is the size of the key universe. The SparseT template
53 /// sparse array uses 4 x Universe bytes.
56 /// lines, but the sparse array is 4x smaller. N is the number of elements in
116 SparseT *Sparse;
191 : Sparse(nullptr), Universe(0), FreelistIdx(SMSNode::INVALID), NumFree(0) {}
193 ~SparseMultiSet() { free(Sparse); }
207 free(Sparse);
208 // The Sparse array doesn't actually need to be initialized, so malloc
211 Sparse = reinterpret_cast<SparseT*>(calloc(U, sizeof(SparseT)));
339 // Sparse does not need to be cleared, see find().
353 for (unsigned i = Sparse[Idx], e = Dense.size(); i < e; i += Stride) {
423 Sparse[Idx] = NodeIdx;
493 // If we're the head, then update the sparse array and our next.
494 Sparse[sparseIndex(N)] = N.Next;