- Sort Score
- Num 10 results
- Language All
Results 41 - 49 of 49 for saturatedCast (0.07 seconds)
-
guava/src/com/google/common/collect/Lists.java
@VisibleForTesting static int computeArrayListCapacity(int arraySize) { checkNonnegative(arraySize, "arraySize"); // TODO(kevinb): Figure out the right behavior, and document it return Ints.saturatedCast(5L + arraySize + (arraySize / 10)); } /** * Creates an {@code ArrayList} instance backed by an array with the specified initial size; * simply delegates to {@link ArrayList#ArrayList(int)}. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 16:38:09 GMT 2026 - 42.5K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Lists.java
@VisibleForTesting static int computeArrayListCapacity(int arraySize) { checkNonnegative(arraySize, "arraySize"); // TODO(kevinb): Figure out the right behavior, and document it return Ints.saturatedCast(5L + arraySize + (arraySize / 10)); } /** * Creates an {@code ArrayList} instance backed by an array with the specified initial size; * simply delegates to {@link ArrayList#ArrayList(int)}. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 16:38:09 GMT 2026 - 42.1K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Iterators.java
*/ public static int size(Iterator<?> iterator) { long count = 0L; while (iterator.hasNext()) { iterator.next(); count++; } return Ints.saturatedCast(count); } /** Returns {@code true} if {@code iterator} contains {@code element}. */ public static boolean contains(Iterator<?> iterator, @Nullable Object element) { if (element == null) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 16 12:42:11 GMT 2025 - 51.4K bytes - Click Count (0) -
guava/src/com/google/common/collect/Iterators.java
*/ public static int size(Iterator<?> iterator) { long count = 0L; while (iterator.hasNext()) { iterator.next(); count++; } return Ints.saturatedCast(count); } /** Returns {@code true} if {@code iterator} contains {@code element}. */ public static boolean contains(Iterator<?> iterator, @Nullable Object element) { if (element == null) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 16 12:42:11 GMT 2025 - 51.4K bytes - Click Count (0) -
guava/src/com/google/common/collect/MapMakerInternalMap.java
public int size() { Segment<K, V, E, S>[] segments = this.segments; long sum = 0; for (int i = 0; i < segments.length; ++i) { sum += segments[i].count; } return Ints.saturatedCast(sum); } @Override public @Nullable V get(@Nullable Object key) { if (key == null) { return null; } int hash = hash(key);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 89.9K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/MapMakerInternalMap.java
public int size() { Segment<K, V, E, S>[] segments = this.segments; long sum = 0; for (int i = 0; i < segments.length; ++i) { sum += segments[i].count; } return Ints.saturatedCast(sum); } @Override public @Nullable V get(@Nullable Object key) { if (key == null) { return null; } int hash = hash(key);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 89.9K bytes - Click Count (0) -
android/guava/src/com/google/common/cache/LocalCache.java
sum += Math.max(0, segment.count); // see https://github.com/google/guava/issues/2108 } return sum; } @Override public int size() { return Ints.saturatedCast(longSize()); } @CanIgnoreReturnValue // TODO(b/27479612): consider removing this @Override public @Nullable V get(@Nullable Object key) { if (key == null) { return null; }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 143.5K bytes - Click Count (0) -
guava/src/com/google/common/cache/LocalCache.java
long sum = 0; for (Segment<K, V> segment : segments) { sum += segment.count; } return sum; } @Override public int size() { return Ints.saturatedCast(longSize()); } @CanIgnoreReturnValue // TODO(b/27479612): consider removing this @Override public @Nullable V get(@Nullable Object key) { if (key == null) { return null; }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 148.9K bytes - Click Count (0) -
RELEASE.md
of the data type of the input image. * The image processing ops do not take `min` and `max` inputs any more, casting safety is handled by `saturate_cast`, which makes sure over- and underflows are handled before casting to data types with smaller ranges. * For C++ API users: `IsLegacyScalar` and `IsLegacyVector` are now gone fromCreated: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Mon Mar 30 18:31:38 GMT 2026 - 746.5K bytes - Click Count (3)