comparison create.cpp @ 475:fd890d2b38da

modified point-bits coding for indexing (BREAKS BACKWARDS COMPATIBILITY). Plugged file-descriptor leak in index.cpp
author mas01mc
date Fri, 09 Jan 2009 22:12:57 +0000
parents f9d86b1db21c
children 342822c2d49a
comparison
equal deleted inserted replaced
474:f9d86b1db21c 475:fd890d2b38da
53 off_t auxbytes = databytes / datadim; 53 off_t auxbytes = databytes / datadim;
54 54
55 // For backward-compatibility, Record the point-encoding parameter for LSH indexing in the adb header 55 // For backward-compatibility, Record the point-encoding parameter for LSH indexing in the adb header
56 // If this value is 0 then it will be set to 14 56 // If this value is 0 then it will be set to 14
57 57
58 //#if O2_LSH_N_POINT_BITS > 28 58 #if LSH_N_POINT_BITS > 31
59 //#error "AudioDB Compile ERROR: consistency check of O2_LSH_POINT_BITS failed (>15)" 59 #error "AudioDB Compile ERROR: consistency check of O2_LSH_POINT_BITS failed (>31)"
60 //#endif 60 #endif
61 61
62 dbH->flags |= LSH_N_POINT_BITS << 28; 62 dbH->flags |= LSH_N_POINT_BITS << 27;
63 63
64 // If database will fit in a single file the vectors are copied into the AudioDB instance 64 // If database will fit in a single file the vectors are copied into the AudioDB instance
65 // Else all the vectors are left on the FileSystem and we use the dataOffset as storage 65 // Else all the vectors are left on the FileSystem and we use the dataOffset as storage
66 // for the location of the features, powers and times files (assuming that arbitrary keys are used for the fileTable) 66 // for the location of the features, powers and times files (assuming that arbitrary keys are used for the fileTable)
67 if(ntracks<O2_LARGE_ADB_NTRACKS && datasize<O2_LARGE_ADB_SIZE){ 67 if(ntracks<O2_LARGE_ADB_NTRACKS && datasize<O2_LARGE_ADB_SIZE){