Where nMaxEdges value determined from node block size and node and edge vector sizes. Note, that node vector size can be different from edge vector size (for example, due to edge vector compression)
legacyField were added by Pekka but new implementations of DiskANN don't use it. But I preserved it for compatibility reasons.
Changes
Add vectordiskann.c and vectorIndexInt.h files (we will continue to add more source code to these files)
Add BlobSpot helper class which aims to simplify reusal of opened blobs and favour sqlite3_blob_reopen API when possible in order to avoid unnecessary close/open calls
Add a bunch of nodeBin* methods which operates over raw binary representation and change it accordingly to DiskANN algo needs
Testing
This branch were extracted from vector branch and it has some tests which validates basic scenarios
Also, test_libsql_diskann.c were added with some basic tests for added functionality
You can compile it with cc test_libsql_diskann.c -I ../ -L ../.libs -llibsql -o test_libsql_diskann
Context
First branch in the series for DiskANN implementation. This PR introduce few utility classes and accessors for DiskANN node block in binary format.
DiskANN node block v1 format has following structure:
Where
nMaxEdges
value determined from node block size and node and edge vector sizes. Note, that node vector size can be different from edge vector size (for example, due to edge vector compression)legacyField
were added by Pekka but new implementations of DiskANN don't use it. But I preserved it for compatibility reasons.Changes
vectordiskann.c
andvectorIndexInt.h
files (we will continue to add more source code to these files)BlobSpot
helper class which aims to simplify reusal of opened blobs and favoursqlite3_blob_reopen
API when possible in order to avoid unnecessaryclose/open
callsnodeBin*
methods which operates over raw binary representation and change it accordingly to DiskANN algo needsTesting
vector
branch and it has some tests which validates basic scenariostest_libsql_diskann.c
were added with some basic tests for added functionalitycc test_libsql_diskann.c -I ../ -L ../.libs -llibsql -o test_libsql_diskann