comparison audioDB.h @ 120:fce73e4afa15

Make a start on refactoring: work the DB header initialization into its own function, used from both initTables and batchinsert. This actually removes a mmap()/munmap() pair from inside the batchinsert loop over files. Not really sure why that was there in the first place; maybe to sync the header to disk more forcefully? In any case, no change in behaviour should happen as a result of this code change.
author mas01cr
date Tue, 16 Oct 2007 11:47:51 +0000
parents 942e9ab50e9c
children f789aa32382f
comparison
equal deleted inserted replaced
114:942e9ab50e9c 120:fce73e4afa15
162 void pointQuery(const char* dbName, const char* inFile, adb__queryResult *adbQueryResult=0); 162 void pointQuery(const char* dbName, const char* inFile, adb__queryResult *adbQueryResult=0);
163 void trackPointQuery(const char* dbName, const char* inFile, adb__queryResult *adbQueryResult=0); 163 void trackPointQuery(const char* dbName, const char* inFile, adb__queryResult *adbQueryResult=0);
164 void trackSequenceQueryNN(const char* dbName, const char* inFile, adb__queryResult *adbQueryResult=0); 164 void trackSequenceQueryNN(const char* dbName, const char* inFile, adb__queryResult *adbQueryResult=0);
165 void trackSequenceQueryRad(const char* dbName, const char* inFile, adb__queryResult *adbQueryResult=0); 165 void trackSequenceQueryRad(const char* dbName, const char* inFile, adb__queryResult *adbQueryResult=0);
166 166
167 void initDBHeader(const char *dbName, bool forWrite);
167 void initTables(const char* dbName, bool forWrite, const char* inFile); 168 void initTables(const char* dbName, bool forWrite, const char* inFile);
168 void unitNorm(double* X, unsigned d, unsigned n, double* qNorm); 169 void unitNorm(double* X, unsigned d, unsigned n, double* qNorm);
169 void unitNormAndInsertL2(double* X, unsigned dim, unsigned n, unsigned append); 170 void unitNormAndInsertL2(double* X, unsigned dim, unsigned n, unsigned append);
170 void insertTimeStamps(unsigned n, ifstream* timesFile, double* timesdata); 171 void insertTimeStamps(unsigned n, ifstream* timesFile, double* timesdata);
171 unsigned getKeyPos(char* key); 172 unsigned getKeyPos(char* key);