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.
60 template <int BITS>
69 array_ = reinterpret_cast<void**>((*allocator)(sizeof(void*) << BITS));
70 memset(array_, 0, sizeof(void*) << BITS);
82 // REQUIRES "k" is in range "[0,2^BITS-1]".
91 // REQUIRES "k" is in range "[0,2^BITS-1]".
101 template <int BITS>
104 // Put 32 entries in the root and (2^BITS)/32 entries in each leaf.
108 static const int LEAF_BITS = BITS - ROOT_BITS;
128 ASSERT(k >> BITS == 0);
135 ASSERT(k >> BITS == 0);
161 Ensure(0, 1 << BITS);
189 template <int BITS>
192 // How many bits should we consume at each interior level
193 static const int INTERIOR_BITS = (BITS + 2) / 3; // Round-up
196 // How many bits should we consume at leaf level
197 static const int LEAF_BITS = BITS - 2*INTERIOR_BITS;
230 ASSERT(k >> BITS == 0);
238 ASSERT(k >> BITS == 0);