- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 42 for ternary (0.14 sec)
-
android/guava/src/com/google/common/math/IntMath.java
* a signed int. The implementation is branch-free, and benchmarks suggest it is measurably (if * narrowly) faster than the straightforward ternary expression. */ @VisibleForTesting static int lessThanBranchFree(int x, int y) { // The double negation is optimized away by normal Java, but is necessary for GWT
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 23.5K bytes - Viewed (0) -
guava/src/com/google/common/math/IntMath.java
* a signed int. The implementation is branch-free, and benchmarks suggest it is measurably (if * narrowly) faster than the straightforward ternary expression. */ @VisibleForTesting static int lessThanBranchFree(int x, int y) { // The double negation is optimized away by normal Java, but is necessary for GWT
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 23.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java
public class EnumsBenchmark { @Param({"Small", "Medium", "Large"}) String enumSize; @Param({"0.2", "0.8"}) float hitRate; // We could avoid the raw type here by initializing this with a ternary (? SmallEnum.class : ...). // However, we end up needing a raw type in getIfPresent, as discussed there. @SuppressWarnings("rawtypes") private Class<? extends Enum> enumType; private String[] sampleData;
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 22 17:15:24 UTC 2024 - 29.4K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
* Returns 1 if {@code x < y} as unsigned longs, and 0 otherwise. Assumes that x - y fits into a * signed long. The implementation is branch-free, and benchmarks suggest it is measurably faster * than the straightforward ternary expression. */ @VisibleForTesting static int lessThanBranchFree(long x, long y) { // Returns the sign bit of x - y. return (int) (~~(x - y) >>> (Long.SIZE - 1)); } /**
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 44.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableMap.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Sun Jun 02 13:36:19 UTC 2024 - 41.6K bytes - Viewed (0) -
android/guava/src/com/google/common/math/LongMath.java
* Returns 1 if {@code x < y} as unsigned longs, and 0 otherwise. Assumes that x - y fits into a * signed long. The implementation is branch-free, and benchmarks suggest it is measurably faster * than the straightforward ternary expression. */ @VisibleForTesting static int lessThanBranchFree(long x, long y) { // Returns the sign bit of x - y. return (int) (~~(x - y) >>> (Long.SIZE - 1)); } /**
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 44.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableMap.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Apr 30 14:39:16 UTC 2024 - 44.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterators.java
for (int i = count; i < size; i++) { array[i] = null; // for GWT } List<@Nullable T> list = Collections.unmodifiableList(Arrays.asList(array)); // TODO(b/192579700): Use a ternary once it no longer confuses our nullness checker. if (pad || count == size) { return list; } else { return list.subList(0, count); } } }; }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri May 03 14:46:32 UTC 2024 - 50.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/Iterators.java
for (int i = count; i < size; i++) { array[i] = null; // for GWT } List<@Nullable T> list = Collections.unmodifiableList(Arrays.asList(array)); // TODO(b/192579700): Use a ternary once it no longer confuses our nullness checker. if (pad || count == size) { return list; } else { return list.subList(0, count); } } }; }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri May 03 14:46:32 UTC 2024 - 50.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssagen/ssa.go
case ir.OMIN: // a < x ? a : x return s.ternary(s.newValue2(lt, types.Types[types.TBOOL], a, x), a, x) case ir.OMAX: // x < a ? a : x return s.ternary(s.newValue2(lt, types.Types[types.TBOOL], x, a), a, x) } panic("unreachable") }) } // ternary emits code to evaluate cond ? x : y. func (s *state) ternary(cond, x, y *ssa.Value) *ssa.Value {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 19:44:43 UTC 2024 - 284.9K bytes - Viewed (0)