- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for sequenceOfOnes (0.23 sec)
-
src/cmd/compile/internal/ssa/rewrite.go
// 0111, 1011, 1101, 1110 -- 0111 rotate // 0101, 1010 -- 01 rotate, repeat return true } return sequenceOfOnes(x) || sequenceOfOnes(^x) } // sequenceOfOnes tests whether a constant is a sequence of ones in binary, with leading and trailing zeros. func sequenceOfOnes(x uint64) bool { y := x & -x // lowest set bit of x. x is good iff x+y is a power of 2 y += x return (y-1)&y == 0 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 19:02:52 UTC 2024 - 64.2K bytes - Viewed (0) -
src/cmd/internal/obj/arm64/asm7.go
// 0111, 1011, 1101, 1110 -- 0111 rotate // 0101, 1010 -- 01 rotate, repeat return true } return sequenceOfOnes(x) || sequenceOfOnes(^x) } // sequenceOfOnes tests whether a constant is a sequence of ones in binary, with leading and trailing zeros. func sequenceOfOnes(x uint64) bool { y := x & -x // lowest set bit of x. x is good iff x+y is a power of 2 y += x return (y-1)&y == 0 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 15:44:14 UTC 2024 - 201.1K bytes - Viewed (0)