comparison create.cpp @ 500:fbcc1303dfeb memory-leaks

Fixed bug in LSH_N_POINT_BITS coding when using AudioDB with LSH indexes
author mas01mc
date Sat, 10 Jan 2009 20:01:53 +0000
parents 282c651e2fbb
children
comparison
equal deleted inserted replaced
486:920919d62542 500:fbcc1303dfeb
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 LSH_N_POINT_BITS > 31 58 #if LSH_N_POINT_BITS > LSH_POINT_BITS_FIELD_MAX
59 #error "AudioDB Compile ERROR: consistency check of O2_LSH_POINT_BITS failed (>31)" 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 << 27; 62 dbH->flags |= LSH_N_POINT_BITS << LSH_POINT_BITS_FIELD_POSITION;
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){