projects
/
SXSI
/
XMLTree.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test added back
[SXSI/XMLTree.git]
/
libcds
/
src
/
static_bitsequence
/
sdarray.cpp
diff --git
a/libcds/src/static_bitsequence/sdarray.cpp
b/libcds/src/static_bitsequence/sdarray.cpp
index
2b08dc3
..
f904aa3
100644
(file)
--- a/
libcds/src/static_bitsequence/sdarray.cpp
+++ b/
libcds/src/static_bitsequence/sdarray.cpp
@@
-139,7
+139,7
@@
uint __getbits(uint *B, int i, int d) {
}
#endif
}
#endif
-static const unsigned int _
_
popCount[] = {
+static const unsigned int _popCount[] = {
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
@@
-194,13
+194,13
@@
unsigned int __popCount(uint x) {
//r = ((r & 0xffff0000)>>16) + (r & 0x0000ffff);
r = ((r>>16) + r) & 63;
#else
//r = ((r & 0xffff0000)>>16) + (r & 0x0000ffff);
r = ((r>>16) + r) & 63;
#else
- r = _
_
popCount[x & 0xff];
+ r = _popCount[x & 0xff];
x >>= 8;
x >>= 8;
- r += _
_
popCount[x & 0xff];
+ r += _popCount[x & 0xff];
x >>= 8;
x >>= 8;
- r += _
_
popCount[x & 0xff];
+ r += _popCount[x & 0xff];
x >>= 8;
x >>= 8;
- r += _
_
popCount[x & 0xff];
+ r += _popCount[x & 0xff];
#endif
return r;
}
#endif
return r;
}
@@
-214,7
+214,7
@@
unsigned int __popCount8(uint x) {
r = ((r & 0xcc)>>2) + (r & 0x33);
r = ((r>>4) + r) & 0x0f;
#else
r = ((r & 0xcc)>>2) + (r & 0x33);
r = ((r>>4) + r) & 0x0f;
#else
- r = _
_
popCount[x & 0xff];
+ r = _popCount[x & 0xff];
#endif
return r;
}
#endif
return r;
}
@@
-387,11
+387,11
@@
int selectd2_select(selectd2 *select, int i,int f) {
if (f == 1) {
rr = p & (8-1);
if (f == 1) {
rr = p & (8-1);
- r -= _
_
popCount[*q >> (8-1-rr)];
+ r -= _popCount[*q >> (8-1-rr)];
//p = p - rr;
while (1) {
//p = p - rr;
while (1) {
- rr = _
_
popCount[*q];
+ rr = _popCount[*q];
if (r + rr >= i) break;
r += rr;
//p += 8;
if (r + rr >= i) break;
r += rr;
//p += 8;
@@
-402,11
+402,11
@@
int selectd2_select(selectd2 *select, int i,int f) {
}
else {
rr = p & (8-1);
}
else {
rr = p & (8-1);
- r -= _
_
popCount[(*q ^ 0xff) >> (8-1-rr)];
+ r -= _popCount[(*q ^ 0xff) >> (8-1-rr)];
//p = p - rr;
while (1) {
//p = p - rr;
while (1) {
- rr = _
_
popCount[*q ^ 0xff];
+ rr = _popCount[*q ^ 0xff];
if (r + rr >= i) break;
r += rr;
//p += 8;
if (r + rr >= i) break;
r += rr;
//p += 8;
@@
-463,11
+463,11
@@
int selectd2_select2(selectd2 *select, int i,int f, int *st, int *en) {
if (f == 1) {
rr = p & (8-1);
if (f == 1) {
rr = p & (8-1);
- r -= _
_
popCount[*q >> (8-1-rr)];
+ r -= _popCount[*q >> (8-1-rr)];
//p = p - rr;
while (1) {
//p = p - rr;
while (1) {
- rr = _
_
popCount[*q];
+ rr = _popCount[*q];
if (r + rr >= i) break;
r += rr;
//p += 8;
if (r + rr >= i) break;
r += rr;
//p += 8;
@@
-479,7
+479,7
@@
int selectd2_select2(selectd2 *select, int i,int f, int *st, int *en) {
if ((i>>logL) == ((i+1)>>logL)) {
i++;
while (1) {
if ((i>>logL) == ((i+1)>>logL)) {
i++;
while (1) {
- rr = _
_
popCount[*q];
+ rr = _popCount[*q];
if (r + rr >= i) break;
r += rr;
q++;
if (r + rr >= i) break;
r += rr;
q++;
@@
-494,11
+494,11
@@
int selectd2_select2(selectd2 *select, int i,int f, int *st, int *en) {
}
else {
rr = p & (8-1);
}
else {
rr = p & (8-1);
- r -= _
_
popCount[(*q ^ 0xff) >> (8-1-rr)];
+ r -= _popCount[(*q ^ 0xff) >> (8-1-rr)];
//p = p - rr;
while (1) {
//p = p - rr;
while (1) {
- rr = _
_
popCount[*q ^ 0xff];
+ rr = _popCount[*q ^ 0xff];
if (r + rr >= i) break;
r += rr;
//p += 8;
if (r + rr >= i) break;
r += rr;
//p += 8;
@@
-510,7
+510,7
@@
int selectd2_select2(selectd2 *select, int i,int f, int *st, int *en) {
if ((i>>logL) == ((i+1)>>logL)) {
i++;
while (1) {
if ((i>>logL) == ((i+1)>>logL)) {
i++;
while (1) {
- rr = _
_
popCount[*q ^ 0xff];
+ rr = _popCount[*q ^ 0xff];
if (r + rr >= i) break;
r += rr;
q++;
if (r + rr >= i) break;
r += rr;
q++;