- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for RoundUp (0.5 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go
tests := []struct { input IntOrString total int roundUp bool expectErr bool expectVal int }{ { input: FromInt32(123), expectErr: false, expectVal: 123, }, { input: FromString("90%"), total: 100, roundUp: true, expectErr: false, expectVal: 90, }, { input: FromString("90%"),
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:09 UTC 2024 - 14.3K 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/cmd/compile/internal/ssagen/pgen.go
} } } s.stksize = types.RoundUp(s.stksize, s.stkalign) s.stkptrsize = types.RoundUp(s.stkptrsize, s.stkalign) } const maxStackSize = 1 << 30 // Compile builds an SSA backend function, // uses it to generate a plist, // and flushes that plist to machine code.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 15:44:14 UTC 2024 - 13.1K 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/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) -
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) -
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) -
src/crypto/tls/conn.go
// last byte of that block decrypted to the block size. // // See also macAndPaddingGood logic below. paddingLen &= good toRemove = int(paddingLen) + 1 return } func roundUp(a, b int) int { return a + (b-a%b)%b } // cbcMode is an interface for block ciphers using cipher block chaining. type cbcMode interface { cipher.BlockMode SetIV([]byte) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 51.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt
assertFailsWith<EOFException> { source.buffer().readByteString(101) } } @Test fun blockedStreamDoesntStarveNewStream() { val framesThatFillWindow = roundUp(Settings.DEFAULT_INITIAL_WINDOW_SIZE, peer.maxOutboundDataLength()) // Write the mocking script. This accepts more data frames than necessary! peer.sendFrame().settings(Settings())
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 75.4K bytes - Viewed (0)