Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 439 for uint16 (0.16 sec)

  1. src/strconv/makeisprint.go

    			lo = i
    		}
    	}
    	return
    }
    
    func to16(x []uint32) []uint16 {
    	var y []uint16
    	for _, v := range x {
    		if uint32(uint16(v)) != v {
    			panic("bad 32->16 conversion")
    		}
    		y = append(y, uint16(v))
    	}
    	return y
    }
    
    func main() {
    	flag.Parse()
    
    	rang, except := scan(0, 0xFFFF)
    	range16 = to16(rang)
    	except16 = to16(except)
    	range32, except32 = scan(0x10000, unicode.MaxRune)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 18:56:17 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/net/route/route_openbsd.go

    		Type:    int(b[3]),
    		Flags:   int(nativeEndian.Uint32(b[16:20])),
    		Index:   int(nativeEndian.Uint16(b[6:8])),
    		ID:      uintptr(nativeEndian.Uint32(b[24:28])),
    		Seq:     int(nativeEndian.Uint32(b[28:32])),
    		raw:     b[:l],
    	}
    	ll := int(nativeEndian.Uint16(b[4:6]))
    	if len(b) < ll {
    		return nil, errInvalidMessage
    	}
    	errno := syscall.Errno(nativeEndian.Uint32(b[32:36]))
    	if errno != 0 {
    		m.Err = errno
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 05 19:54:32 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  3. test/fixedbugs/issue57955.go

    package main
    
    func main() {
    	Decode[int16](nil)
    	Decode[uint16](nil)
    	Decode[float64](nil)
    }
    
    func DecodeInt16(b []byte) (int16, int) {
    	return 0, 0
    }
    
    func DecodeUint16(b []byte) (uint16, int) {
    	return 0, 0
    }
    
    func DecodeFloat64(b []byte) (float64, int) {
    	return 0, 0
    }
    
    func Decode[T any](b []byte) (T, int) {
    	switch any(*new(T)).(type) {
    	case int16:
    		v, n := DecodeInt16(b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 01 19:29:08 UTC 2023
    - 794 bytes
    - Viewed (0)
  4. src/vendor/golang.org/x/net/route/interface_openbsd.go

    	}
    	bodyOff := int(nativeEndian.Uint16(b[4:6]))
    	if len(b) < bodyOff {
    		return nil, errInvalidMessage
    	}
    	m := &InterfaceAddrMessage{
    		Version: int(b[2]),
    		Type:    int(b[3]),
    		Flags:   int(nativeEndian.Uint32(b[12:16])),
    		Index:   int(nativeEndian.Uint16(b[6:8])),
    		raw:     b[:l],
    	}
    	var err error
    	m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[12:16])), parseKernelInetAddr, b[bodyOff:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 05 19:54:32 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  5. src/crypto/internal/hpke/hpke.go

    	}
    	return kemInfo.curve.NewPublicKey(bytes)
    }
    
    type uint128 struct {
    	hi, lo uint64
    }
    
    func (u uint128) addOne() uint128 {
    	lo, carry := bits.Add64(u.lo, 1, 0)
    	return uint128{u.hi + carry, lo}
    }
    
    func (u uint128) bitLen() int {
    	return bits.Len64(u.hi) + bits.Len64(u.lo)
    }
    
    func (u uint128) bytes() []byte {
    	b := make([]byte, 16)
    	binary.BigEndian.PutUint64(b[0:], u.hi)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:33:33 UTC 2024
    - 7K bytes
    - Viewed (0)
  6. src/unicode/utf16/utf16_test.go

    		}
    	}
    }
    
    type decodeTest struct {
    	in  []uint16
    	out []rune
    }
    
    var decodeTests = []decodeTest{
    	{[]uint16{1, 2, 3, 4}, []rune{1, 2, 3, 4}},
    	{[]uint16{0xffff, 0xd800, 0xdc00, 0xd800, 0xdc01, 0xd808, 0xdf45, 0xdbff, 0xdfff},
    		[]rune{0xffff, 0x10000, 0x10001, 0x12345, 0x10ffff}},
    	{[]uint16{0xd800, 'a'}, []rune{0xfffd, 'a'}},
    	{[]uint16{0xdfff}, []rune{0xfffd}},
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 19:08:48 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/text/unicode/norm/trie.go

    // the value for b is by r.value + (b - r.lo) * stride.
    func (t *sparseBlocks) lookup(n uint32, b byte) uint16 {
    	offset := t.offset[n]
    	header := t.values[offset]
    	lo := offset + 1
    	hi := lo + uint16(header.lo)
    	for lo < hi {
    		m := lo + (hi-lo)/2
    		r := t.values[m]
    		if r.lo <= b && b <= r.hi {
    			return r.value + uint16(b-r.lo)*header.value
    		}
    		if b < r.lo {
    			hi = m
    		} else {
    			lo = m + 1
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  8. src/vendor/golang.org/x/text/unicode/norm/trie.go

    // the value for b is by r.value + (b - r.lo) * stride.
    func (t *sparseBlocks) lookup(n uint32, b byte) uint16 {
    	offset := t.offset[n]
    	header := t.values[offset]
    	lo := offset + 1
    	hi := lo + uint16(header.lo)
    	for lo < hi {
    		m := lo + (hi-lo)/2
    		r := t.values[m]
    		if r.lo <= b && b <= r.hi {
    			return r.value + uint16(b-r.lo)*header.value
    		}
    		if b < r.lo {
    			hi = m
    		} else {
    			lo = m + 1
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  9. src/internal/byteorder/byteorder.go

    		byte(v>>8),
    		byte(v>>16),
    		byte(v>>24),
    	)
    }
    
    func LeUint64(b []byte) uint64 {
    	_ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
    	return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
    		uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
    }
    
    func LePutUint64(b []byte, v uint64) {
    	_ = b[7] // early bounds check to guarantee safety of writes below
    	b[0] = byte(v)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 20:31:29 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ir/bitset.go

    package ir
    
    type bitset8 uint8
    
    func (f *bitset8) set(mask uint8, b bool) {
    	if b {
    		*(*uint8)(f) |= mask
    	} else {
    		*(*uint8)(f) &^= mask
    	}
    }
    
    func (f bitset8) get2(shift uint8) uint8 {
    	return uint8(f>>shift) & 3
    }
    
    // set2 sets two bits in f using the bottom two bits of b.
    func (f *bitset8) set2(shift uint8, b uint8) {
    	// Clear old bits.
    	*(*uint8)(f) &^= 3 << shift
    	// Set new bits.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 29 22:03:56 UTC 2022
    - 734 bytes
    - Viewed (0)
Back to top