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

Function build_deco_vec

src/pipeline/pass_semantic_edges.c:541–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541static void build_deco_vec(const char *props_json, cbm_sem_vec_t *out) {
542 memset(out, 0, sizeof(*out));
543 if (!props_json) {
544 return;
545 }
546 char *decos[CBM_SZ_16];
547 int dc = json_str_array(props_json, "decorators", decos, CBM_SZ_16);
548 for (int i = 0; i < dc; i++) {
549 cbm_sem_vec_t ri;
550 cbm_sem_random_index(decos[i], &ri);
551 cbm_sem_vec_add_scaled(out, &ri, PSE_UNIT_POS);
552 free(decos[i]);
553 }
554 cbm_sem_normalize(out);
555}
556
557static void decode_struct_profile(const char *props_json, float *out) {
558 memset(out, 0, sizeof(float) * CBM_AST_PROFILE_DIMS);

Callers 1

collect_workerFunction · 0.85

Calls 4

json_str_arrayFunction · 0.85
cbm_sem_random_indexFunction · 0.85
cbm_sem_vec_add_scaledFunction · 0.85
cbm_sem_normalizeFunction · 0.85

Tested by

no test coverage detected