diff lshlib.cpp @ 589:9119f2fa3efe

Header file rearrangement Make it so that lshlib.h is slightly more like a header file to include to use the LSH ("class G") class, and slightly less a header file for developing that class, by removing all the #includes and moving them to the one-file lshlib.cpp instead. Make audioDB-internals.h slightly more of a project header file, by including there all the headers we actually need. Remove some assert()s (which do nothing) and some Uns32Ts (-> uint32_t)
author mas01cr
date Tue, 11 Aug 2009 21:42:13 +0000
parents 57e459f62788
children 4b79043f90ba
line wrap: on
line diff
--- a/lshlib.cpp	Tue Aug 11 21:42:07 2009 +0000
+++ b/lshlib.cpp	Tue Aug 11 21:42:13 2009 +0000
@@ -1,6 +1,28 @@
+#include <vector>
+#include <queue>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <string.h>
+#include <iostream>
+#include <fstream>
+#include <math.h>
+#include <sys/time.h>
+#include <assert.h>
+#include <float.h>
+#include <signal.h>
+#include <time.h>
+#include <limits.h>
+#include <errno.h>
+#ifdef MT19937
+#include "mt19937/mt19937ar.h"
+#endif
+
 #include "lshlib.h"
 
-
 void err(char*s){cout << s << endl;exit(2);}
 
 Uns32T get_page_logn(){
@@ -8,8 +30,6 @@
   return (Uns32T)log2((double)pagesz);  
 }
 
-unsigned align_up(unsigned x, unsigned w) { return (((x) + ((1<<w)-1)) & ~((1<<w)-1)); }
-
 void H::error(const char* a, const char* b, const char *sysFunc) {
   cerr << a << ": " << b << endl;
   if (sysFunc) {