Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for scaledValue (0.21 sec)

  1. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/HeapProportionalCacheSizer.java

            if (referenceValue < granularity) {
                throw new IllegalArgumentException("reference value must be larger than granularity");
            }
            int scaledValue = (int) ((double) referenceValue * sizingRatio) / granularity * granularity;
            return Math.max(scaledValue, granularity);
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

    func (q *Quantity) Value() int64 {
    	return q.ScaledValue(0)
    }
    
    // MilliValue returns the value of ceil(q * 1000); this could overflow an int64;
    // if that's a concern, call Value() first to verify the number is small enough.
    func (q *Quantity) MilliValue() int64 {
    	return q.ScaledValue(Milli)
    }
    
    // ScaledValue returns the value of ceil(q / 10^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)
  3. staging/src/k8s.io/apimachinery/pkg/api/resource/amount.go

    import (
    	"math/big"
    	"strconv"
    
    	inf "gopkg.in/inf.v0"
    )
    
    // Scale is used for getting and setting the base-10 scaled value.
    // Base-2 scales are omitted for mathematical simplicity.
    // See Quantity.ScaledValue for more details.
    type Scale int32
    
    // infScale adapts a Scale value to an inf.Scale value.
    func (s Scale) infScale() inf.Scale {
    	return inf.Scale(-s) // inf.Scale is upside-down
    }
    
    const (
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 19:42:28 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    			t.Errorf("Expected %v, got %v; %#v", e, a, q)
    		}
    		q2, err := ParseQuantity(q.String())
    		if err != nil {
    			t.Errorf("Round trip failed on %v", q)
    		}
    		if e, a := item.value, q2.ScaledValue(item.scale); e != a {
    			t.Errorf("Expected %v, got %v", e, a)
    		}
    		q3 := NewQuantity(0, DecimalSI)
    		q3.SetScaled(item.value, item.scale)
    		if q.Cmp(*q3) != 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
Back to top