- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 31 for RoundUp (0.13 sec)
-
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) -
staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
return q.d.AsScale(scale) } return q.i.AsScale(scale) } // RoundUp updates the quantity to the provided scale, ensuring that the value is at // least 1. False is returned if the rounding operation resulted in a loss of precision. // Negative numbers are rounded away from zero (-9 scale 1 rounds to -10). func (q *Quantity) RoundUp(scale Scale) bool { if q.d.Dec != nil { q.s = "" d, exact := q.d.AsScale(scale)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 23.8K 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) -
pkg/apis/core/v1/defaults.go
for key, val := range *obj { // TODO(#18538): We round up resource values to milli scale to maintain API compatibility. // In the future, we should instead reject values that need rounding. const milliScale = -3 val.RoundUp(milliScale) (*obj)[v1.ResourceName(key)] = val } } func SetDefaults_ReplicationController(obj *v1.ReplicationController) { var labels map[string]string if obj.Spec.Template != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 19 22:24:15 UTC 2024 - 14.8K bytes - Viewed (0) -
src/cmd/compile/internal/ssagen/abi.go
} ir.InitLSym(fn, true) setupWasmABI(fn) pp := objw.NewProgs(fn, 0) defer pp.Free() pp.Text.To.Type = obj.TYPE_TEXTSIZE pp.Text.To.Val = int32(types.RoundUp(fn.Type().ArgWidth(), int64(types.RegSize))) // Wrapper functions never need their own stack frame pp.Text.To.Offset = 0 pp.Flush() return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 13.8K bytes - Viewed (0) -
src/math/big/ftoa.go
// If it's okay to do only one, do it. switch { case okdown && okup: d.round(i + 1) return case okdown: d.roundDown(i + 1) return case okup: d.roundUp(i + 1) return } } } // %e: d.ddddde±dd func fmtE(buf []byte, fmt byte, prec int, d decimal) []byte { // first digit ch := byte('0') if len(d.mant) > 0 { ch = d.mant[0] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 11:59:09 UTC 2023 - 13.5K bytes - Viewed (0) -
src/strconv/ftoa.go
// If it's okay to do only one, do it. switch { case okdown && okup: d.Round(mi + 1) return case okdown: d.RoundDown(mi + 1) return case okup: d.RoundUp(mi + 1) return } } } type decimalSlice struct { d []byte nd, dp int } // %e: -d.ddddde±dd func fmtE(dst []byte, neg bool, d decimalSlice, prec int, fmt byte) []byte {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:21:28 UTC 2024 - 13.9K bytes - Viewed (0) -
pkg/apis/core/v1/conversion.go
// Moved to defaults // TODO(#18538): We round up resource values to milli scale to maintain API compatibility. // In the future, we should instead reject values that need rounding. // const milliScale = -3 // val.RoundUp(milliScale) (*out)[core.ResourceName(key)] = val } return nil } func AddFieldLabelConversionsForEvent(scheme *runtime.Scheme) error {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Apr 19 22:30:55 UTC 2024 - 19K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/expand_calls.go
// the (aligned) old value is returned. func (c *registerCursor) next(t *types.Type) registerCursor { c.storeOffset = types.RoundUp(c.storeOffset, t.Alignment()) rc := *c c.storeOffset = types.RoundUp(c.storeOffset+t.Size(), t.Alignment()) if int(c.nextSlice) < len(c.regs) { w := c.config.NumParamRegs(t) c.nextSlice += Abi1RO(w) } return rc }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 28 05:13:40 UTC 2023 - 31.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 49.4K bytes - Viewed (0)