comparison audioDB-internals.h @ 468:4dbd7917bf9e api-inversion

YAY! audioDB::index_query_loop is now disentangled. Hardwired lsh_in_core to true, and invented a new QID flag for !lsh_exact. All tests continue to pass. The plans now: - extract the audiodb_query_spec() function from inside audioDB::query, and move audioDB::query (and the timestamps function) to audioDB.cpp; - write libtests/0036 and libtests/0037 in terms of audiodb_query_spec(); - rewrite all the other libtests in terms of audiodb_query_spec(); - delete audiodb_query() [ and maybe rename audiodb_query_spec(), I dunno]; - implement example bindings (probably to Lisp, because that's what I know best); - see if anyone other than me can work out how the API works. If not, provide documentation; - revise API in the light of user feedback.
author mas01cr
date Wed, 31 Dec 2008 15:44:12 +0000
parents 1030664df98c
children d3afc91d205d
comparison
equal deleted inserted replaced
466:11fccb6a3bd5 468:4dbd7917bf9e
39 * parallel using the same adb handle. (b) is in practice a little 39 * parallel using the same adb handle. (b) is in practice a little
40 * bit academic because at the moment we're seeking all over the disk 40 * bit academic because at the moment we're seeking all over the disk
41 * using adb->fd, but changing to use pread() might win us 41 * using adb->fd, but changing to use pread() might win us
42 * threadsafety eventually. 42 * threadsafety eventually.
43 */ 43 */
44 // FIXME moved to audioDB.h for now 44 typedef struct adb_qstate_internal {
45 45 Accumulator *accumulator;
46 std::set<std::string> *allowed_keys;
47 std::priority_queue<PointPair> *exact_evaluation_queue;
48 LSH *lsh;
49 } adb_qstate_internal_t;
50
51 /* the transparent version of the opaque (forward-declared) adb_t. */
46 struct adb { 52 struct adb {
47 char *path; 53 char *path;
48 int fd; 54 int fd;
49 int flags; 55 int flags;
50 adb_header_t *header; 56 adb_header_t *header;
245 int audiodb_query_spec_qpointers(adb_t *, adb_query_spec_t *, double **, double **, adb_qpointers_internal_t *); 251 int audiodb_query_spec_qpointers(adb_t *, adb_query_spec_t *, double **, double **, adb_qpointers_internal_t *);
246 int audiodb_query_queue_loop(adb_t *, adb_query_spec_t *, adb_qstate_internal_t *, double *, adb_qpointers_internal_t *); 252 int audiodb_query_queue_loop(adb_t *, adb_query_spec_t *, adb_qstate_internal_t *, double *, adb_qpointers_internal_t *);
247 int audiodb_query_loop(adb_t *, adb_query_spec_t *, adb_qstate_internal_t *); 253 int audiodb_query_loop(adb_t *, adb_query_spec_t *, adb_qstate_internal_t *);
248 char *audiodb_index_get_name(const char *, double, uint32_t); 254 char *audiodb_index_get_name(const char *, double, uint32_t);
249 bool audiodb_index_exists(const char *, double, uint32_t); 255 bool audiodb_index_exists(const char *, double, uint32_t);
256 int audiodb_index_query_loop(adb_t *, adb_query_spec_t *, adb_qstate_internal_t *);