From fa7d5ca5e5e0299892a5ea76bc07875f49258ccb Mon Sep 17 00:00:00 2001 From: fclaude Date: Tue, 24 Mar 2009 02:27:03 +0000 Subject: [PATCH] more fixes git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/XMLTree@277 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- libcds/src/static_bitsequence/sdarray.cpp | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libcds/src/static_bitsequence/sdarray.cpp b/libcds/src/static_bitsequence/sdarray.cpp index 2b08dc3..f904aa3 100644 --- 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 -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, @@ -194,13 +194,13 @@ unsigned int __popCount(uint x) { //r = ((r & 0xffff0000)>>16) + (r & 0x0000ffff); r = ((r>>16) + r) & 63; #else - r = __popCount[x & 0xff]; + r = _popCount[x & 0xff]; x >>= 8; - r += __popCount[x & 0xff]; + r += _popCount[x & 0xff]; x >>= 8; - r += __popCount[x & 0xff]; + r += _popCount[x & 0xff]; x >>= 8; - r += __popCount[x & 0xff]; + r += _popCount[x & 0xff]; #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 = __popCount[x & 0xff]; + r = _popCount[x & 0xff]; #endif return r; } @@ -387,11 +387,11 @@ int selectd2_select(selectd2 *select, int i,int f) { if (f == 1) { rr = p & (8-1); - r -= __popCount[*q >> (8-1-rr)]; + r -= _popCount[*q >> (8-1-rr)]; //p = p - rr; while (1) { - rr = __popCount[*q]; + rr = _popCount[*q]; 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); - r -= __popCount[(*q ^ 0xff) >> (8-1-rr)]; + r -= _popCount[(*q ^ 0xff) >> (8-1-rr)]; //p = p - rr; while (1) { - rr = __popCount[*q ^ 0xff]; + rr = _popCount[*q ^ 0xff]; 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); - r -= __popCount[*q >> (8-1-rr)]; + r -= _popCount[*q >> (8-1-rr)]; //p = p - rr; while (1) { - rr = __popCount[*q]; + rr = _popCount[*q]; 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) { - rr = __popCount[*q]; + rr = _popCount[*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); - r -= __popCount[(*q ^ 0xff) >> (8-1-rr)]; + r -= _popCount[(*q ^ 0xff) >> (8-1-rr)]; //p = p - rr; while (1) { - rr = __popCount[*q ^ 0xff]; + rr = _popCount[*q ^ 0xff]; 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) { - rr = __popCount[*q ^ 0xff]; + rr = _popCount[*q ^ 0xff]; if (r + rr >= i) break; r += rr; q++; -- 2.17.1