Small fix for time in loading.
[SXSI/XMLTree.git] / libcds / src / static_bitsequence / sdarray.cpp
index 949726a..2294a0c 100644 (file)
@@ -159,8 +159,11 @@ static const unsigned int _popCount[] = {
 };
 
 static unsigned int __selecttbl[8*256];
+static int built = 0;
 
 void make___selecttbl(void) {
+  if(built) return;
+  built = 1;
   int i,x,r;
   uint buf[1];
 
@@ -672,8 +675,8 @@ int selects3_select(selects3 *select, int i) {
        else {
          select->lasts = selectd2_select(select->sd1,i,1);
        }
-       select->lasti = i;*/
-       //lasts3 = select;
+       select->lasti = i;
+       //lasts3 = select; */
        x = selectd2_select(select->sd1,i,1) - (i-1);
   //x = (select->lasts-(i-1)) << d;
   x <<= d;
@@ -755,6 +758,7 @@ int selects3_rank(selects3 *select, int i) {
   q = select->low;
 
   ii = i>>d;
+
   y = selectd2_select(select->sd0,ii,0)+1;
   //  selectd2_select2(select->sd0,ii,0,&y1,&y2);
   //y1++;  y2++;