-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bitCount is 0 after intersect or union #40
base: master
Are you sure you want to change the base?
Conversation
use the fact that after i & (i - 1), the right most of set bit of "i" will be unset ref: https://www.quora.com/How-do-you-count-the-number-of-1-bits-in-a-number-using-only-bitwise-operations
@alexandrnikitin I cannot figure out why "java.lang.NoClassDefFoundError: sbt/inc/Analysis" happens, any advice? |
@alexandrnikitin Could you post the JVM crash log or reproduce step? |
I try to reproduce it and looks like something wrong with unsafe.getLong() in UnsafeBitArray.set() but still cannot find out the root cause(I guess the index is too big and cause the offset is beyond the allocated memory). Here's my reproduce log |
I add some debug log in UnsafeBitArray.scala then run looks like the memory is not big enough or the index is too big |
use the fact that after i & (i - 1), the right most of set bit of "i"
will be unset
ref: https://www.quora.com/How-do-you-count-the-number-of-1-bits-in-a-number-using-only-bitwise-operations