Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 483 for pcap (0.06 sec)

  1. src/runtime/slice.go

    //
    //go:linkname makeslice
    func makeslice(et *_type, len, cap int) unsafe.Pointer {
    	mem, overflow := math.MulUintptr(et.Size_, uintptr(cap))
    	if overflow || mem > maxAlloc || len < 0 || len > cap {
    		// NOTE: Produce a 'len out of range' error instead of a
    		// 'cap out of range' error when someone does make([]T, bignumber).
    		// 'cap out of range' is true too, but since the cap is only being
    		// supplied implicitly, saying len is clearer.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/internal/unsafeheader/unsafeheader_test.go

    		hdr := (*unsafeheader.Slice)(unsafe.Pointer(&alias))
    		hdr.Data = unsafe.Pointer(&s[0])
    		hdr.Cap = cap(s)
    		hdr.Len = len(s)
    
    		if !bytes.Equal(alias, s) {
    			t.Errorf("alias of %T(%q) constructed via Slice = %T(%q)", s, s, alias, alias)
    		}
    		if cap(alias) != cap(s) {
    			t.Errorf("alias of %T with cap %d has cap %d", s, cap(s), cap(alias))
    		}
    	})
    
    	t.Run("String", func(t *testing.T) {
    		s := "Hello, checkptr!"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  3. src/cmd/link/internal/ld/stackcheck.go

    	// and following calls.
    	maxLocalHeight := 0
    	relocs, ri := ldr.Relocs(sym), 0
    	pcsp := obj.NewPCIter(uint32(ctxt.Arch.MinLC))
    	for pcsp.Init(ldr.Data(ldr.Pcsp(sym))); !pcsp.Done; pcsp.Next() {
    		// pcsp.value is in effect for [pcsp.pc, pcsp.nextpc).
    		height := int(pcsp.Value)
    		if height > maxLocalHeight {
    			maxLocalHeight = height
    		}
    
    		// Process calls in this span.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 24 16:49:08 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfrt/ir/mlrt/tf_ops.td

        TF_Tensor:$tensor
      );
    }
    
    def TFMapFnOp : TensorflowMlrt_Op<"tf_map_fn", [AttrSizedOperandSegments, Pure]> {
      let summary = "The Parallel Map for tf_mlrt dialect";
      let description = [{
        The Pmap executes body function in parallel for all ranges up to $max_iterations.
    
        The pseudo code:
          for(int i = 0; i < $max_iterations; i++) {
            body_fn(MlrtFture($tensor_list_or_flow_in[i]),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 21:35:32 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  5. pkg/volume/util/operationexecutor/node_expander_test.go

    		expectedStatusSize       resource.Quantity
    		expectResizeCall         bool
    		assumeResizeOpAsFinished bool
    		expectError              bool
    	}{
    		{
    			name: "pv.spec.cap > pvc.status.cap, resizeStatus=node_expansion_failed",
    			pvc:  getTestPVC("test-vol0", "2G", "1G", "", &nodeResizeFailed),
    			pv:   getTestPV("test-vol0", "2G"),
    
    			expectedResizeStatus:     nodeResizeFailed,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/typecheck/func.go

    	}
    
    	if n.Len == nil {
    		base.Fatalf("missing len argument for OMAKESLICECOPY")
    	}
    
    	if n.Cap == nil {
    		base.Fatalf("missing slice argument to copy for OMAKESLICECOPY")
    	}
    
    	n.Len = Expr(n.Len)
    	n.Cap = Expr(n.Cap)
    
    	n.Len = DefaultLit(n.Len, types.Types[types.TINT])
    
    	if !n.Len.Type().IsInteger() && n.Type().Kind() != types.TIDEAL {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  7. src/slices/slices_test.go

    	orig := Clone(s1)
    	if len(s1) != 3 {
    		t.Errorf("len(%v) = %d, want 3", s1, len(s1))
    	}
    	if cap(s1) < 6 {
    		t.Errorf("cap(%v[:3]) = %d, want >= 6", orig, cap(s1))
    	}
    	s2 := Clip(s1)
    	if !Equal(s1, s2) {
    		t.Errorf("Clip(%v) = %v, want %v", s1, s2, s1)
    	}
    	if cap(s2) != 3 {
    		t.Errorf("cap(Clip(%v)) = %d, want 3", orig, cap(s2))
    	}
    }
    
    func TestReverse(t *testing.T) {
    	even := []int{3, 1, 4, 1, 5, 9} // len = 6
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  8. src/errors/join_test.go

    		if !reflect.DeepEqual(got, test.want) {
    			t.Errorf("Join(%v) = %v; want %v", test.errs, got, test.want)
    		}
    		if len(got) != cap(got) {
    			t.Errorf("Join(%v) returns errors with len=%v, cap=%v; want len==cap", test.errs, len(got), cap(got))
    		}
    	}
    }
    
    func TestJoinErrorMethod(t *testing.T) {
    	err1 := errors.New("err1")
    	err2 := errors.New("err2")
    	for _, test := range []struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 17 21:48:12 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/testdata/hist.gdb-opt.nexts

    err = {tab = 0x0, data = 0x0}
    hist = {array = 0xc00005ae50, len = 7, cap = 7}
    i = 1
    81:			hist = ensure(int(i), hist)
    82:			hist[int(i)]++
    75:			s := scanner.Text()
    76:			i, err := strconv.ParseInt(s, 10, 64)
    77:			if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    err = {tab = 0x0, data = 0x0}
    hist = {array = 0xc00005ae50, len = 7, cap = 7}
    i = 1
    81:			hist = ensure(int(i), hist)
    82:			hist[int(i)]++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 04 20:41:52 UTC 2019
    - 4.5K bytes
    - Viewed (0)
  10. test/ken/slicearray.go

    	tstf()
    }
    
    func tstb() {
    	t++
    	if len(by) != hb-lb {
    		println("t=", t, "lb=", lb, "hb=", hb,
    			"len=", len(by), "hb-lb=", hb-lb)
    		panic("fail")
    	}
    	if cap(by) != len(bx)-lb {
    		println("t=", t, "lb=", lb, "hb=", hb,
    			"cap=", cap(by), "len(bx)-lb=", len(bx)-lb)
    		panic("fail")
    	}
    	for i := lb; i < hb; i++ {
    		if bx[i] != by[i-lb] {
    			println("t=", t, "lb=", lb, "hb=", hb,
    				"bx[", i, "]=", bx[i],
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Dec 05 12:50:44 UTC 2021
    - 2.7K bytes
    - Viewed (0)
Back to top