MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / normalize_worker

Function normalize_worker

src/semantic/semantic.c:1040–1057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1038} norm_ctx_t;
1039
1040static void normalize_worker(int worker_id, void *ctx_ptr) {
1041 (void)worker_id;
1042 norm_ctx_t *nc = ctx_ptr;
1043 while (true) {
1044 int start = atomic_fetch_add_explicit(&nc->next_idx, CBM_SEM_WORKER_STACK_CAP,
1045 memory_order_relaxed);
1046 if (start >= nc->entry_count) {
1047 break;
1048 }
1049 int end = start + CBM_SEM_WORKER_STACK_CAP;
1050 if (end > nc->entry_count) {
1051 end = nc->entry_count;
1052 }
1053 for (int i = start; i < end; i++) {
1054 cbm_sem_normalize(&nc->entries[i].enriched_vec);
1055 }
1056 }
1057}
1058
1059typedef struct {
1060 corpus_entry_t *entries;

Callers

nothing calls this directly

Calls 1

cbm_sem_normalizeFunction · 0.85

Tested by

no test coverage detected