- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 50 for set_bits (0.14 sec)
-
pkg/controller/nodeipam/ipam/cidrset/cidr_set.go
var i int for i = 0; i < s.maxCIDRs; i++ { if s.used.Bit(candidate) == 0 { break } candidate = (candidate + 1) % s.maxCIDRs } s.nextCandidate = (candidate + 1) % s.maxCIDRs s.used.SetBit(&s.used, candidate, 1) s.allocatedCIDRs++ // Update metrics cidrSetAllocations.WithLabelValues(s.label).Inc() cidrSetAllocationTriesPerRequest.WithLabelValues(s.label).Observe(float64(i))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 11 08:53:03 UTC 2023 - 9.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedLongTest.java
for (long value : TEST_LONGS) { BigInteger expected = (value >= 0) ? BigInteger.valueOf(value) : BigInteger.valueOf(value).add(BigInteger.ZERO.setBit(64)); assertWithMessage(UnsignedLongs.toString(value)) .that(UnsignedLong.fromLongBits(value).bigIntegerValue()) .isEqualTo(expected); } } public void testValueOfLong() {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Feb 06 16:10:08 UTC 2024 - 10.5K bytes - Viewed (0) -
pkg/kubelet/cm/memorymanager/policy_static.go
for _, hint := range hints[string(v1.ResourceMemory)] { affinityBits := hint.NUMANodeAffinity.GetBits() // filter all hints that does not include currentHint if isHintInGroup(mask.GetBits(), affinityBits) { filteredHints = append(filteredHints, hint) } } if len(filteredHints) < 1 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Nov 12 07:34:55 UTC 2023 - 34K bytes - Viewed (0) -
src/runtime/hash_test.go
} func sparse(t *testing.T, h *HashSet, n int, k int) { b := make([]byte, n/8) setbits(h, b, 0, k) h.check(t) } // set up to k bits at index i and greater func setbits(h *HashSet, b []byte, i int, k int) { h.addB(b) if k == 0 { return } for j := i; j < len(b)*8; j++ { b[j/8] |= byte(1 << uint(j&7)) setbits(h, b, j+1, k-1) b[j/8] &= byte(^(1 << uint(j&7))) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 17:50:18 UTC 2024 - 18.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/MathBenchmarking.java
int digits = RANDOM_SOURCE.nextInt(numBits); if (digits == 0) { return new BigInteger(1, RANDOM_SOURCE); } else { return new BigInteger(digits, RANDOM_SOURCE).setBit(digits); } } /** * Equivalent to calling randomPositiveBigInteger(numBits) and then flipping the sign with 50% * probability. */ static BigInteger randomNonZeroBigInteger(int numBits) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathBenchmarking.java
int digits = RANDOM_SOURCE.nextInt(numBits); if (digits == 0) { return new BigInteger(1, RANDOM_SOURCE); } else { return new BigInteger(digits, RANDOM_SOURCE).setBit(digits); } } /** * Equivalent to calling randomPositiveBigInteger(numBits) and then flipping the sign with 50% * probability. */ static BigInteger randomNonZeroBigInteger(int numBits) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K bytes - Viewed (0) -
src/strings/strings.go
n := 0 wasSpace := 1 // setBits is used to track which bits are set in the bytes of s. setBits := uint8(0) for i := 0; i < len(s); i++ { r := s[i] setBits |= r isSpace := int(asciiSpace[r]) n += wasSpace & ^isSpace wasSpace = isSpace } if setBits >= utf8.RuneSelf { // Some runes in the input string are not ASCII.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 16:48:16 UTC 2024 - 31.2K bytes - Viewed (0) -
test/fibo.go
} func (x nat) bitlen() int { if i := len(x); i > 0 { return (i-1)*W + bitlen(x[i-1]) } return 0 } func (x nat) String() string { const shortLen = 10 s := new(big.Int).SetBits(x).String() if *short && len(s) > shortLen { s = s[:shortLen] + "..." } return s } func fibo(n int, half, opt bool) nat { switch n { case 0: return nil case 1:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 08 22:22:58 UTC 2014 - 6.3K bytes - Viewed (0) -
src/math/big/alias_test.go
}, v.Int, x.Int) }, "Set": func(v, x bigInt) bool { return checkAliasingOneArg(t, (*big.Int).Set, v.Int, x.Int) }, "SetBit": func(v, x bigInt, i smallUint, b zeroOrOne) bool { return checkAliasingOneArg(t, func(v, x *big.Int) *big.Int { return v.SetBit(x, int(i.uint), b.uint) }, v.Int, x.Int) }, "Sqrt": func(v bigInt, x positiveInt) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 15:49:05 UTC 2022 - 8.8K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
* * @throws IllegalArgumentException if {@code x <= 0} * @since 20.0 */ public static BigInteger ceilingPowerOfTwo(BigInteger x) { return BigInteger.ZERO.setBit(log2(x, CEILING)); } /** * Returns the largest power of two less than or equal to {@code x}. This is equivalent to {@code * BigInteger.valueOf(2).pow(log2(x, FLOOR))}. *
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 18.9K bytes - Viewed (0)