Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 100 for bitPos (0.1 sec)

  1. test/codegen/mathbits.go

    	// ppc64x: -"ADDC", "ADDE", -"ADDZE"
    	r[2], c = bits.Add64(p[2], p[2], c)
    }
    
    func Add64MSaveC(p, q, r, c *[2]uint64) {
    	// ppc64x: "ADDC\tR", "ADDZE"
    	r[0], c[0] = bits.Add64(p[0], q[0], 0)
    	// ppc64x: "ADDC\t[$]-1", "ADDE", "ADDZE"
    	r[1], c[1] = bits.Add64(p[1], q[1], c[0])
    }
    
    func Add64PanicOnOverflowEQ(a, b uint64) uint64 {
    	r, c := bits.Add64(a, b, 0)
    	// s390x:"BRC\t[$]3,",-"ADDE"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:51:17 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  2. src/runtime/mpallocbits.go

    		b.set(i)
    		return
    	}
    	// Set bits [i, j].
    	j := i + n - 1
    	if i/64 == j/64 {
    		b[i/64] |= ((uint64(1) << n) - 1) << (i % 64)
    		return
    	}
    	_ = b[j/64]
    	// Set leading bits.
    	b[i/64] |= ^uint64(0) << (i % 64)
    	for k := i/64 + 1; k < j/64; k++ {
    		b[k] = ^uint64(0)
    	}
    	// Set trailing bits.
    	b[j/64] |= (uint64(1) << (j%64 + 1)) - 1
    }
    
    // setAll sets all the bits of b.
    func (b *pageBits) setAll() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 15:13:43 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/math/big/float.go

    	m := uint32(len(z.mant)) // present mantissa length in words
    	bits := m * _W           // present mantissa bits; bits > 0
    	if bits <= z.prec {
    		// mantissa fits => nothing to do
    		return
    	}
    	// bits > z.prec
    
    	// Rounding is based on two bits: the rounding bit (rbit) and the
    	// sticky bit (sbit). The rbit is the bit immediately before the
    	// z.prec leading mantissa bits (the "0.5"). The sbit is set if any
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 15:46:54 UTC 2024
    - 44.5K bytes
    - Viewed (0)
  10. src/crypto/rsa/rsa.go

    func GenerateMultiPrimeKey(random io.Reader, nprimes int, bits int) (*PrivateKey, error) {
    	randutil.MaybeReadByte(random)
    
    	if boring.Enabled && random == boring.RandReader && nprimes == 2 &&
    		(bits == 2048 || bits == 3072 || bits == 4096) {
    		bN, bE, bD, bP, bQ, bDp, bDq, bQinv, err := boring.GenerateKeyRSA(bits)
    		if err != nil {
    			return nil, err
    		}
    		N := bbig.Dec(bN)
    		E := bbig.Dec(bE)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 23.4K bytes
    - Viewed (0)
Back to top