Home | History | Annotate | Download | only in src

Lines Matching refs:BITS

39 // the bits every time.
41 // The BITS parameter should be the number of bits required to hold
43 // page offset fits in lower 12 bits), BITS == 20.
62 template <int BITS>
65 static const int LENGTH = 1 << BITS;
73 array_ = reinterpret_cast<void**>((*allocator)(sizeof(void*) << BITS));
74 memset(array_, 0, sizeof(void*) << BITS);
92 if ((k >> BITS) > 0) {
98 // REQUIRES "k" is in range "[0,2^BITS-1]".
109 while (k < (1 << BITS)) {
118 template <int BITS>
121 // Put 32 entries in the root and (2^BITS)/32 entries in each leaf.
125 static const int LEAF_BITS = BITS - ROOT_BITS;
147 if ((k >> BITS) > 0 || root_[i1] == NULL) {
154 ASSERT(k >> BITS == 0);
184 Ensure(0, 1 << BITS);
188 while (k < (1 << BITS)) {
207 template <int BITS>
210 // How many bits should we consume at each interior level
211 static const int INTERIOR_BITS = (BITS + 2) / 3; // Round-up
214 // How many bits should we consume at leaf level
215 static const int LEAF_BITS = BITS - 2*INTERIOR_BITS;
251 if ((k >> BITS) > 0 ||
259 ASSERT(k >> BITS == 0);
300 while (k < (Number(1) << BITS)) {