Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for RoundUp (0.19 sec)

  1. src/cmd/compile/internal/types/universe.go

    	}
    
    	SlicePtrOffset = 0
    	SliceLenOffset = RoundUp(SlicePtrOffset+int64(PtrSize), int64(PtrSize))
    	SliceCapOffset = RoundUp(SliceLenOffset+int64(PtrSize), int64(PtrSize))
    	SliceSize = RoundUp(SliceCapOffset+int64(PtrSize), int64(PtrSize))
    
    	// string is same as slice wo the cap
    	StringSize = RoundUp(SliceLenOffset+int64(PtrSize), int64(PtrSize))
    
    	for et := Kind(0); et < NTYPE; et++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:56:49 UTC 2023
    - 4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go

    func GetScaledValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error) {
    	if intOrPercent == nil {
    		return 0, errors.New("nil value for IntOrString")
    	}
    	value, isPercent, err := getIntOrPercentValueSafely(intOrPercent)
    	if err != nil {
    		return 0, fmt.Errorf("invalid value for IntOrString: %v", err)
    	}
    	if isPercent {
    		if roundUp {
    			value = int(math.Ceil(float64(value) * (float64(total)) / 100))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  3. src/vendor/golang.org/x/net/route/sys.go

    		nativeEndian = littleEndian
    	} else {
    		nativeEndian = bigEndian
    	}
    	// might get overridden in probeRoutingStack
    	rtmVersion = syscall.RTM_VERSION
    	kernelAlign, wireFormats = probeRoutingStack()
    }
    
    func roundup(l int) int {
    	if l == 0 {
    		return kernelAlign
    	}
    	return (l + kernelAlign - 1) &^ (kernelAlign - 1)
    }
    
    type wireFormat struct {
    	extOff  int // offset of header extension
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 940 bytes
    - Viewed (0)
  4. src/go/doc/testdata/benchmark.go

    	for n > 10 {
    		n = n / 10
    		tens++
    	}
    	// result = 10^tens
    	result := 1
    	for i := 0; i < tens; i++ {
    		result *= 10
    	}
    	return result
    }
    
    // roundUp rounds x up to a number of the form [1eX, 2eX, 5eX].
    func roundUp(n int) int {
    	base := roundDown10(n)
    	if n < (2 * base) {
    		return 2 * base
    	}
    	if n < (5 * base) {
    		return 5 * base
    	}
    	return 10 * base
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/api/resource/amount.go

    // was lost. (1.1e5).AsScale(5) would return 1.1e5, but (1.1e5).AsScale(6) would return 1e6.
    func (a infDecAmount) AsScale(scale Scale) (infDecAmount, bool) {
    	tmp := &inf.Dec{}
    	tmp.Round(a.Dec, scale.infScale(), inf.RoundUp)
    	return infDecAmount{tmp}, tmp.Cmp(a.Dec) == 0
    }
    
    // AsCanonicalBytes accepts a buffer to write the base-10 string value of this field to, and returns
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 19:42:28 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  6. pkg/quota/v1/evaluator/core/persistent_volume_claims.go

    	var result *resource.Quantity
    	roundUpFunc := func(i *resource.Quantity) *resource.Quantity {
    		roundedRequest := i.DeepCopy()
    		if !roundedRequest.RoundUp(0) {
    			// Ensure storage requests are counted as whole byte values, to pass resourcequota validation.
    			// See https://issue.k8s.io/94313
    			return &roundedRequest
    		}
    		return i
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 23 23:36:24 UTC 2022
    - 9.2K bytes
    - Viewed (0)
Back to top