/frameworks/native/libs/ftl/ |
D | cast_test.cpp | 33 constexpr T max = std::numeric_limits<T>::max(); variable 54 static_assert(cast_safety<uint16_t>(max<uint8_t>) == CastSafety::kSafe); 55 static_assert(cast_safety<uint8_t>(static_cast<uint32_t>(max<uint8_t>)) == CastSafety::kSafe); 57 static_assert(cast_safety<uint32_t>(max<uint64_t>) == CastSafety::kOverflow); 58 static_assert(cast_safety<uint8_t>(static_cast<uint32_t>(max<uint8_t>) + 1) == 64 static_assert(cast_safety<int16_t>(max<uint8_t>) == CastSafety::kSafe); 65 static_assert(cast_safety<int16_t>(max<uint16_t>) == CastSafety::kOverflow); 67 static_assert(cast_safety<int64_t>(static_cast<uint64_t>(max<int64_t>) - 1) == CastSafety::kSafe); 68 static_assert(cast_safety<int64_t>(static_cast<uint64_t>(max<int64_t>)) == CastSafety::kSafe); 69 static_assert(cast_safety<int64_t>(static_cast<uint64_t>(max<int64_t>) + 1) == [all …]
|
/frameworks/base/core/java/android/text/style/ |
D | SpanUtils.java | 49 @IntRange(from = 0) int min, @IntRange(from = 0) int max) { in toggleBold() 51 if (min == max) { in toggleBold() 55 final StyleSpan[] boldSpans = spannable.getSpans(min, max, StyleSpan.class); in toggleBold() 63 if (!isCovered(spannable, filteredBoldSpans, min, max)) { in toggleBold() 66 new StyleSpan(Typeface.BOLD), min, max, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); in toggleBold() 81 if (end > max) { in toggleBold() 86 spannable.setSpan(new StyleSpan(span.getStyle()), max, end, flag); in toggleBold() 88 spannable.setSpan(new StyleSpan(Typeface.ITALIC), min, max, flag); in toggleBold() 100 if (end > max) { in toggleBold() 104 spannable.setSpan(span, max, end, flag); in toggleBold() [all …]
|
/frameworks/native/libs/ui/tests/ |
D | Size_test.cpp | 211 ClampTest(std::numeric_limits<int8_t>::max(), std::numeric_limits<int8_t>::max()); in TEST() 217 ClampTest(std::numeric_limits<float>::max(), std::numeric_limits<int32_t>::max()); in TEST() 218 ClampTest(nexttowardf(std::numeric_limits<int32_t>::max(), std::numeric_limits<float>::max()), in TEST() 219 std::numeric_limits<int32_t>::max()); in TEST() 220 ClampTest(static_cast<float>(std::numeric_limits<int32_t>::max()), in TEST() 221 std::numeric_limits<int32_t>::max()); in TEST() 222 ClampTest(nexttowardf(std::numeric_limits<int32_t>::max(), 0), in TEST() 223 static_cast<int32_t>(nexttowardf(std::numeric_limits<int32_t>::max(), 0))); in TEST() 236 ClampTest(std::numeric_limits<uint32_t>::max(), std::numeric_limits<int32_t>::max()); in TEST() 237 ClampTest(std::numeric_limits<uint32_t>::max() - 1, std::numeric_limits<int32_t>::max()); in TEST() [all …]
|
D | GraphicBuffer_test.cpp | 45 if (std::numeric_limits<size_t>::max() / std::numeric_limits<uint32_t>::max() / in TEST_F() 47 std::numeric_limits<uint32_t>::max()) { in TEST_F() 51 width = height = std::numeric_limits<uint32_t>::max(); in TEST_F() 56 const size_t targetArea = std::numeric_limits<size_t>::max() / bytesPerPixel(format); in TEST_F() 57 const size_t widthCandidate = targetArea / std::numeric_limits<uint32_t>::max(); in TEST_F() 61 width = std::numeric_limits<uint32_t>::max(); in TEST_F()
|
/frameworks/base/services/backup/java/com/android/server/backup/transport/ |
D | TransportStats.java | 78 pw.println(String.format(Locale.US, "%sMax connection time: %d ms", prefix, stats.max)); in dumpStats() 88 Math.max(a.max, b.max), in merge() 94 public long max; field in TransportStats.Stats 100 max = 0; in Stats() 104 private Stats(int n, double average, long max, long min) { in Stats() argument 107 this.max = max; in Stats() 112 this(original.n, original.average, original.max, original.min); in Stats() 118 max = Math.max(max, sample); in register()
|
/frameworks/rs/tests/java_api/RSUnitTests/supportlibsrc_gen/com/android/rs/unittest/ |
D | UT_math_agree.java | 245 private float max(float v1, float v2) { in max() method in UT_math_agree 249 private float[] max(float[] v1, float[] v2) { in max() method in UT_math_agree 253 rv[i] = max(v1[i], v2[i]); in max() 257 private byte max(byte v1, byte v2) { in max() method in UT_math_agree 261 private byte[] max(byte[] v1, byte[] v2) { in max() method in UT_math_agree 265 rv[i] = max(v1[i], v2[i]); in max() 269 private short max(short v1, short v2) { in max() method in UT_math_agree 273 private short[] max(short[] v1, short[] v2) { in max() method in UT_math_agree 277 rv[i] = max(v1[i], v2[i]); in max() 281 private int max(int v1, int v2) { in max() method in UT_math_agree [all …]
|
/frameworks/rs/tests/java_api/RSUnitTests/src/com/android/rs/unittest/ |
D | UT_math_agree.java | 243 private float max(float v1, float v2) { in max() method in UT_math_agree 247 private float[] max(float[] v1, float[] v2) { in max() method in UT_math_agree 251 rv[i] = max(v1[i], v2[i]); in max() 255 private byte max(byte v1, byte v2) { in max() method in UT_math_agree 259 private byte[] max(byte[] v1, byte[] v2) { in max() method in UT_math_agree 263 rv[i] = max(v1[i], v2[i]); in max() 267 private short max(short v1, short v2) { in max() method in UT_math_agree 271 private short[] max(short[] v1, short[] v2) { in max() method in UT_math_agree 275 rv[i] = max(v1[i], v2[i]); in max() 279 private int max(int v1, int v2) { in max() method in UT_math_agree [all …]
|
/frameworks/av/media/utils/tests/ |
D | extended_accumulator_tests.cpp | 37 return std::numeric_limits<TType>::max() + 1; in getBase() 72 else if (next > base + std::numeric_limits<TestUInt>::max()) in testPair() 82 static constexpr CType max = std::numeric_limits<TType>::max(); in TEST() local 83 for (CType i = 0; i <= max; i++) { in TEST() 84 for (CType j = 0; j <= max; j++) { in TEST() 95 static constexpr CType max = std::numeric_limits<TType>::max(); in TEST() local 96 for (CType i = 0; i <= max; i++) { in TEST() 97 for (CType j = 0; j <= max; j++) { in TEST()
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | TaskResizingAlgorithm.java | 92 width = Math.max(minVisibleWidth, Math.min(width - deltaX, maxVisibleSize.x)); in resizeDrag() 94 width = Math.max(minVisibleWidth, Math.min(width + deltaX, maxVisibleSize.x)); in resizeDrag() 97 height = Math.max(minVisibleHeight, Math.min(height - deltaY, maxVisibleSize.y)); in resizeDrag() 99 height = Math.max(minVisibleHeight, Math.min(height + deltaY, maxVisibleSize.y)); in resizeDrag() 114 width1 = Math.max(minVisibleWidth, Math.min(maxVisibleSize.x, width)); in resizeDrag() 119 width1 = Math.max(minVisibleWidth, in resizeDrag() 123 height2 = Math.max(minVisibleHeight, Math.min(maxVisibleSize.y, height)); in resizeDrag() 124 width2 = Math.max(width, Math.round((float) height2 * MIN_ASPECT)); in resizeDrag() 128 height2 = Math.max(minVisibleHeight, in resizeDrag() 133 width1 = Math.max(minVisibleWidth, Math.min(maxVisibleSize.x, width)); in resizeDrag() [all …]
|
/frameworks/base/packages/SettingsLib/DisplayUtils/src/com/android/settingslib/display/ |
D | BrightnessUtils.java | 55 public static final int convertGammaToLinear(int val, int min, int max) { in convertGammaToLinear() argument 66 return Math.round(MathUtils.lerp(min, max, ret / 12)); in convertGammaToLinear() 78 public static final float convertGammaToLinearFloat(int val, float min, float max) { in convertGammaToLinearFloat() argument 93 return MathUtils.lerp(min, max, normalizedRet / 12); in convertGammaToLinearFloat() 118 public static final int convertLinearToGamma(int val, int min, int max) { in convertLinearToGamma() argument 119 return convertLinearToGammaFloat((float) val, (float) min, (float) max); in convertLinearToGamma() 130 public static final int convertLinearToGammaFloat(float val, float min, float max) { in convertLinearToGammaFloat() argument 132 final float normalizedVal = MathUtils.norm(min, max, val) * 12; in convertLinearToGammaFloat()
|
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/ |
D | bugdroid.rscript | 37 static short pill(float3 p1, float3 p2, float rad, short max, float3 img) { 38 return (short) (max * sigmoid(pillDistance(p1, p2, img) - rad)); 41 static short cogPill(float3 p1, float3 p2, float rad, short max, float3 img) { 44 return (short) (max 57 static short cylinder(float3 p1, float3 p2, float rad, short max, float3 img) { 58 return (short) (max * sigmoid(cylinderDistance(p1, p2, img) - rad)); 61 static short cogCylinder(float3 p1, float3 p2, float rad, short max, float3 img) { 64 return (short) (max 78 short max, float3 img) { 79 return (short) (max [all …]
|
/frameworks/av/drm/libmediadrm/tests/ |
D | EventMetric_test.cpp | 60 EXPECT_EQ(4, values[7].max); in TEST() 65 EXPECT_EQ(6, values[8].max); in TEST() 89 EXPECT_EQ(1, values["a"].max); in TEST() 94 EXPECT_EQ(3, values["b"].max); in TEST() 129 EXPECT_LT(values[0].min, values[0].max); in TEST() 130 EXPECT_GE(4000, values[0].max); in TEST() 132 EXPECT_LE(values[0].mean, values[0].max); in TEST() 135 EXPECT_LT(values[1].min, values[1].max); in TEST() 136 EXPECT_GE(3000, values[1].max); in TEST() 138 EXPECT_LE(values[1].mean, values[1].max); in TEST()
|
/frameworks/rs/tests/java_api/Refocus/src/com/android/rs/test/ |
D | DepthImage.java | 96 public float max; field in DepthImage.MinMax 98 public MinMax(float min, float max) { in MinMax() argument 100 this.max = max; in MinMax() 103 public static MinMax create(float min, float max) { in create() argument 104 return new MinMax(min, max); in create() 110 float max = min; in findMinAndMax() local 115 } else if (x > max) { in findMinAndMax() 116 max = x; in findMinAndMax() 119 return MinMax.create(min, max); in findMinAndMax() 130 final float far = minMax.max; in createFromPFM()
|
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/domain/interactor/ |
D | ScreenBrightnessInteractorTest.kt | 64 val max = 1f in gammaBrightness() constant 68 setMinMaxBrightness(LinearBrightness(min), LinearBrightness(max)) in gammaBrightness() 73 .isEqualTo(BrightnessUtils.convertLinearToGammaFloat(brightness, min, max)) in gammaBrightness() 85 val max = 0.8f in gammaBrightness_constrained() constant 89 setMinMaxBrightness(LinearBrightness(min), LinearBrightness(max)) in gammaBrightness_constrained() 94 .isEqualTo(BrightnessUtils.convertLinearToGammaFloat(brightness, min, max)) in gammaBrightness_constrained() 109 val (min, max) = fakeScreenBrightnessRepository.getMinMaxLinearBrightness() in setTemporaryBrightness() constant 115 max.floatValue in setTemporaryBrightness() 133 val (min, max) = fakeScreenBrightnessRepository.getMinMaxLinearBrightness() in setBrightness() constant 139 max.floatValue in setBrightness()
|
/frameworks/base/core/java/android/net/metrics/ |
D | NetworkMetrics.java | 147 (int) dnsLatencies.average(), (int) dnsLatencies.max, in toString() 150 (int) connectLatencies.average(), (int) connectLatencies.max, in toString() 163 public double max = Double.MIN_VALUE; field in NetworkMetrics.Metrics 169 this.max = Math.max(this.max, that.max); in merge() 179 max = Math.max(max, value); in count()
|
/frameworks/libs/systemui/toruslib/torus-math/src/main/java/com/google/android/torus/math/ |
D | MathUtils.kt | 19 import kotlin.math.max 162 fun clamp(value: Double, min: Double, max: Double): Double { in clamp() 163 return max(min(value, max), min) in clamp() 178 fun clamp(value: Float, min: Float, max: Float): Float { in clamp() 179 return max(min(value, max), min) in clamp()
|
/frameworks/libs/systemui/weathereffects/graphics/src/main/java/com/google/android/wallpaper/weathereffects/graphics/utils/ |
D | MathUtils.kt | 19 import kotlin.math.max 157 fun clamp(value: Double, min: Double, max: Double): Double { in clamp() 158 return max(min(value, max), min) in clamp() 172 fun clamp(value: Float, min: Float, max: Float): Float { in clamp() 173 return max(min(value, max), min) in clamp()
|
/frameworks/native/services/surfaceflinger/Scheduler/include/scheduler/ |
D | Fps.h | 68 Fps max = Fps::fromValue(std::numeric_limits<float>::max()); 149 return isApproxEqual(lhs.min, rhs.min) && isApproxEqual(lhs.max, rhs.max); 176 return min <= fps && fps <= max; in includes() 181 return min <= range.min && max >= range.max; in includes() 186 return physical.max >= render.max; in valid() 202 const auto [min, max] = range; in to_string() 203 return base::StringPrintf("[%s, %s]", to_string(min).c_str(), to_string(max).c_str()); in to_string()
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | WatchListDecorLayout.java | 117 final int width = Math.max(0, getMeasuredWidth() in applyMeasureToChild() 131 final int height = Math.max(0, getMeasuredHeight() in applyMeasureToChild() 176 maxWidth = Math.max(maxWidth, in onMeasure() 178 maxHeight = Math.max(maxHeight, in onMeasure() 195 maxHeight = Math.max(maxHeight, getSuggestedMinimumHeight()); in onMeasure() 196 maxWidth = Math.max(maxWidth, getSuggestedMinimumWidth()); in onMeasure() 201 maxHeight = Math.max(maxHeight, drawable.getMinimumHeight()); in onMeasure() 202 maxWidth = Math.max(maxWidth, drawable.getMinimumWidth()); in onMeasure() 215 int paddingTop = Math.max(mListView.getPaddingTop(), in onMeasure() 217 int paddingBottom = Math.max(mListView.getPaddingBottom(), in onMeasure() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
D | DataUsageGraph.java | 58 mLimitLevel = Math.max(0, limitLevel); in setLevels() 59 mWarningLevel = Math.max(0, warningLevel); in setLevels() 60 mUsageLevel = Math.max(0, usageLevel); in setLevels() 61 mMaxLevel = Math.max(Math.max(Math.max(mLimitLevel, mWarningLevel), mUsageLevel), 1); in setLevels() 79 usageRight = Math.min(Math.max(usageRight, mMarkerWidth), w - mMarkerWidth * 2); in onDraw() 99 warningLeft = Math.min(Math.max(warningLeft, 0), w - mMarkerWidth); in onDraw()
|
/frameworks/av/media/module/codecs/amrnb/enc/src/ |
D | cor_h_x2.cpp | 244 Word32 max; in cor_h_x2() local 252 max = 0; in cor_h_x2() 266 if (s > max) in cor_h_x2() 268 max = s; in cor_h_x2() 271 tot = (tot + (max >> 1)); in cor_h_x2()
|
D | hp_max.cpp | 249 Word32 max, t0, t1; in hp_max() local 254 max = MIN_32; in hp_max() 265 if (t0 >= max) in hp_max() 267 max = t0; in hp_max() 300 t016 = norm_l(max); in hp_max() 303 L_temp = L_shl(max, shift1, pOverflow); in hp_max()
|
D | cor_h_x.cpp | 258 Word32 max; in cor_h_x() local 269 max = 0; in cor_h_x() 296 if (s > max) in cor_h_x() 298 max = s; in cor_h_x() 302 tot += (max >> 1); in cor_h_x()
|
/frameworks/base/core/java/android/widget/ |
D | EdgeEffect.java | 359 mGlowScaleY = Math.max(PULL_GLOW_BEGIN, mGlowScaleY); in onPull() 372 mDistance = Math.max(0f, mPullDistance); in onPull() 383 final float scale = (float) (Math.max(0, 1 - 1 / in onPull() 430 float finalDistance = Math.max(0f, deltaDistance + mDistance); in onPullDistance() 503 velocity = Math.min(Math.max(MIN_VELOCITY, Math.abs(velocity)), MAX_VELOCITY); in onAbsorb() 511 mGlowScaleYStart = Math.max(mGlowScaleY, 0.f); in onAbsorb() 520 mGlowAlphaFinish = Math.max( in onAbsorb() 598 final float displacement = Math.max(0, Math.min(mDisplacement, 1.f)) - 0.5f; in draw() 640 + max(mTmpPoints[0], mTmpPoints[2], mTmpPoints[4], mTmpPoints[6]); in draw() 642 + max(mTmpPoints[1], mTmpPoints[3], mTmpPoints[5], mTmpPoints[7]); in draw() [all …]
|
/frameworks/av/media/module/codecs/amrnb/common/src/ |
D | gmed_n.cpp | 189 Word16 max; in gmed_n() local 201 max = -32767; in gmed_n() 204 if (*(tmp2 + j) >= max) in gmed_n() 206 max = *(tmp2 + j); in gmed_n()
|