Lines Matching refs:src

51 BitVector::BitVector(const BitVector& src,
56 src.storage_size_,
57 static_cast<uint32_t*>(allocator->Alloc(src.storage_size_ * kWordBytes))) {
59 Copy(&src);
66 bool BitVector::SameBitsSet(const BitVector *src) const {
68 int src_highest = src->GetHighestBitSet();
89 return (memcmp(storage_, src->GetRawStorage(), our_highest_index * kWordBytes) == 0);
118 void BitVector::Intersect(const BitVector* src) {
119 uint32_t src_storage_size = src->storage_size_;
126 storage_[idx] &= src->GetRawStorageWord(idx);
130 // - Either src was larger than us: we don't care, all upper bits would thus be 0.
131 // - Either we are larger than src: we don't care, all upper bits would have been 0 too.
138 bool BitVector::Union(const BitVector* src) {
140 int highest_bit = src->GetHighestBitSet();
143 // If src has no bit set, we are done: there is no need for a union with src.
151 // Is the storage size smaller than src's?
163 uint32_t update = existing | src->GetRawStorageWord(idx);
177 // If src has no bit set, we are done: there is no need for a union with src.
185 // Is the storage size smaller than src's?
217 void BitVector::Subtract(const BitVector *src) {
218 uint32_t src_size = src->storage_size_;
225 // If we are bigger than src, the upper bits are unchanged.
226 // If we are smaller than src, the non-existant upper bits are 0 and thus can't get subtracted.
228 storage_[idx] &= (~(src->GetRawStorageWord(idx)));
290 void BitVector::Copy(const BitVector *src) {
292 int highest_bit = src->GetHighestBitSet();
305 memcpy(storage_, src->GetRawStorage(), kWordBytes * size);