comparison create.cpp @ 485:282c651e2fbb memory-leaks

NON BACKWARD-COMPATIBLE indexing change: Modified N_POINT_BITS encoding in audioDB database file header. Now requires a 5 bit field, MSB of 32 bit flag field.
author mas01mc
date Sat, 10 Jan 2009 13:35:27 +0000
parents 2d5c3f8e8c22
children fbcc1303dfeb
comparison
equal deleted inserted replaced
484:d515ce3864fc 485:282c651e2fbb
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 > 15 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){