Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 227 for cpos (0.08 sec)

  1. src/cmd/compile/internal/ir/copy.go

    // If pos.IsKnown(), it sets the source position of newly allocated Nodes to pos.
    func DeepCopy(pos src.XPos, n Node) Node {
    	var edit func(Node) Node
    	edit = func(x Node) Node {
    		switch x.Op() {
    		case ONAME, ONONAME, OLITERAL, ONIL, OTYPE:
    			return x
    		}
    		x = Copy(x)
    		if pos.IsKnown() {
    			x.SetPos(pos)
    		}
    		EditChildren(x, edit)
    		return x
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:57:57 UTC 2023
    - 1K bytes
    - Viewed (0)
  2. src/runtime/testdata/testprog/numcpu_freebsd.go

    	if !ok {
    		return nil, fmt.Errorf("invalid output from '%s', '\\n' not found: %s", cmdline, output)
    	}
    
    	_, cpus, ok := bytes.Cut(output, []byte(":"))
    	if !ok {
    		return nil, fmt.Errorf("invalid output from '%s', ':' not found: %s", cmdline, output)
    	}
    
    	var list []string
    	for _, val := range bytes.Split(cpus, []byte(",")) {
    		index := string(bytes.TrimSpace(val))
    		if len(index) == 0 {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 30 20:09:46 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  3. test/fixedbugs/issue15528.go

    	{(*RWS)(nil), "*main.RWS (*main.RWS)(nil) rws"},
    }
    
    // Test correct handling of direct interface values
    var (
    	one  int         = 1
    	iptr interface{} = &one
    	clos int
    	f    interface{} = func() { clos++ }
    	deep interface{} = [1]struct{ a *[2]byte }{{a: &[2]byte{'z', 'w'}}}
    	ch   interface{} = make(chan bool, 1)
    )
    
    func main() {
    	var fail bool
    	for i, test := range efaces {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 12 14:31:26 UTC 2016
    - 3.1K bytes
    - Viewed (0)
  4. test/fixedbugs/issue10353.go

    package main
    
    func main() {
    	c := make(chan bool)
    	// Create a new goroutine to get a default-size stack segment.
    	go func() {
    		x := new(X)
    		clos(x.foo)()
    		c <- true
    	}()
    	<-c
    }
    
    type X int
    
    func (x *X) foo() {
    }
    
    func clos(x func()) func() {
    	f := func() {
    		print("")
    		x() // This statement crashed, because the partial call was allocated on the old stack.
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 01 13:47:20 UTC 2015
    - 917 bytes
    - Viewed (0)
  5. src/runtime/os_illumos.go

    	n := int32(sysconf(__SC_NPROCESSORS_ONLN))
    	if n < 1 {
    		return 1
    	}
    
    	if cents := int32(getcpucap()); cents > 0 {
    		// Convert from a percentage of CPUs to a number of CPUs,
    		// rounding up to make use of a fractional CPU
    		// e.g., 336% becomes 4 CPUs
    		ncap := (cents + 99) / 100
    		if ncap < n {
    			return ncap
    		}
    	}
    
    	return n
    }
    
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 28 18:06:12 UTC 2019
    - 3.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test quotes are escaped.
        assertEquals("&quot;test&quot;", xmlAttributeEscaper.escape("\"test\""));
        assertEquals("&apos;test&apos;", xmlAttributeEscaper.escape("\'test'"));
        // Test all escapes
        assertEquals(
            "a&quot;b&lt;c&gt;d&amp;e&quot;f&apos;", xmlAttributeEscaper.escape("a\"b<c>d&e\"f'"));
        // Test '\t', '\n' and '\r' are escaped.
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Dec 16 19:54:45 UTC 2020
    - 4.7K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/cpumanager/policy_none.go

    	return nil
    }
    
    // Assignable CPUs are the ones that can be exclusively allocated to pods that meet the exclusivity requirement
    // (ie guaranteed QoS class and integral CPU request).
    // Assignability of CPUs as a concept is only applicable in case of static policy i.e. scenarios where workloads
    // CAN get exclusive access to core(s).
    // Hence, we return empty set here: no cpus are assignable according to above definition with this policy.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 03 16:26:09 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  8. pkg/kubelet/kuberuntime/kuberuntime_container_windows_test.go

    	require.NoError(t, err)
    
    	limit := int64(3000)
    	expectedCpuMax := 10 * limit / int64(winstats.ProcessorCount())
    	// Above, we're setting the limit to 3 CPUs. But we can't expect more than 100% of the CPUs
    	// we have. (e.g.: if we only have 2 CPUs, we can't have 150% CPU max).
    	if expectedCpuMax > 10000 {
    		expectedCpuMax = 10000
    	}
    	expectedWindowsConfig := &runtimeapi.WindowsContainerConfig{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/trim.go

    		if bIsStmt {
    			sawStmt := false
    			for _, v := range s.Values {
    				if isPoorStatementOp(v.Op) {
    					continue
    				}
    				if v.Pos.SameFileAndLine(bPos) {
    					v.Pos = v.Pos.WithIsStmt()
    				}
    				sawStmt = true
    				break
    			}
    			if !sawStmt && s.Pos.SameFileAndLine(bPos) {
    				s.Pos = s.Pos.WithIsStmt()
    			}
    		}
    		// If `s` had more than one predecessor, update its phi-ops to
    		// account for the merge.
    		if ns > 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  10. src/go/ast/commentmap.go

    func (s *nodeStack) push(n Node) {
    	s.pop(n.Pos())
    	*s = append((*s), n)
    }
    
    // pop pops all nodes that appear lexically before pos
    // (i.e., whose lexical extent has ended before or at pos).
    // It returns the last node popped.
    func (s *nodeStack) pop(pos token.Pos) (top Node) {
    	i := len(*s)
    	for i > 0 && (*s)[i-1].End() <= pos {
    		top = (*s)[i-1]
    		i--
    	}
    	*s = (*s)[0:i]
    	return top
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.9K bytes
    - Viewed (0)
Back to top