Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for OnesCount64 (0.19 sec)

  1. src/runtime/mpallocbits.go

    	}
    	_ = b[i/64]
    	j := i + n - 1
    	if i/64 == j/64 {
    		return uint(sys.OnesCount64((b[i/64] >> (i % 64)) & ((1 << n) - 1)))
    	}
    	_ = b[j/64]
    	s += uint(sys.OnesCount64(b[i/64] >> (i % 64)))
    	for k := i/64 + 1; k < j/64; k++ {
    		s += uint(sys.OnesCount64(b[k]))
    	}
    	s += uint(sys.OnesCount64(b[j/64] & ((1 << (j%64 + 1)) - 1)))
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 15:13:43 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  2. test/codegen/mathbits.go

    	// ppc64x:"POPCNTD"
    	// wasm:"I64Popcnt"
    	return bits.OnesCount(n)
    }
    
    func OnesCount64(n uint64) int {
    	// amd64/v2:-".*x86HasPOPCNT" amd64/v3:-".*x86HasPOPCNT"
    	// amd64:"POPCNTQ"
    	// arm64:"VCNT","VUADDLV"
    	// s390x:"POPCNT"
    	// ppc64x:"POPCNTD"
    	// wasm:"I64Popcnt"
    	return bits.OnesCount64(n)
    }
    
    func OnesCount32(n uint32) int {
    	// amd64/v2:-".*x86HasPOPCNT" amd64/v3:-".*x86HasPOPCNT"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:51:17 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  3. src/runtime/gc_test.go

    		// This is a serious bug - an object is live (due to the KeepAlive
    		// call below), but isn't reported as such.
    		t.Fatalf("live object not in reachable set; want %b, got %b", want, got)
    	}
    	if bits.OnesCount64(got&^want) > 1 {
    		// Note: we can occasionally have a value that is retained even though
    		// it isn't live, due to conservative scanning of stack frames.
    		// See issue 67204. For now, we allow a "slop" of 1 unintentionally
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  4. src/runtime/export_test.go

    			if chunk == nil {
    				continue
    			}
    			pg := chunk.scavenged.popcntRange(0, pallocChunkPages)
    			slow.HeapReleased += uint64(pg) * pageSize
    		}
    		for _, p := range allp {
    			pg := sys.OnesCount64(p.pcache.scav)
    			slow.HeapReleased += uint64(pg) * pageSize
    		}
    
    		getg().m.mallocing--
    	})
    
    	startTheWorld(stw)
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  5. src/runtime/mbitmap.go

    		// but that's OK. We only care about how many bits are 1, not
    		// about the order we discover them in.
    		mrkBits := *(*uint64)(unsafe.Pointer(s.gcmarkBits.bytep(i)))
    		count += sys.OnesCount64(mrkBits)
    	}
    	return count
    }
    
    // Read the bytes starting at the aligned pointer p into a uintptr.
    // Read is little-endian.
    func readUintptr(p *byte) uintptr {
    	x := *(*uintptr)(unsafe.Pointer(p))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssagen/ssa.go

    			// Merge results.
    			s.startBlock(bEnd)
    			return s.variable(n, types.Types[types.TINT])
    		}
    	}
    	addF("math/bits", "OnesCount64",
    		makeOnesCountAMD64(ssa.OpPopCount64),
    		sys.AMD64)
    	addF("math/bits", "OnesCount64",
    		func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value {
    			return s.newValue1(ssa.OpPopCount64, types.Types[types.TINT], args[0])
    		},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Len64", Func, 9},
    		{"Len8", Func, 9},
    		{"Mul", Func, 12},
    		{"Mul32", Func, 12},
    		{"Mul64", Func, 12},
    		{"OnesCount", Func, 9},
    		{"OnesCount16", Func, 9},
    		{"OnesCount32", Func, 9},
    		{"OnesCount64", Func, 9},
    		{"OnesCount8", Func, 9},
    		{"Rem", Func, 14},
    		{"Rem32", Func, 14},
    		{"Rem64", Func, 14},
    		{"Reverse", Func, 9},
    		{"Reverse16", Func, 9},
    		{"Reverse32", Func, 9},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top