omega-bridge
Omega-first language interoperability: checked conversion backends and native language bindings
Brought by drakestapleton
omega-bridge / evidence / deepinfer / cxx / pairs.hdr-c
| 1 | #include <stdint.h> |
| 2 | static int64_t pairs(int64_t begin, int64_t end, int64_t ratio, int64_t cap = 0) { |
| 3 | if (cap == 0) |
| 4 | return floor_prefix(end, ratio) - floor_prefix(begin, ratio); |
| 5 | return capped_prefix(end, ratio, cap) - capped_prefix(begin, ratio, cap); |
| 6 | } |