- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 150 for bitLen (0.14 sec)
-
pkg/registry/core/service/ipallocator/cidrallocator.go
} func (c *MetaAllocator) getAllocator(ip net.IP) (*Allocator, error) { c.muTree.Lock() defer c.muTree.Unlock() address := ipToAddr(ip) prefix := netip.PrefixFrom(address, address.BitLen()) // Use the largest subnet to allocate addresses because // all the other subnets will be contained. _, allocator, ok := c.tree.ShortestPrefixMatch(prefix) if !ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 13.2K bytes - Viewed (0) -
src/math/big/natconv_test.go
} func itoa(x nat, base int) []byte { // special cases switch { case base < 2: panic("illegal base") case len(x) == 0: return []byte("0") } // allocate buffer for conversion i := x.bitLen()/log2(Word(base)) + 1 // +1: round up s := make([]byte, i) // don't destroy x q := nat(nil).set(x) // convert for len(q) > 0 { i-- var r Word q, r = q.divW(q, Word(base))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 12:54:00 UTC 2019 - 16.8K bytes - Viewed (0) -
src/crypto/internal/edwards25519/field/fe_test.go
} if err := quick.Check(f1, nil); err != nil { t.Error(err) } } // fromBig sets v = n, and returns v. The bit length of n must not exceed 256. func (v *Element) fromBig(n *big.Int) *Element { if n.BitLen() > 32*8 { panic("edwards25519: invalid field element input size") } buf := make([]byte, 0, 32) for _, word := range n.Bits() { for i := 0; i < bits.UintSize; i += 8 { if len(buf) >= cap(buf) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:26:17 UTC 2023 - 13.9K bytes - Viewed (0) -
api/go1.18.txt
pkg net/netip, method (Addr) AppendTo([]uint8) []uint8 pkg net/netip, method (Addr) As16() [16]uint8 pkg net/netip, method (Addr) As4() [4]uint8 pkg net/netip, method (Addr) AsSlice() []uint8 pkg net/netip, method (Addr) BitLen() int pkg net/netip, method (Addr) Compare(Addr) int pkg net/netip, method (Addr) Is4() bool pkg net/netip, method (Addr) Is4In6() bool pkg net/netip, method (Addr) Is6() bool
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 20:31:46 UTC 2023 - 13K bytes - Viewed (0) -
pilot/pkg/serviceregistry/serviceentry/conversion.go
hostAddresses = append(hostAddresses, &HostAddress{hostname, address}) } else if cidr, cidrErr := netip.ParsePrefix(address); cidrErr == nil { newAddress := address if cidr.Bits() == cidr.Addr().BitLen() { // /32 mask. Remove the /32 and make it a normal IP address newAddress = cidr.Addr().String() } hostAddresses = append(hostAddresses, &HostAddress{hostname, newAddress}) } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 29 02:03:58 UTC 2024 - 16.9K bytes - Viewed (0) -
src/go/constant/value_test.go
}{ {0, 0}, {1, 1}, {-16, 5}, {1 << 61, 62}, {1 << 62, 63}, {-1 << 62, 63}, {-1 << 63, 64}, } func TestBitLen(t *testing.T) { for _, test := range bitLenTests { if got := BitLen(MakeInt64(test.val)); got != test.want { t.Errorf("%v: got %v, want %v", test.val, got, test.want) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 15.6K bytes - Viewed (0) -
src/math/big/float.go
// If z's precision is 0, it is changed to the larger of x.BitLen() // or 64 (and rounding will have no effect). func (z *Float) SetInt(x *Int) *Float { // TODO(gri) can be more efficient if z.prec > 0 // but small compared to the size of x, or if there // are many trailing 0's. bits := uint32(x.BitLen()) if z.prec == 0 { z.prec = umax32(bits, 64) } z.acc = Exact z.neg = x.neg
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 15:46:54 UTC 2024 - 44.5K bytes - Viewed (0) -
src/math/big/float_test.go
"1.2", "3.14159265", // TODO(gri) expand } { var x Rat _, ok := x.SetString(want) if !ok { t.Errorf("invalid fraction %s", want) continue } n := max(x.Num().BitLen(), x.Denom().BitLen()) var f1, f2 Float f2.SetPrec(1000) f1.SetRat(&x) f2.SetRat(&x) // check precision when set automatically if n < 64 { n = 64 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 11 20:22:45 UTC 2024 - 51.9K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/ambient/authorization.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 15 16:23:36 UTC 2024 - 18.4K bytes - Viewed (0) -
pkg/util/iptree/iptree.go
// or, if IPv4, the broadcast address (RFC 1878). func (t *Tree[T]) GetHostIPPrefixMatches(ip netip.Addr) map[netip.Prefix]T { // walk the tree to find all the prefixes containing this IP ipPrefix := netip.PrefixFrom(ip, ip.BitLen()) prefixes := map[netip.Prefix]T{} t.WalkPath(ipPrefix, func(k netip.Prefix, v T) bool { if prefixContainIP(k, ipPrefix.Addr()) { prefixes[k] = v } return false }) return prefixes }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17.7K bytes - Viewed (0)