You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libsql-sqlite3/src/vectordiskann.c
+48-7Lines changed: 48 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@
49
49
*/
50
50
#ifndefSQLITE_OMIT_VECTOR
51
51
52
+
#include"math.h"
52
53
#include"sqliteInt.h"
53
54
#include"vectorIndexInt.h"
54
55
@@ -64,6 +65,11 @@
64
65
// stack simplify memory managment code and also doesn't impose very strict limits here since 128 bytes for column names should be enough for almost all use cases
65
66
#defineDISKANN_SQL_RENDER_LIMIT 128
66
67
68
+
// limit to the maximum size of DiskANN block (128 MB)
69
+
// even with 1MB we can store tens of thousands of nodes in several GBs - which is already too much
70
+
// but we are "generous" here and allow user to store up to 128MB blobs
71
+
#defineDISKANN_MAX_BLOCK_SZ 134217728
72
+
67
73
/*
68
74
* Due to historical reasons parameter for index block size were stored as u16 value and divided by 512 (2^9)
69
75
* So, we will make inverse transform before initializing index from stored parameters
0 commit comments