On 06/12/2013 01:47, Ben Pfaff wrote:
On Wed, Dec 04, 2013 at 05:38:29PM +0800, Alexander Wu wrote:
V4:
   Add bitmap_count1 function to count all 1 bits.

I suggest using the count_1bits() function to speed this up.

Thanks,

Ben.



Hi Ben,

Thanks for your suggestion! I'll update the function with more
efficiently algorithm. But I found a problem.

              | type              | length
  ----------------------------------------------
  bitmap_*    | unsigned long *   | L32
  count1_bits | uint64_t          | 64

  * L means Least

Do you have suggestion about how to use count1_bits with unsigned
long safely?

BTW, the algorithm hamming weight looks good:
  http://en.wikipedia.org/wiki/Hamming_weight

Best regards,
Alexander Wu

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to