Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for modcap (0.18 sec)

  1. src/runtime/slice.go

    	return slice{p, newLen, newcap}
    }
    
    // nextslicecap computes the next appropriate slice length.
    func nextslicecap(newLen, oldCap int) int {
    	newcap := oldCap
    	doublecap := newcap + newcap
    	if newLen > doublecap {
    		return newLen
    	}
    
    	const threshold = 256
    	if oldCap < threshold {
    		return doublecap
    	}
    	for {
    		// Transition from growing 2x for small slices
    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. pkg/controller/deployment/deployment_controller_test.go

    	}
    	if got, want := len(podMap[rs1.UID]), 2; got != want {
    		t.Errorf("len(podMap[rs1]) = %v, want %v", got, want)
    	}
    	expect := map[string]struct{}{"rs1-pod": {}, "pod4": {}}
    	for _, pod := range podMap[rs1.UID] {
    		if _, ok := expect[pod.Name]; !ok {
    			t.Errorf("unexpected pod name for rs1: %s", pod.Name)
    		}
    	}
    	if got, want := len(podMap[rs2.UID]), 1; got != want {
    		t.Errorf("len(podMap[rs2]) = %v, want %v", got, want)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  3. pkg/controller/deployment/deployment_controller.go

    		controllerRef := metav1.GetControllerOf(pod)
    		if controllerRef == nil {
    			continue
    		}
    		// Only append if we care about this UID.
    		if _, ok := podMap[controllerRef.UID]; ok {
    			podMap[controllerRef.UID] = append(podMap[controllerRef.UID], pod)
    		}
    	}
    	return podMap, nil
    }
    
    // syncDeployment will sync the deployment with the given key.
    // This function is not meant to be invoked concurrently with the same key.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/transforms/legalization_op_config_test.cc

    }
    
    TEST_F(LegalizationOpConfigTest, ExpectsTrueForMlirTypeID) {
      EXPECT_TRUE(IsTypeLegalizedWithMlir(TypeID::get<TF::ModOp>()));
      EXPECT_FALSE(HasTf2XlaFallback(TypeID::get<TF::ModOp>()));
      EXPECT_FALSE(IsOpAllowedTf2xlaFallback(TypeID::get<TF::ModOp>()));
      EXPECT_FALSE(IsOpAllowedTf2xlaPreferred(TypeID::get<TF::ModOp>()));
    }
    
    TEST_F(LegalizationOpConfigTest, ExpectsTrueForTF2XLATypeID) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 30 03:31:01 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/assign.go

    	// if uint(newLen) <= uint(oldCap)
    	nif := ir.NewIfStmt(base.Pos, nil, nil, nil)
    	nuint := typecheck.Conv(newLen, types.Types[types.TUINT])
    	scapuint := typecheck.Conv(oldCap, types.Types[types.TUINT])
    	nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OLE, nuint, scapuint)
    	nif.Likely = true
    
    	// then { s = s[:newLen] }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  6. src/slices/slices_test.go

    			}
    		})
    	}
    
    }
    
    func TestInsertGrowthRate(t *testing.T) {
    	b := make([]byte, 1)
    	maxCap := cap(b)
    	nGrow := 0
    	const N = 1e6
    	for i := 0; i < N; i++ {
    		b = Insert(b, len(b)-1, 0)
    		if cap(b) > maxCap {
    			maxCap = cap(b)
    			nGrow++
    		}
    	}
    	want := int(math.Log(N) / math.Log(1.25)) // 1.25 == growth rate for large slices
    	if nGrow > want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  7. src/cmd/go/main.go

    	"cmd/go/internal/doc"
    	"cmd/go/internal/envcmd"
    	"cmd/go/internal/fix"
    	"cmd/go/internal/fmtcmd"
    	"cmd/go/internal/generate"
    	"cmd/go/internal/help"
    	"cmd/go/internal/list"
    	"cmd/go/internal/modcmd"
    	"cmd/go/internal/modfetch"
    	"cmd/go/internal/modget"
    	"cmd/go/internal/modload"
    	"cmd/go/internal/run"
    	"cmd/go/internal/telemetrycmd"
    	"cmd/go/internal/telemetrystats"
    	"cmd/go/internal/test"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:09:11 UTC 2024
    - 10K bytes
    - Viewed (0)
  8. src/cmd/go/internal/modcmd/tidy.go

    // Copyright 2018 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // go mod tidy
    
    package modcmd
    
    import (
    	"cmd/go/internal/base"
    	"cmd/go/internal/cfg"
    	"cmd/go/internal/gover"
    	"cmd/go/internal/imports"
    	"cmd/go/internal/modload"
    	"cmd/go/internal/toolchain"
    	"context"
    	"fmt"
    
    	"golang.org/x/mod/modfile"
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 14:56:56 UTC 2024
    - 5K bytes
    - Viewed (0)
  9. pkg/controller/volume/expand/expand_controller.go

    		UpdateFunc: func(old, new interface{}) {
    			oldPVC, ok := old.(*v1.PersistentVolumeClaim)
    			if !ok {
    				return
    			}
    
    			oldReq := oldPVC.Spec.Resources.Requests[v1.ResourceStorage]
    			oldCap := oldPVC.Status.Capacity[v1.ResourceStorage]
    			newPVC, ok := new.(*v1.PersistentVolumeClaim)
    			if !ok {
    				return
    			}
    			newReq := newPVC.Spec.Resources.Requests[v1.ResourceStorage]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    func makeslice64(typ *byte, len int64, cap int64) unsafe.Pointer
    func makeslicecopy(typ *byte, tolen int, fromlen int, from unsafe.Pointer) unsafe.Pointer
    func growslice(oldPtr *any, newLen, oldCap, num int, et *byte) (ary []any)
    func unsafeslicecheckptr(typ *byte, ptr unsafe.Pointer, len int64)
    func panicunsafeslicelen()
    func panicunsafeslicenilptr()
    func unsafestringcheckptr(ptr unsafe.Pointer, len int64)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
Back to top