- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 212 for bitPos (0.51 sec)
-
src/runtime/mbitmap.go
} if tp.typ == nil { // Handle small objects. // Clear any bits before the target address. tp.mask &^= (1 << ((target - tp.addr) / goarch.PtrSize)) - 1 // Clear any bits past the limit. if tp.addr+goarch.PtrSize*ptrBits > limit { bits := (tp.addr + goarch.PtrSize*ptrBits - limit) / goarch.PtrSize tp.mask &^= ((1 << (bits)) - 1) << (ptrBits - bits) } return tp } // Move up elem and addr.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 60K bytes - Viewed (0) -
src/crypto/internal/bigmod/nat.go
_ = x[len(z)-1] // bounds check elimination hint for i := range z { hi, lo := bits.Mul(x[i], y) lo, c := bits.Add(lo, z[i], 0) // We use bits.Add with zero to get an add-with-carry instruction that // absorbs the carry from the previous bits.Add. hi, _ = bits.Add(hi, 0, c) lo, c = bits.Add(lo, carry, 0) hi, _ = bits.Add(hi, 0, c) carry = hi z[i] = lo } return carry }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 24K bytes - Viewed (0) -
src/runtime/mksizeclasses.go
} fmt.Fprintf(w, "\n") fmt.Fprintf(w, "// %-9s %-4s %-12s\n", "alignment", "bits", "min obj size") for bits, size := range minAligns { if size == 0 { break } if bits+1 < len(minAligns) && size == minAligns[bits+1] { continue } fmt.Fprintf(w, "// %9d %4d %12d\n", 1<<bits, bits, size) } fmt.Fprintf(w, "\n") } func maxObjsPerSpan(classes []class) int { most := 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 20:31:27 UTC 2024 - 9.6K bytes - Viewed (0) -
src/net/netip/netip.go
// It does not allocate. Unlike [Addr.Prefix], [PrefixFrom] does not mask // off the host bits of ip. // // If bits is less than zero or greater than ip.BitLen, [Prefix.Bits] // will return an invalid value -1. func PrefixFrom(ip Addr, bits int) Prefix { var bitsPlusOne uint8 if !ip.isZero() && bits >= 0 && bits <= ip.BitLen() { bitsPlusOne = uint8(bits) + 1 } return Prefix{ ip: ip.withoutZone(),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 17:10:01 UTC 2024 - 43.2K bytes - Viewed (0) -
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)