The per-document token id lists exist for the co-occurrence pass only; * released at the end of finalize so the vector phase runs without them * (783k small blocks on the kernel). */
| 1394 | * released at the end of finalize so the vector phase runs without them |
| 1395 | * (783k small blocks on the kernel). */ |
| 1396 | static void corpus_release_docs(cbm_sem_corpus_t *corpus) { |
| 1397 | for (int d = 0; d < corpus->doc_count; d++) { |
| 1398 | cbm_free(CBM_MEM_CLASS_SEMANTIC, corpus->doc_token_ids[d]); |
| 1399 | corpus->doc_token_ids[d] = NULL; |
| 1400 | } |
| 1401 | } |
| 1402 | |
| 1403 | void cbm_sem_corpus_finalize(cbm_sem_corpus_t *corpus) { |
| 1404 | if (!corpus || corpus->finalized) { |
no test coverage detected