- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 277 for cbits (0.04 sec)
-
src/net/ip.go
return p } // CIDRMask returns an [IPMask] consisting of 'ones' 1 bits // followed by 0s up to a total length of 'bits' bits. // For a mask of this form, CIDRMask is the inverse of [IPMask.Size]. func CIDRMask(ones, bits int) IPMask { if bits != 8*IPv4len && bits != 8*IPv6len { return nil } if ones < 0 || ones > bits { return nil } l := bits / 8 m := make(IPMask, l) n := uint(ones) for i := 0; i < l; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 18 03:13:26 UTC 2024 - 13.9K bytes - Viewed (0) -
src/math/rand/v2/rand.go
// // We want to compute // hi, lo := bits.Mul64(r.Uint64(), n) // In terms of 32-bit halves, this is: // x1:x0 := r.Uint64() // 0:hi, lo1:lo0 := bits.Mul64(x1:x0, 0:n) // Writing out the multiplication in terms of bits.Mul32 allows // using direct hardware instructions and avoiding // the computations involving these zeros. x := r.Uint64() lo1a, lo0 := bits.Mul32(uint32(x), n)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 02:25:49 UTC 2024 - 12.8K bytes - Viewed (0) -
src/net/netip/netip_test.go
if err != nil { t.Fatal(err) } if prefix.Addr() != test.ip { t.Errorf("IP=%s, want %s", prefix.Addr(), test.ip) } if prefix.Bits() != test.bits { t.Errorf("bits=%d, want %d", prefix.Bits(), test.bits) } for _, ip := range test.contains { if !prefix.Contains(ip) { t.Errorf("does not contain %s", ip) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 17:10:01 UTC 2024 - 54.3K bytes - Viewed (0) -
src/crypto/internal/edwards25519/field/fe.go
return nil, errors.New("edwards25519: invalid field element input size") } // Bits 0:51 (bytes 0:8, bits 0:64, shift 0, mask 51). v.l0 = byteorder.LeUint64(x[0:8]) v.l0 &= maskLow51Bits // Bits 51:102 (bytes 6:14, bits 48:112, shift 3, mask 51). v.l1 = byteorder.LeUint64(x[6:14]) >> 3 v.l1 &= maskLow51Bits // Bits 102:153 (bytes 12:20, bits 96:160, shift 6, mask 51). v.l2 = byteorder.LeUint64(x[12:20]) >> 6
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 11.8K bytes - Viewed (0) -
src/crypto/x509/oid.go
} func parseBase128Int(bytes []byte, initOffset int) (ret, offset int, failed bool) { offset = initOffset var ret64 int64 for shifted := 0; offset < len(bytes); shifted++ { // 5 * 7 bits per byte == 35 bits of data // Thus the representation is either non-minimal or too large for an int32 if shifted == 5 { failed = true return } ret64 <<= 7 b := bytes[offset]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 19:10:38 UTC 2024 - 8.3K bytes - Viewed (0) -
src/index/suffixarray/suffixarray_test.go
name = fmt.Sprintf("%dM", size/1e6) } b.Run("size="+name, func(b *testing.B) { for _, bits := range []int{32, 64} { if ^uint(0) == 0xffffffff && bits == 64 { continue } b.Run(fmt.Sprintf("bits=%d", bits), func(b *testing.B) { cleanup := setBits(bits) defer cleanup() b.SetBytes(int64(len(data))) b.ReportAllocs()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 14.1K bytes - Viewed (0) -
src/testing/testing_windows.go
delta := a.now - b.now if queryPerformanceFrequency == 0 { queryPerformanceFrequency = windows.QueryPerformanceFrequency() } hi, lo := bits.Mul64(uint64(delta), uint64(time.Second)/uint64(time.Nanosecond)) quo, _ := bits.Div64(hi, lo, uint64(queryPerformanceFrequency)) return time.Duration(quo) } var queryPerformanceFrequency int64 // highPrecisionTimeSince returns duration since a.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 22:55:25 UTC 2024 - 1.9K bytes - Viewed (0) -
src/runtime/hash_test.go
// There's not enough bits in the hash output, so we // expect a nontrivial number of collisions, and it is // often quite a bit higher than expected. See issue 43130. t.Skip("Flaky on 32-bit systems") } if testing.Short() { t.Skip("Skipping in short mode") } const BITS = 16 for r := 0; r < k.bits(); r++ { for i := 0; i < 1<<BITS; i++ { k.clear()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 17:50:18 UTC 2024 - 18.4K bytes - Viewed (0) -
src/hash/maphash/smhasher_test.go
t.Skip("Too slow on wasm") } if testing.Short() { t.Skip("Skipping in short mode") } const BITS = 16 h := newHashSet() for r := 0; r < k.bits(); r++ { for i := 0; i < 1<<BITS; i++ { k.clear() for j := 0; j < BITS; j++ { if i>>uint(j)&1 != 0 { k.flipBit((j + r) % k.bits()) } } h.add(k.hash()) } h.check(t) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 16:41:38 UTC 2024 - 11K bytes - Viewed (0) -
src/crypto/md5/gen.go
{{end}} // round 1 {{range $i, $s := dup 4 .Shift1 -}} {{printf "arg0 = arg1 + bits.RotateLeft32((((arg2^arg3)&arg1)^arg3)+arg0+x%x+%#08x, %d)" (idx 1 $i) (index $.Table1 $i) $s | relabel}} {{rotate -}} {{end}} // round 2 {{range $i, $s := dup 4 .Shift2 -}} {{printf "arg0 = arg1 + bits.RotateLeft32((((arg1^arg2)&arg3)^arg2)+arg0+x%x+%#08x, %d)" (idx 2 $i) (index $.Table2 $i) $s | relabel}}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 4.7K bytes - Viewed (0)