Integer division x / y, assuming x and y >=0, but treats x/0 = x
| 631 | |
| 632 | // Integer division x / y, assuming x and y >=0, but treats x/0 = x |
| 633 | Output SafeDivHelper(const Scope& scope, const Output& x, const Output& y) { |
| 634 | return Div(scope, x, Maximum(scope, y, Const(scope, 1))); |
| 635 | } |
| 636 | |
| 637 | // Helper function for reduction ops. |
| 638 | // |