Skip to content

Commit ee06f00

Browse files
committed
apply clang-format to adaptive batch size code
1 parent 62d9bdf commit ee06f00

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

bindings/cpp/src/dynamic_vamana_index_impl.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,8 @@ class DynamicVamanaIndexImpl {
133133
do {
134134
// Estimate how many candidates we need to find remaining
135135
// results given the observed hit rate so far.
136-
batch_size = predict_further_processing(
137-
total_checked, found, k, batch_size
138-
);
136+
batch_size =
137+
predict_further_processing(total_checked, found, k, batch_size);
139138
// Cap to avoid oversized batches in the iterator.
140139
batch_size = std::min(batch_size, max_batch_size);
141140
iterator.next(batch_size);

bindings/cpp/src/svs_runtime_utils.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,8 @@ auto dispatch_storage_kind(StorageKind kind, F&& f, Args&&... args) {
435435
// based on the observed hit rate so far.
436436
// If no hits yet, returns `hint` unchanged.
437437
// The caller should cap the result to a max batch size if needed.
438-
inline size_t predict_further_processing(
439-
size_t processed, size_t hits, size_t goal, size_t hint
440-
) {
438+
inline size_t
439+
predict_further_processing(size_t processed, size_t hits, size_t goal, size_t hint) {
441440
if (hits == 0 || hits >= goal) {
442441
return hint;
443442
}

bindings/cpp/src/vamana_index_impl.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,8 @@ class VamanaIndexImpl {
139139
do {
140140
// Estimate how many candidates we need to find remaining
141141
// results given the observed hit rate so far.
142-
batch_size = predict_further_processing(
143-
total_checked, found, k, batch_size
144-
);
142+
batch_size =
143+
predict_further_processing(total_checked, found, k, batch_size);
145144
// Cap to avoid oversized batches in the iterator.
146145
batch_size = std::min(batch_size, max_batch_size);
147146
iterator.next(batch_size);

0 commit comments

Comments
 (0)