< prev index next > src/hotspot/share/libadt/vectset.hpp
Print this page
// These sets can grow or shrink, based on the initial size and the largest
// element currently in them.
//------------------------------VectorSet--------------------------------------
class VectorSet : public AnyObj {
private:
static const uint word_bits = 5;
static const uint bit_mask = 31;
// Used 32-bit words
uint _size;
- uint32_t* _data;
// Allocated words
! uint _data_size;
Arena* _set_arena;
void init(Arena* arena);
// Grow vector to required word capacity
void grow(uint new_word_capacity);
// These sets can grow or shrink, based on the initial size and the largest
// element currently in them.
//------------------------------VectorSet--------------------------------------
class VectorSet : public AnyObj {
+ friend VectorSet intersect(const VectorSet&, const VectorSet&);
+
private:
static const uint word_bits = 5;
static const uint bit_mask = 31;
// Used 32-bit words
uint _size;
// Allocated words
! uint32_t* _data;
Arena* _set_arena;
void init(Arena* arena);
// Grow vector to required word capacity
void grow(uint new_word_capacity);
grow(word);
}
uint32_t mask = 1U << (elem & bit_mask);
_data[word] |= mask;
}
+
+ #ifndef PRODUCT
+ void print_on(outputStream* st) const override;
+ #endif // PRODUCT
};
+ VectorSet intersect(const VectorSet& lhs, const VectorSet& rhs);
#endif // SHARE_LIBADT_VECTSET_HPP
< prev index next >