The NSA Instruction (2019)
vaibhavsagar.com
The NSA Instruction (2019)
1–10 of 98 posts
Re: The NSA Instruction (2019)
#2Re: The NSA Instruction (2019)
#3Re: The NSA Instruction (2019)
#4Re: The NSA Instruction (2019)
#5I have always been a lurker and I am trying to add my account to my Keybase but it requires 2 karma. Could a few kind sirs give me the juice?
I respect the community. I don't wish to spam just trying to take control of all online identities.
Re: The NSA Instruction (2019)
#6Re: The NSA Instruction (2019)
#7Re: The NSA Instruction (2019)
#8while(x != 0) { c += x&1; x >>= 1; }
Is this something that should be added to LLVM?
Edit: flip the order
Re: The NSA Instruction (2019)
#9Here's a dumb question. If someone asked me to do it I'd probably write code like: while(x != 0) { c += x&1; x >>= 1; } Is this something that should be added to LLVM? Edit: flip the order
In the case of the code you’ve posted, you’re shifting out the LSB before you check the bit, so it’s not quite right, but (in general) popcount is recognized and used when possible.
Re: The NSA Instruction (2019)
#10Another interesting application of popcount is in computer vision, namely in matching keypoints that use binary descriptors for 3D reconstruction in SLAM/TRN etc