view power.cpp @ 529:e532666226bc multiprobeLSH

Fixed a problem with inserting into exact_evaluation_queue, duplicate pairs were being inserted when querying multiple hashtables. That is now fixed by adding a unique constraint using set<PointPair> inserts and testing. This should speed things up quite a bit (like, 10-fold with default num tables).
author mas01mc
date Fri, 30 Jan 2009 14:58:35 +0000
parents cc2b97d020b1
children
line wrap: on
line source
extern "C" {
#include "audioDB_API.h"
}
#include "audioDB-internals.h"

int audiodb_power(adb_t *adb) {
  if(!(adb->flags & O_RDWR)) {
    return 1;
  }
  if(adb->header->length > 0) {
    return 1;
  }

  adb->header->flags |= ADB_HEADER_FLAG_POWER;
  return audiodb_sync_header(adb);
}