omega-bridge
Omega-first language interoperability: checked conversion backends and native language bindings
Brought by drakestapleton
omega-bridge / evidence / deepinfer / cxx / pairs.hdr-cpp
| 1 | #include <cstdint> |
| 2 | static std::int64_t pairs(std::int64_t begin, std::int64_t end, std::int64_t ratio, std::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 | } |