X-Git-Url: http://git.nguyen.vg/gitweb/?p=SXSI%2Flibbp.git;a=blobdiff_plain;f=bp-darray.c;fp=bp-darray.c;h=800ebb14a0e5cc0e3d2951ff3ed2be51440c5e01;hp=a4aec4b577e882e6fe50cd0cdf78b30841935eec;hb=9614bef67d59eaa2413e2b06e5587c6caec57840;hpb=6d6af09ca53949cbcabb1677c63a50b2371225ff diff --git a/bp-darray.c b/bp-darray.c index a4aec4b..800ebb1 100644 --- a/bp-darray.c +++ b/bp-darray.c @@ -1,7 +1,6 @@ #include #include #include "bp-darray.h" -#include "bp-utils.h" #define PBS (sizeof(pb)*8) #define D (1<> logRR; - i_rrr = i >> logRRR; - r = da->rl[i>>logR] + da->rm[i_rr]; - - j = (i_rrr) & (RR/RRR-1); - while (j > 0) { - r += da->rs[((i_rr)<<(logRR-logRRR))+j-1]; - j--; - } - - p = da->buf + ((i_rrr)<<(logRRR-logD)); - j = i & (RRR-1); - while (j >= D) { - r += popcount(*p++); - j -= D; - } - r += popcount(*p >> (D-1-j)); - - return r; -} - int bp_darray_select_bsearch(darray *da, int i, pb (*getpat)(pb *)) { int j;