Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for nlz8 (0.12 sec)

  1. src/cmd/compile/internal/ssa/rewrite.go

    func canLoadUnaligned(c *Config) bool {
    	return c.ctxt.Arch.Alignment == 1
    }
    
    // nlzX returns the number of leading zeros.
    func nlz64(x int64) int { return bits.LeadingZeros64(uint64(x)) }
    func nlz32(x int32) int { return bits.LeadingZeros32(uint32(x)) }
    func nlz16(x int16) int { return bits.LeadingZeros16(uint16(x)) }
    func nlz8(x int8) int   { return bits.LeadingZeros8(uint8(x)) }
    
    // ntzX returns the number of trailing zeros.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/_gen/generic.rules

    (Ctz8  (Const8  [c])) && config.PtrSize == 4 => (Const32 [int32(ntz8(c))])
    
    (Ctz64 (Const64 [c])) && config.PtrSize == 8 => (Const64 [int64(ntz64(c))])
    (Ctz32 (Const32 [c])) && config.PtrSize == 8 => (Const64 [int64(ntz32(c))])
    (Ctz16 (Const16 [c])) && config.PtrSize == 8 => (Const64 [int64(ntz16(c))])
    (Ctz8  (Const8  [c])) && config.PtrSize == 8 => (Const64 [int64(ntz8(c))])
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 22:21:05 UTC 2024
    - 135.3K bytes
    - Viewed (0)
  3. src/math/bits/make_tables.go

    // license that can be found in the LICENSE file.
    
    // Code generated by go run make_tables.go. DO NOT EDIT.
    
    package bits
    
    `)
    
    func main() {
    	buf := bytes.NewBuffer(header)
    
    	gen(buf, "ntz8tab", ntz8)
    	gen(buf, "pop8tab", pop8)
    	gen(buf, "rev8tab", rev8)
    	gen(buf, "len8tab", len8)
    
    	out, err := format.Source(buf.Bytes())
    	if err != nil {
    		log.Fatal(err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:27 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  4. src/math/big/arith.go

    	hi, lo := bits.Mul(uint(x), uint(y))
    	var cc uint
    	lo, cc = bits.Add(lo, uint(c), 0)
    	return Word(hi + cc), Word(lo)
    }
    
    // nlz returns the number of leading zeros in x.
    // Wraps bits.LeadingZeros call for convenience.
    func nlz(x Word) uint {
    	return uint(bits.LeadingZeros(uint(x)))
    }
    
    // The resulting carry c is either 0 or 1.
    func addVV_g(z, x, y []Word) (c Word) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 28 20:09:27 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  5. src/math/bits/bits_test.go

    		t.Fatalf("UintSize = %d; want %d", UintSize, want)
    	}
    }
    
    func TestLeadingZeros(t *testing.T) {
    	for i := 0; i < 256; i++ {
    		nlz := tab[i].nlz
    		for k := 0; k < 64-8; k++ {
    			x := uint64(i) << uint(k)
    			if x <= 1<<8-1 {
    				got := LeadingZeros8(uint8(x))
    				want := nlz - k + (8 - 8)
    				if x == 0 {
    					want = 8
    				}
    				if got != want {
    					t.Fatalf("LeadingZeros8(%#02x) == %d; want %d", x, 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)
  6. staging/src/k8s.io/apiserver/pkg/storage/etcd3/testing/testingcert/certificates.go

    -----END CERTIFICATE-----
    `
    const KeyFileContent = `
    -----BEGIN RSA PRIVATE KEY-----
    MIIEpAIBAAKCAQEA6JbkDrmFYZufBx6hkczT457FThw8X8Wk/7sE4rmLvKZJYCp8
    p826KjZMHWUASsLWhftuBNeJ4/XS7PcVhZA2uUOfQjgpIDzzysU+3HwbCjEf/nZ8
    aUTzQFRX08145U/6ZjNrSKGgWPb4+FdUv8llvH0//ZEtI1sSer44+TwA3zZKQ22k
    XNqfC2lvd/6S3vfzvwo2hC7FhloIXWwrjkqfuaMpIO79vfFRtOs3CfJUAY50vMjs
    IJY674QKhlgAfhk0cdqRvJh5ZDtT2V6hwQ4+WrGxAAqh1oJiO4Bo4UhzPz9bzWr7
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Dec 16 06:50:02 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  7. src/math/big/nat_test.go

    			benchmarkNatMul(b, n)
    		})
    	}
    }
    
    func TestNLZ(t *testing.T) {
    	var x Word = _B >> 1
    	for i := 0; i <= _W; i++ {
    		if int(nlz(x)) != i {
    			t.Errorf("failed at %x: got %d want %d", x, nlz(x), i)
    		}
    		x >>= 1
    	}
    }
    
    type shiftTest struct {
    	in    nat
    	shift uint
    	out   nat
    }
    
    var leftShiftTests = []shiftTest{
    	{nil, 0, nil},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 09 15:29:36 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  8. src/runtime/softfloat64.go

    // 128/64 -> 64 quotient, 64 remainder.
    // adapted from hacker's delight
    func divlu(u1, u0, v uint64) (q, r uint64) {
    	const b = 1 << 32
    
    	if u1 >= v {
    		return 1<<64 - 1, 1<<64 - 1
    	}
    
    	// s = nlz(v); v <<= s
    	s := uint(0)
    	for v&(1<<63) == 0 {
    		s++
    		v <<= 1
    	}
    
    	vn1 := v >> 32
    	vn0 := v & (1<<32 - 1)
    	un32 := u1<<s | u0>>(64-s)
    	un10 := u0 << s
    	un1 := un10 >> 32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 08 17:58:41 UTC 2021
    - 11.5K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/rewritegeneric.go

    	// result: (Const32 [int32(ntz8(c))])
    	for {
    		if v_0.Op != OpConst8 {
    			break
    		}
    		c := auxIntToInt8(v_0.AuxInt)
    		if !(config.PtrSize == 4) {
    			break
    		}
    		v.reset(OpConst32)
    		v.AuxInt = int32ToAuxInt(int32(ntz8(c)))
    		return true
    	}
    	// match: (Ctz8 (Const8 [c]))
    	// cond: config.PtrSize == 8
    	// result: (Const64 [int64(ntz8(c))])
    	for {
    		if v_0.Op != OpConst8 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 18:24:47 UTC 2024
    - 812.2K bytes
    - Viewed (0)
  10. src/math/big/float.go

    func fnorm(m nat) int64 {
    	if debugFloat && (len(m) == 0 || m[len(m)-1] == 0) {
    		panic("msw of mantissa is 0")
    	}
    	s := nlz(m[len(m)-1])
    	if s > 0 {
    		c := shlVU(m, m, s)
    		if debugFloat && c != 0 {
    			panic("nlz or shlVU incorrect")
    		}
    	}
    	return int64(s)
    }
    
    // SetInt sets z to the (possibly rounded) value of x and returns z.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 15:46:54 UTC 2024
    - 44.5K bytes
    - Viewed (0)
Back to top