MCPcopy Index your code
hub / github.com/PaddlePaddle/FastDeploy / ceil_div

Function ceil_div

fastdeploy/utils.py:734–745  ·  view source on GitHub ↗

Perform ceiling division of two integers. Args: x: the dividend. y: the divisor. Returns: The result of the ceiling division.

(x: int, y: int)

Source from the content-addressed store, hash-verified

732
733
734def ceil_div(x: int, y: int) -> int:
735 """
736 Perform ceiling division of two integers.
737
738 Args:
739 x: the dividend.
740 y: the divisor.
741
742 Returns:
743 The result of the ceiling division.
744 """
745 return (x + y - 1) // y
746
747
748def none_or_str(value):

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected