| 150 | |
| 151 | template <typename Tindices> |
| 152 | Tindices GetPowerBucket(const Tindices value, const Tindices bucket_size) { |
| 153 | if (bucket_size == 1) { |
| 154 | return 1; |
| 155 | } |
| 156 | return std::pow(bucket_size, std::floor(std::log(bucket_size * (value - 1)) / |
| 157 | std::log(bucket_size)) - |
| 158 | 1) + |
| 159 | 1; |
| 160 | } |
| 161 | |
| 162 | #define REGISTER_SPARSE_UTIL_FUNCTIONS(TypeIndex) \ |
| 163 | template float FindConfigValueForKey<float, TypeIndex>( \ |