34 uint64_t rightOne = 0;
35 uint64_t nextHigherOneBit = 0;
36 uint64_t rightOnesPattern = 0;
42 rightOne = x & -
static_cast<signed>(x);
46 nextHigherOneBit = x + rightOne;
51 rightOnesPattern = x ^ nextHigherOneBit;
54 rightOnesPattern = (rightOnesPattern) / rightOne;
57 rightOnesPattern >>= 2;
62 next = nextHigherOneBit | rightOnesPattern;