MCPcopy Create free account
hub / github.com/VectorDB-NTU/RaBitQ-Library / div_round_up

Function div_round_up

include/rabitqlib/utils/tools.hpp:36–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36constexpr size_t div_round_up(size_t val, size_t div) {
37 return (val / div) + static_cast<size_t>((val % div) != 0);
38}
39
40constexpr size_t round_up_to_multiple(size_t val, size_t multiple_of) {
41 return multiple_of * (div_round_up(val, multiple_of));

Callers 4

round_up_to_multipleFunction · 0.85
round_up_to_multiple_ofFunction · 0.85
batch_data_bytesMethod · 0.85
init_clustersMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected