- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for OnesCount16 (0.17 sec)
-
src/math/bits/example_test.go
func ExampleOnesCount8() { fmt.Printf("OnesCount8(%08b) = %d\n", 14, bits.OnesCount8(14)) // Output: // OnesCount8(00001110) = 3 } func ExampleOnesCount16() { fmt.Printf("OnesCount16(%016b) = %d\n", 14, bits.OnesCount16(14)) // Output: // OnesCount16(0000000000001110) = 3 } func ExampleOnesCount32() { fmt.Printf("OnesCount32(%032b) = %d\n", 14, bits.OnesCount32(14)) // Output:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:16:09 UTC 2019 - 5.3K bytes - Viewed (0) -
src/math/bits/make_examples.go
in: 14, out: [4]any{bits.TrailingZeros8(14), bits.TrailingZeros16(14), bits.TrailingZeros32(14), bits.TrailingZeros64(14)}, }, { name: "OnesCount", in: 14, out: [4]any{bits.OnesCount8(14), bits.OnesCount16(14), bits.OnesCount32(14), bits.OnesCount64(14)}, }, { name: "RotateLeft", in: 15, out: [4]any{bits.RotateLeft8(15, 2), bits.RotateLeft16(15, 2), bits.RotateLeft32(15, 2), bits.RotateLeft64(15, 2)},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:27 UTC 2023 - 3K bytes - Viewed (0) -
src/math/bits/bits.go
} // OnesCount8 returns the number of one bits ("population count") in x. func OnesCount8(x uint8) int { return int(pop8tab[x]) } // OnesCount16 returns the number of one bits ("population count") in x. func OnesCount16(x uint16) int { return int(pop8tab[x>>8] + pop8tab[x&0xff]) } // OnesCount32 returns the number of one bits ("population count") in x. func OnesCount32(x uint32) int {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 17.9K bytes - Viewed (0) -
test/codegen/mathbits.go
// ppc64x:"POPCNTW" // wasm:"I64Popcnt" return bits.OnesCount32(n) } func OnesCount16(n uint16) int { // amd64/v2:-".*x86HasPOPCNT" amd64/v3:-".*x86HasPOPCNT" // amd64:"POPCNTL" // arm64:"VCNT","VUADDLV" // s390x:"POPCNT" // ppc64x:"POPCNTW" // wasm:"I64Popcnt" return bits.OnesCount16(n) } func OnesCount8(n uint8) int { // s390x:"POPCNT" // ppc64x:"POPCNTB"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:51:17 UTC 2024 - 19.6K bytes - Viewed (0) -
src/math/bits/bits_test.go
if x <= 1<<8-1 { got := OnesCount8(uint8(x)) if got != want { t.Fatalf("OnesCount8(%#02x) == %d; want %d", uint8(x), got, want) } } if x <= 1<<16-1 { got := OnesCount16(uint16(x)) if got != want { t.Fatalf("OnesCount16(%#04x) == %d; want %d", uint16(x), got, want) } } if x <= 1<<32-1 { got := OnesCount32(uint32(x)) if got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 22 20:11:06 UTC 2020 - 32.5K bytes - Viewed (0) -
api/go1.9.txt
pkg math/bits, func Len16(uint16) int pkg math/bits, func Len32(uint32) int pkg math/bits, func Len64(uint64) int pkg math/bits, func Len8(uint8) int pkg math/bits, func OnesCount(uint) int pkg math/bits, func OnesCount16(uint16) int pkg math/bits, func OnesCount32(uint32) int pkg math/bits, func OnesCount64(uint64) int pkg math/bits, func OnesCount8(uint8) int pkg math/bits, func Reverse(uint) uint
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 04 20:20:20 UTC 2021 - 10.7K bytes - Viewed (0) -
src/cmd/vendor/github.com/ianlancetaylor/demangle/rust.go
seen := uint16(0) for i := len(name) - 17; i < len(name)-1; i++ { digit, ok := hexDigit(name[i]) if !ok { return "", false } seen |= 1 << digit } if bits.OnesCount16(seen) < 5 { return "", false } name = name[:len(name)-20] // The name is a sequence of length-preceded identifiers. var sb strings.Builder for len(name) > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 15 16:39:48 UTC 2023 - 23.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssagen/ssa.go
return s.newValue1(ssa.OpPopCount32, types.Types[types.TINT], args[0]) }, sys.PPC64, sys.ARM64, sys.S390X, sys.Wasm) addF("math/bits", "OnesCount16", makeOnesCountAMD64(ssa.OpPopCount16), sys.AMD64) addF("math/bits", "OnesCount16", func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { return s.newValue1(ssa.OpPopCount16, types.Types[types.TINT], args[0]) },
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 19:44:43 UTC 2024 - 284.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"Len16", Func, 9}, {"Len32", Func, 9}, {"Len64", Func, 9}, {"Len8", Func, 9}, {"Mul", Func, 12}, {"Mul32", Func, 12}, {"Mul64", Func, 12}, {"OnesCount", Func, 9}, {"OnesCount16", Func, 9}, {"OnesCount32", Func, 9}, {"OnesCount64", Func, 9}, {"OnesCount8", Func, 9}, {"Rem", Func, 14}, {"Rem32", Func, 14}, {"Rem64", Func, 14}, {"Reverse", Func, 9},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)