Home | History | Annotate | Download | only in ADT

Lines Matching defs:BitVector

1 //===- llvm/ADT/BitVector.h - Bit vectors -----------------------*- C++ -*-===//
10 // This file implements the BitVector class.
74 class BitVector {
83 unsigned Size; // Size of bitvector in bits.
89 friend class BitVector;
95 reference(BitVector &b, unsigned Idx) {
121 typedef const_set_bits_iterator_impl<BitVector> const_set_bits_iterator;
134 /// BitVector default ctor - Creates an empty bitvector.
135 BitVector() : Size(0) {}
137 /// BitVector ctor - Creates a bitvector of specified number of bits. All
139 explicit BitVector(unsigned s, bool t = false) : Size(s) {
147 /// BitVector copy ctor.
148 BitVector(const BitVector &RHS) : Size(RHS.size()) {
159 BitVector(BitVector &&RHS) : Bits(RHS.Bits), Size(RHS.Size) {
164 ~BitVector() { std::free(Bits.data()); }
166 /// empty - Tests whether there are no bits in this bitvector.
169 /// size - Returns the number of bits in this bitvector.
366 /// clear - Removes all bits from the bitvector. Does not change capacity.
371 /// resize - Grow or shrink the bitvector.
379 // Set any old unused bits that are now included in the BitVector. This
398 BitVector &set() {
404 BitVector &set(unsigned Idx) {
411 BitVector &set(unsigned I, unsigned E) {
439 BitVector &reset() {
444 BitVector &reset(unsigned Idx) {
450 BitVector &reset(unsigned I, unsigned E) {
478 BitVector &flip() {
485 BitVector &flip(unsigned Idx) {
507 bool anyCommon(const BitVector &RHS) const {
517 bool operator==(const BitVector &RHS) const {
538 bool operator!=(const BitVector &RHS) const {
543 BitVector &operator&=(const BitVector &RHS) {
550 // Any bits that are just in this bitvector become zero, because they aren't
560 BitVector &reset(const BitVector &RHS) {
571 bool test(const BitVector &RHS) const {
586 BitVector &operator|=(const BitVector &RHS) {
594 BitVector &operator^=(const BitVector &RHS) {
602 BitVector &operator>>=(unsigned N) {
651 BitVector &operator<<=(unsigned N) {
702 const BitVector &operator=(const BitVector &RHS) {
714 // Grow the bitvector to have enough elements.
727 const BitVector &operator=(BitVector &&RHS) {
740 void swap(BitVector &RHS) {
755 // given, the bit mask is assumed to cover the entire BitVector.
792 /// represents a BitVector where 0xBBBBAAAA contain the least significant
793 /// bits. So if we want to shift the BitVector left by 2 words, we need to
914 static inline size_t capacity_in_bytes(const BitVector &X) {
921 /// Implement std::swap in terms of BitVector swap.
923 swap(llvm::BitVector &LHS, llvm::BitVector &RHS) {