Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for bucketMask (0.11 sec)

  1. src/runtime/map_fast32.go

    	}
    	var b *bmap
    	if h.B == 0 {
    		// One-bucket table. No need to hash.
    		b = (*bmap)(h.buckets)
    	} else {
    		hash := t.Hasher(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
    		m := bucketMask(h.B)
    		b = (*bmap)(add(h.buckets, (hash&m)*uintptr(t.BucketSize)))
    		if c := h.oldbuckets; c != nil {
    			if !h.sameSizeGrow() {
    				// There used to be half as many buckets; mask down one more power of two.
    				m >>= 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  2. src/runtime/map_fast64.go

    	}
    	var b *bmap
    	if h.B == 0 {
    		// One-bucket table. No need to hash.
    		b = (*bmap)(h.buckets)
    	} else {
    		hash := t.Hasher(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
    		m := bucketMask(h.B)
    		b = (*bmap)(add(h.buckets, (hash&m)*uintptr(t.BucketSize)))
    		if c := h.oldbuckets; c != nil {
    			if !h.sameSizeGrow() {
    				// There used to be half as many buckets; mask down one more power of two.
    				m >>= 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. src/runtime/map_faststr.go

    			}
    		}
    		return unsafe.Pointer(&zeroVal[0])
    	}
    dohash:
    	hash := t.Hasher(noescape(unsafe.Pointer(&ky)), uintptr(h.hash0))
    	m := bucketMask(h.B)
    	b := (*bmap)(add(h.buckets, (hash&m)*uintptr(t.BucketSize)))
    	if c := h.oldbuckets; c != nil {
    		if !h.sameSizeGrow() {
    			// There used to be half as many buckets; mask down one more power of two.
    			m >>= 1
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  4. src/runtime/map.go

    func bucketShift(b uint8) uintptr {
    	// Masking the shift amount allows overflow checks to be elided.
    	return uintptr(1) << (b & (goarch.PtrSize*8 - 1))
    }
    
    // bucketMask returns 1<<b - 1, optimized for code generation.
    func bucketMask(b uint8) uintptr {
    	return bucketShift(b) - 1
    }
    
    // tophash calculates the tophash value for hash.
    func tophash(hash uintptr) uint8 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 57.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/test/inl_test.go

    	want := map[string][]string{
    		"runtime": {
    			"add",
    			"acquirem",
    			"add1",
    			"addb",
    			"adjustpanics",
    			"adjustpointer",
    			"alignDown",
    			"alignUp",
    			"bucketMask",
    			"bucketShift",
    			"chanbuf",
    			"evacuated",
    			"fastlog2",
    			"float64bits",
    			"funcspdelta",
    			"getm",
    			"getMCache",
    			"isDirectIface",
    			"itabHashFunc",
    			"nextslicecap",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 10.7K bytes
    - Viewed (0)
Back to top