- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for RoundUp (0.12 sec)
-
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) -
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) -
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) -
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) -
src/go/doc/testdata/testing.1.golden
// func min(x, y int) int // func parseCpuList() // roundDown10 rounds a number down to the nearest power of 10. func roundDown10(n int) int // roundUp rounds x up to a number of the form [1eX, 2eX, 5eX]. func roundUp(n int) int // startAlarm starts an alarm if requested. func startAlarm() // stopAlarm turns off the alarm. func stopAlarm() //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 8.4K bytes - Viewed (0) -
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) -
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)