mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
Add unit tests for distance functions (L2, cosine, hamming)
Add test-only wrappers behind SQLITE_VEC_TEST compile flag to expose static distance functions for unit testing. Includes tests for distance_l2_sqr_float (4 cases), distance_cosine_float (3 cases), and distance_hamming (4 cases). Print active SIMD flags at test start. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
79d5818015
commit
aab9b37de2
4 changed files with 141 additions and 1 deletions
2
Makefile
2
Makefile
|
|
@ -190,7 +190,7 @@ test-loadable-watch:
|
|||
watchexec --exts c,py,Makefile --clear -- make test-loadable
|
||||
|
||||
test-unit:
|
||||
$(CC) -DSQLITE_CORE tests/test-unit.c sqlite-vec.c vendor/sqlite3.c -I./ -Ivendor -o $(prefix)/test-unit && $(prefix)/test-unit
|
||||
$(CC) -DSQLITE_CORE -DSQLITE_VEC_TEST tests/test-unit.c sqlite-vec.c vendor/sqlite3.c -I./ -Ivendor -o $(prefix)/test-unit && $(prefix)/test-unit
|
||||
|
||||
site-dev:
|
||||
npm --prefix site run dev
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue