Divide and round up (positive divisor; no overflows) */
| 301 | |
| 302 | /* Divide and round up (positive divisor; no overflows) */ |
| 303 | static inline npy_extint128_t |
| 304 | ceildiv_128_64(npy_extint128_t a, npy_int64 b) |
| 305 | { |
| 306 | npy_extint128_t result; |
| 307 | npy_int64 remainder; |
| 308 | char overflow = 0; |
| 309 | assert(b > 0); |
| 310 | result = divmod_128_64(a, b, &remainder); |
| 311 | if (a.sign > 0 && remainder != 0) { |
| 312 | result = add_128(result, to_128(1), &overflow); |
| 313 | } |
| 314 | return result; |
| 315 | } |
| 316 | |
| 317 | #endif /* NUMPY_CORE_SRC_COMMON_NPY_EXTINT128_H_ */ |
no test coverage detected