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

Function RoundUpToNearest

tensorflow/compiler/xla/util.h:449–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447// then multiplying by the divisor. For example: RoundUpToNearest(13, 8) => 16
448template <typename T>
449T RoundUpToNearest(T value, T divisor) {
450 return CeilOfRatio(value, divisor) * divisor;
451}
452
453// Rounds the value down to a multiple of the divisor by first calling
454// FloorOfRatio then multiplying by the divisor. For example:

Callers 5

FindChunkCandidateMethod · 0.50
HandleSortMethod · 0.50

Calls 1

CeilOfRatioFunction · 0.70

Tested by

no test coverage detected