Lines Matching refs:kHashbits
44 // kKeybits - kHashbits, and the values are bit strings of length kValuebits.
56 // kHashbits controls the size of the cache. The best value for
57 // kHashbits will of course depend on the application. Perhaps try
58 // tuning the value of kHashbits by measuring different values on your
65 // for a cache entry is (kKeybits - kHashbits) + kValuebits. Suppose
67 // chose kHashbits >= 11 so that cache entries fit in a uint32.
93 // 2^kHashbits - 1.
102 // This is a direct-mapped cache with 2^kHashbits entries;
107 // a uint16 for each entry if kHashbits >= 11.
127 // the table is controlled by kHashbits, and the type of each entry in
134 static const size_t kHashbits = 12;
140 COMPILE_ASSERT(kHashbits <= kKeybits, hash_function);
141 COMPILE_ASSERT(kKeybits - kHashbits + kValuebits <= kTbits,
169 for (int i = 0; i < 1 << kHashbits; i++) {
185 // doing u | v. kHashbits determines where in a K to find the upper
189 const int shift = kHashbits - kValuebits;
190 // Assume kHashbits >= kValuebits. It would be easy to lift this assumption.
198 const int shift = kHashbits - kValuebits;
199 // Assume kHashbits >= kValuebits. It would be easy to lift this assumption.
204 return static_cast<size_t>(key) & N_ONES_(size_t, kHashbits);
213 static const int kUpperbits = kKeybits - kHashbits;
224 T array_[1 << kHashbits];