changeset 295:9347d74a2578

added cap on number of vectors per track to index: this cap is set relative to the maximum pointID available in the dual <trackID,pointID> indexing scheme that is used to identify points and tracks using a single 32-bit unsigned integer that is passed to lshlib.
author mas01mc
date Thu, 31 Jul 2008 19:26:04 +0000
parents 071a108580a4
children f922c234462f
files audioDB.h
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.h	Wed Jul 30 18:00:50 2008 +0000
+++ b/audioDB.h	Thu Jul 31 19:26:04 2008 +0000
@@ -67,6 +67,12 @@
 //#define O2_DEFAULTDBSIZE (4000000000) // 4GB table size
 #define O2_DEFAULTDBSIZE (2000000000) // 2GB table size
 
+// Bit masks for packing (trackID,pointID) into 32-bit unsigned int
+#define LSH_N_POINT_BITS 14
+#define LSH_TRACK_MASK 0xFFFFC000U // 2^18 = 262144 tracks
+#define LSH_POINT_MASK 0x00003FFFU // 2^14 = 16384 points per track
+
+// LIMIT PARAMETERS
 #define O2_DEFAULT_DATASIZE (1355U) // in MB
 #define O2_DEFAULT_NTRACKS (20000U)
 #define O2_DEFAULT_DATADIM (9U)
@@ -81,7 +87,7 @@
 #define O2_MAXNN (1000000U)
 #define O2_MAXSEQLEN (8000U)            // maximum feature vectors in a sequence
 #define O2_MAXTRACKS (10000U)           // maximum number of tracks
-#define O2_MAXTRACKLEN (1000000U)       // maximum shingles in a track
+#define O2_MAXTRACKLEN ((LSH_POINT_MASK+1)) // maximum shingles in a track
 #define O2_MAXDOTPRODUCTMEMORY (sizeof(O2_REALTYPE)*O2_MAXSEQLEN*O2_MAXSEQLEN) // 512MB
 #define O2_DISTANCE_TOLERANCE (1e-6)
 #define O2_SERIAL_MAX_TRACKBATCH (10000)
@@ -99,11 +105,6 @@
 #define O2_N_SEQUENCE_QUERY (0x20U)
 #define O2_ONE_TO_ONE_N_SEQUENCE_QUERY (0x40U)
 
-// Bit masks for packing (trackID,pointID) into 32-bit unsigned int
-#define LSH_N_POINT_BITS 14
-#define LSH_TRACK_MASK 0xFFFFC000 // 2^18 = 262144 tracks
-#define LSH_POINT_MASK 0x00003FFF // 2^14 = 16384 points per track
-
 // Error Codes
 #define O2_ERR_KEYNOTFOUND (0xFFFFFF00)