MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetLinearBucket

Function GetLinearBucket

tensorflow/core/kernels/tensor_flag_utils.cc:145–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143
144template <typename Tindices>
145Tindices GetLinearBucket(const Tindices value, const Tindices bucket_size) {
146 const Tindices next_multiple_of_bucket_size =
147 (value + bucket_size - 1) / bucket_size * bucket_size;
148 return next_multiple_of_bucket_size - (bucket_size - 1);
149}
150
151template <typename Tindices>
152Tindices GetPowerBucket(const Tindices value, const Tindices bucket_size) {

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68