Skip to content

Commit beaa6e8

Browse files
authored
fix bitset (#179)
1 parent 24783bc commit beaa6e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

grape/utils/bitset.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ limitations under the License.
2525
#include "thread_pool.h"
2626

2727
#define WORD_SIZE(n) (((n) + 63ul) >> 6)
28-
#define BYTE_SIZE(n) (((n) + 63ul) >> 3)
28+
#define BYTE_SIZE(n) (WORD_SIZE(n) * sizeof(uint64_t))
2929

3030
#define WORD_INDEX(i) ((i) >> 6)
31-
#define BIT_OFFSET(i) ((i) &0x3f)
31+
#define BIT_OFFSET(i) ((i) & 0x3f)
3232

3333
#define ROUND_UP(i) (((i) + 63ul) & (~63ul))
3434
#define ROUND_DOWN(i) ((i) & (~63ul))

0 commit comments

Comments
 (0)