MCPcopy Create free account
hub / github.com/numpy/numpy / ceildiv_128_64

Function ceildiv_128_64

numpy/core/src/common/npy_extint128.h:303–315  ·  view source on GitHub ↗

Divide and round up (positive divisor; no overflows) */

Source from the content-addressed store, hash-verified

301
302/* Divide and round up (positive divisor; no overflows) */
303static inline npy_extint128_t
304ceildiv_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_ */

Callers 1

diophantine_dfsFunction · 0.85

Calls 3

divmod_128_64Function · 0.85
add_128Function · 0.85
to_128Function · 0.85

Tested by

no test coverage detected