- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for highestOneBit (0.08 sec)
-
android/guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java
} } } private static String mikeRepeat(String string, int count) { final int len = string.length(); char[] strCopy = new char[len * Integer.highestOneBit(count)]; string.getChars(0, len, strCopy, 0); char[] array = new char[len * count]; int strCopyLen = len; int pos = 0; while (count != 0) { if ((count & 1) != 0) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Sep 17 20:24:24 UTC 2021 - 3.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/Hashing.java
// Get the recommended table size. // Round down to the nearest power of 2. expectedEntries = max(expectedEntries, 2); int tableSize = Integer.highestOneBit(expectedEntries); // Check to make sure that we will not exceed the maximum load factor. if (expectedEntries > (int) (loadFactor * tableSize)) { tableSize <<= 1;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 2.5K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Hashing.java
// Get the recommended table size. // Round down to the nearest power of 2. expectedEntries = max(expectedEntries, 2); int tableSize = Integer.highestOneBit(expectedEntries); // Check to make sure that we will not exceed the maximum load factor. if (expectedEntries > (int) (loadFactor * tableSize)) { tableSize <<= 1;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 2.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java
} } } private static String mikeRepeat(String string, int count) { final int len = string.length(); char[] strCopy = new char[len * Integer.highestOneBit(count)]; string.getChars(0, len, strCopy, 0); char[] array = new char[len * count]; int strCopyLen = len; int pos = 0; while (count != 0) { if ((count & 1) != 0) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Sep 17 20:24:24 UTC 2021 - 3.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/CompactHashing.java
} /** Creates and returns a properly-sized array with the given number of buckets. */ static Object createTable(int buckets) { if (buckets < 2 || buckets > Ints.MAX_POWER_OF_TWO || Integer.highestOneBit(buckets) != buckets) { throw new IllegalArgumentException("must be power of 2 between 2^1 and 2^30: " + buckets); } if (buckets <= BYTE_MAX_SIZE) { return new byte[buckets];
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 15:34:52 UTC 2024 - 7.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/CompactHashing.java
} /** Creates and returns a properly-sized array with the given number of buckets. */ static Object createTable(int buckets) { if (buckets < 2 || buckets > Ints.MAX_POWER_OF_TWO || Integer.highestOneBit(buckets) != buckets) { throw new IllegalArgumentException("must be power of 2 between 2^1 and 2^30: " + buckets); } if (buckets <= BYTE_MAX_SIZE) { return new byte[buckets];
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 15:34:52 UTC 2024 - 7.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ObjectCountHashMap.java
} void ensureCapacity(int minCapacity) { if (minCapacity > entries.length) { resizeEntries(minCapacity); } if (minCapacity >= threshold) { int newTableSize = Math.max(2, Integer.highestOneBit(minCapacity - 1) << 1); resizeTable(newTableSize); } } @CanIgnoreReturnValue public int put(@ParametricNullness K key, int value) { checkPositive(value, "count");
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jun 01 22:07:10 UTC 2021 - 15K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/ImmutableLongArray.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 22.3K bytes - Viewed (0) -
guava/src/com/google/common/primitives/ImmutableIntArray.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 18:05:56 UTC 2024 - 21.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableCollection.java
return oldCapacity; } // careful of overflow! int newCapacity = oldCapacity + (oldCapacity >> 1) + 1; if (newCapacity < minCapacity) { newCapacity = Integer.highestOneBit(minCapacity - 1) << 1; } if (newCapacity < 0) { newCapacity = Integer.MAX_VALUE; // guaranteed to be >= newCapacity } return newCapacity; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 12 16:59:15 UTC 2024 - 18.8K bytes - Viewed (0)