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

Function normalize_worker

src/semantic/semantic.c:1029–1046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027} norm_ctx_t;
1028
1029static void normalize_worker(int worker_id, void *ctx_ptr) {
1030 (void)worker_id;
1031 norm_ctx_t *nc = ctx_ptr;
1032 while (true) {
1033 int start = atomic_fetch_add_explicit(&nc->next_idx, CBM_SEM_WORKER_STACK_CAP,
1034 memory_order_relaxed);
1035 if (start >= nc->entry_count) {
1036 break;
1037 }
1038 int end = start + CBM_SEM_WORKER_STACK_CAP;
1039 if (end > nc->entry_count) {
1040 end = nc->entry_count;
1041 }
1042 for (int i = start; i < end; i++) {
1043 cbm_sem_normalize(&nc->entries[i].enriched_vec);
1044 }
1045 }
1046}
1047
1048typedef struct {
1049 corpus_entry_t *entries;

Callers

nothing calls this directly

Calls 1

cbm_sem_normalizeFunction · 0.85

Tested by

no test coverage detected