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

Function NextMultiple

tensorflow/core/kernels/clustering_ops.cc:61–64  ·  view source on GitHub ↗

Returns the smallest multiple of a that is not smaller than b.

Source from the content-addressed store, hash-verified

59
60// Returns the smallest multiple of a that is not smaller than b.
61int64 NextMultiple(int64 a, int64 b) {
62 const int64 remainder = b % a;
63 return remainder == 0 ? b : (b + a - remainder);
64}
65
66// Returns a / b rounded up to the next higher integer.
67int64 CeilOfRatio(int64 a, int64 b) { return (a + b - 1) / b; }

Callers 1

ComputeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected