/external/openscreen/util/ |
D | integer_division_unittest.cc | 20 void TestRangeAboutZero(int denom, in TestRangeAboutZero() argument 25 int count_until_next_change = denom; in TestRangeAboutZero() 27 EXPECT_EQ(expected_result, function_to_test(Input(num), Input(denom))) in TestRangeAboutZero() 28 << "num=" << num << ", denom=" << denom; in TestRangeAboutZero() 29 EXPECT_EQ(expected_result, function_to_test(Input(-num), Input(-denom))) in TestRangeAboutZero() 30 << "num=" << (-num) << ", denom=" << (-denom); in TestRangeAboutZero() 35 count_until_next_change = denom; in TestRangeAboutZero() 42 for (int denom : kDenominators) { in TEST() local 43 TestRangeAboutZero(denom, denom == 3 ? 11 : 15, -3, function_to_test); in TEST() 49 for (int denom : kDenominators) { in TEST() local [all …]
|
D | integer_division.h | 18 constexpr auto DivideRoundingUp(Integer num, Integer denom) { in DivideRoundingUp() argument 19 if (denom < Integer{0}) { in DivideRoundingUp() 21 denom *= -1; in DivideRoundingUp() 24 return num / denom; in DivideRoundingUp() 26 return (num + denom - Integer{1}) / denom; in DivideRoundingUp() 33 constexpr Integer DividePositivesRoundingUp(Integer num, Integer denom) { in DividePositivesRoundingUp() argument 35 denom); in DividePositivesRoundingUp() 45 constexpr auto DivideRoundingNearest(Integer num, Integer denom) { in DivideRoundingNearest() argument 46 if (denom < Integer{0}) { in DivideRoundingNearest() 48 denom *= -1; in DivideRoundingNearest() [all …]
|
/external/mesa3d/src/compiler/nir/ |
D | nir_lower_idiv.c | 46 nir_ssa_def *numer, *denom, *af, *bf, *a, *b, *q, *r, *rt; in convert_instr() local 64 denom = nir_ssa_for_alu_src(bld, alu, 1); in convert_instr() 68 bf = nir_i2f32(bld, denom); in convert_instr() 72 b = nir_iabs(bld, denom); in convert_instr() 75 bf = nir_u2f32(bld, denom); in convert_instr() 77 b = denom; in convert_instr() 114 r = nir_ixor(bld, numer, denom); in convert_instr() 120 q = nir_imul(bld, q, denom); in convert_instr() 125 nir_bcsel(bld, r, nir_iadd(bld, q, denom), q)); in convert_instr() 139 emit_udiv(nir_builder *bld, nir_ssa_def *numer, nir_ssa_def *denom, bool modulo) in emit_udiv() argument [all …]
|
/external/libyuv/files/unit_test/ |
D | scale_test.cc | 497 #define DX(x, nom, denom) static_cast<int>(((Abs(x) / nom + 1) / 2) * nom * 2) argument 498 #define SX(x, nom, denom) static_cast<int>(((x / nom + 1) / 2) * denom * 2) argument 500 #define TEST_FACTOR1(name, filter, nom, denom, max_diff) \ argument 503 SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ 504 DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \ 511 SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ 512 DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \ 519 SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ 520 DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \ 527 SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ [all …]
|
D | scale_argb_test.cc | 232 #define DX(x, nom, denom) static_cast<int>((Abs(x) / nom) * nom) argument 233 #define SX(x, nom, denom) static_cast<int>((x / nom) * denom) argument 235 #define TEST_FACTOR1(name, filter, nom, denom, max_diff) \ argument 238 SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ 239 DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \ 246 SX(benchmark_width_, nom, denom), SX(benchmark_height_, nom, denom), \ 247 DX(benchmark_width_, nom, denom), DX(benchmark_height_, nom, denom), \ 254 #define TEST_FACTOR(name, nom, denom) \ argument 255 TEST_FACTOR1(name, None, nom, denom, 0) \ 256 TEST_FACTOR1(name, Linear, nom, denom, 3) \ [all …]
|
/external/webrtc/modules/video_coding/utility/ |
D | frame_dropper.cc | 186 float denom = 1.0f - drop_ratio_.filtered(); in DropFrame() local 187 if (denom < 1e-5) { in DropFrame() 188 denom = 1e-5f; in DropFrame() 190 int32_t limit = static_cast<int32_t>(1.0f / denom - 1.0f + 0.5f); in DropFrame() 216 float denom = drop_ratio_.filtered(); in DropFrame() local 217 if (denom < 1e-5) { in DropFrame() 218 denom = 1e-5f; in DropFrame() 220 int32_t limit = -static_cast<int32_t>(1.0f / denom - 1.0f + 0.5f); in DropFrame()
|
/external/webrtc/modules/audio_processing/ns/ |
D | noise_estimator.cc | 87 float denom = sum_log_i_square * (kFftSizeBy2Plus1 - kStartBand) - in PreUpdate() local 91 RTC_DCHECK_NE(denom, 0.f); in PreUpdate() 92 float pink_noise_adjustment = num / denom; in PreUpdate() 99 RTC_DCHECK_NE(denom, 0.f); in PreUpdate() 100 pink_noise_adjustment = num / denom; in PreUpdate() 132 float denom = PowApproximation(use_band, parametric_exp); in PreUpdate() local 133 RTC_DCHECK_NE(denom, 0.f); in PreUpdate() 134 parametric_noise_spectrum_[i] = parametric_num / denom; in PreUpdate()
|
/external/tensorflow/tensorflow/python/ops/signal/ |
D | spectral_ops.py | 147 denom = math_ops.square(forward_window) 149 denom = array_ops.pad(denom, [(0, overlaps * frame_step_ - frame_length)]) 150 denom = array_ops.reshape(denom, [overlaps, frame_step_]) 151 denom = math_ops.reduce_sum(denom, 0, keepdims=True) 152 denom = array_ops.tile(denom, [overlaps, 1]) 153 denom = array_ops.reshape(denom, [overlaps * frame_step_]) 155 return forward_window / denom[:frame_length]
|
/external/webrtc/modules/audio_coding/codecs/ilbc/ |
D | smooth.c | 36 int32_t B_W32, denom, num; in WebRtcIlbcfix_Smooth() local 141 denom = WebRtcSpl_DivW32W16(endiff, (int16_t)(w00w00 >> 16)); in WebRtcIlbcfix_Smooth() 143 denom = 65536; in WebRtcIlbcfix_Smooth() 146 if( denom > 7){ /* eliminates numerical problems in WebRtcIlbcfix_Smooth() 149 scale=WebRtcSpl_GetSizeInBits(denom)-15; in WebRtcIlbcfix_Smooth() 153 denomW16 = (int16_t)(denom >> scale); in WebRtcIlbcfix_Smooth() 159 denomW16=(int16_t)denom; in WebRtcIlbcfix_Smooth()
|
/external/aac/libSBRenc/src/ |
D | sbr_misc.cpp | 236 FIXP_DBL FDKsbrEnc_LSI_divide_scale_fract(FIXP_DBL num, FIXP_DBL denom, in FDKsbrEnc_LSI_divide_scale_fract() argument 242 INT shiftDenom = CountLeadingBits(denom); in FDKsbrEnc_LSI_divide_scale_fract() 250 if (denom > (tmp >> fixMin(shiftNum + shiftScale - 1, (DFRACT_BITS - 1)))) { in FDKsbrEnc_LSI_divide_scale_fract() 251 denom = denom << shiftDenom; in FDKsbrEnc_LSI_divide_scale_fract() 252 tmp = schur_div(tmp, denom, 15); in FDKsbrEnc_LSI_divide_scale_fract()
|
/external/llvm-project/polly/lib/External/isl/ |
D | isl_lp_private.h | 9 int max, isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom, 12 int max, isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom, 15 isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom, 18 isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom,
|
/external/llvm-project/llvm/test/Transforms/LoopVectorize/ |
D | pr30806.ll | 5 ; void testGuardedInnerLoop(uint32_t *ptr, uint32_t denom, uint32_t numer, uint32_t outer_lim) 8 ; if (denom > 0) { 9 ; const uint32_t lim = numer / denom; 21 define void @testGuardedInnerLoop(i32* %ptr, i32 %denom, i32 %numer, i32 %outer_lim) { 36 %0 = add i32 %denom, -1 46 %lim = udiv i32 %numer, %denom
|
/external/libcups/cups/ |
D | pwg-media.c | 37 static int pwg_scan_measurement(const char *buf, char **bufptr, int numer, int denom); 677 denom; /* ... */ in pwgMediaForPPD() local 687 denom = 72; in pwgMediaForPPD() 694 denom = 1; in pwgMediaForPPD() 719 denom = 1; in pwgMediaForPPD() 724 denom = 1; in pwgMediaForPPD() 729 denom = 1; in pwgMediaForPPD() 734 denom = 1; in pwgMediaForPPD() 739 denom = 1; in pwgMediaForPPD() 744 denom = 72; in pwgMediaForPPD() [all …]
|
/external/skqp/tests/ |
D | MathTest.cpp | 458 SkFixed denom = rand.nextS(); in DEF_TEST() local 459 SkFixed result = SkFixedDiv(numer, denom); in DEF_TEST() 460 int64_t check = SkLeftShift((int64_t)numer, 16) / denom; in DEF_TEST() 463 (void)SkCLZ(denom); in DEF_TEST() 472 ERRORF(reporter, "\nFixed Divide: %8x / %8x -> %8x %8x\n", numer, denom, result, check); in DEF_TEST() 527 T denom; in test_divmod() member 541 const T denom = kEdgeCases[i].denom; in test_divmod() local 543 SkTDivMod(numer, denom, &div, &mod); in test_divmod() 544 REPORTER_ASSERT(r, numer/denom == div); in test_divmod() 545 REPORTER_ASSERT(r, numer%denom == mod); in test_divmod() [all …]
|
/external/libvpx/libvpx/vpx_util/ |
D | vpx_timestamp.h | 36 const int denom = gcd(ratio->num, ratio->den); in reduce_ratio() local 37 ratio->num /= denom; in reduce_ratio() 38 ratio->den /= denom; in reduce_ratio()
|
/external/skqp/src/core/ |
D | SkMathPriv.h | 33 inline void SkTDivMod(In numer, In denom, Out* div, Out* mod) { in SkTDivMod() argument 41 const In d = numer/denom; in SkTDivMod() 43 *mod = static_cast<Out>(numer-d*denom); in SkTDivMod() 46 *div = static_cast<Out>(numer/denom); in SkTDivMod() 47 *mod = static_cast<Out>(numer%denom); in SkTDivMod()
|
/external/skia/tests/ |
D | MathTest.cpp | 490 SkFixed denom = rand.nextS(); in DEF_TEST() local 491 SkFixed result = SkFixedDiv(numer, denom); in DEF_TEST() 492 int64_t check = SkLeftShift((int64_t)numer, 16) / denom; in DEF_TEST() 495 (void)SkCLZ(denom); in DEF_TEST() 504 ERRORF(reporter, "\nFixed Divide: %8x / %8x -> %8x %8" PRIx64 "\n", numer, denom, in DEF_TEST() 561 T denom; in test_divmod() member 575 const T denom = kEdgeCases[i].denom; in test_divmod() local 577 SkTDivMod(numer, denom, &div, &mod); in test_divmod() 578 REPORTER_ASSERT(r, numer/denom == div); in test_divmod() 579 REPORTER_ASSERT(r, numer%denom == mod); in test_divmod() [all …]
|
/external/skia/src/pathops/ |
D | SkDLineIntersection.cpp | 51 double denom = bLen.fY * aLen.fX - aLen.fY * bLen.fX; in intersectRay() local 53 if (!approximately_zero(denom)) { in intersectRay() 57 numerA /= denom; in intersectRay() 58 numerB /= denom; in intersectRay() 120 double denom = axByLen - ayBxLen; in intersect() local 121 if (between(0, numerA, denom) && between(0, numerB, denom)) { in intersect() 122 fT[0][0] = numerA / denom; in intersect() 123 fT[1][0] = numerB / denom; in intersect()
|
D | SkPathOpsQuad.cpp | 25 double denom = dot00 * dot11 - dot01 * dot01; in pointInTriangle() local 29 if (denom >= 0) { in pointInTriangle() 30 return u >= 0 && v >= 0 && u + v < denom; in pointInTriangle() 32 return u <= 0 && v <= 0 && u + v > denom; in pointInTriangle() 355 static int valid_unit_divide(double numer, double denom, double* ratio) in valid_unit_divide() argument 359 denom = -denom; in valid_unit_divide() 361 if (denom == 0 || numer == 0 || numer >= denom) { in valid_unit_divide() 364 double r = numer / denom; in valid_unit_divide()
|
D | SkPathOpsLine.cpp | 38 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearPoint() local 41 if (!between(0, numer, denom)) { in nearPoint() 44 if (!denom) { in nearPoint() 47 double t = numer / denom; in nearPoint() 68 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearRay() local 71 double t = numer / denom; in nearRay()
|
/external/skqp/src/pathops/ |
D | SkDLineIntersection.cpp | 51 double denom = bLen.fY * aLen.fX - aLen.fY * bLen.fX; in intersectRay() local 53 if (!approximately_zero(denom)) { in intersectRay() 57 numerA /= denom; in intersectRay() 58 numerB /= denom; in intersectRay() 120 double denom = axByLen - ayBxLen; in intersect() local 121 if (between(0, numerA, denom) && between(0, numerB, denom)) { in intersect() 122 fT[0][0] = numerA / denom; in intersect() 123 fT[1][0] = numerB / denom; in intersect()
|
D | SkPathOpsLine.cpp | 38 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearPoint() local 41 if (!between(0, numer, denom)) { in nearPoint() 44 if (!denom) { in nearPoint() 47 double t = numer / denom; in nearPoint() 68 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearRay() local 71 double t = numer / denom; in nearRay()
|
D | SkPathOpsQuad.cpp | 25 double denom = dot00 * dot11 - dot01 * dot01; in pointInTriangle() local 29 if (denom >= 0) { in pointInTriangle() 30 return u >= 0 && v >= 0 && u + v < denom; in pointInTriangle() 32 return u <= 0 && v <= 0 && u + v > denom; in pointInTriangle() 355 static int valid_unit_divide(double numer, double denom, double* ratio) in valid_unit_divide() argument 359 denom = -denom; in valid_unit_divide() 361 if (denom == 0 || numer == 0 || numer >= denom) { in valid_unit_divide() 364 double r = numer / denom; in valid_unit_divide()
|
/external/aac/libFDK/src/ |
D | fixpoint_math.cpp | 481 FIXP_DBL fDivNorm(FIXP_DBL num, FIXP_DBL denom) { in fDivNorm() argument 485 FDK_ASSERT(denom >= num); in fDivNorm() 487 res = fDivNorm(num, denom, &e); in fDivNorm() 502 FIXP_DBL fDivNormSigned(FIXP_DBL num, FIXP_DBL denom) { in fDivNormSigned() argument 507 if (denom == (FIXP_DBL)0) { in fDivNormSigned() 511 sign = ((num >= (FIXP_DBL)0) != (denom >= (FIXP_DBL)0)); in fDivNormSigned() 512 res = fDivNormSigned(num, denom, &e); in fDivNormSigned() 566 FIXP_DBL fDivNormHighPrec(FIXP_DBL num, FIXP_DBL denom, INT *result_e) { in fDivNormHighPrec() argument 571 FDK_ASSERT(denom > (FIXP_DBL)0); in fDivNormHighPrec() 583 norm_den = CountLeadingBits(denom); in fDivNormHighPrec() [all …]
|
/external/skia/src/core/ |
D | SkYUVMath.cpp | 268 const float denom = static_cast<float>((1 << c.bits) - 1); in make_rgb_to_yuv_matrix() local 272 addUV = (128 << shift) / denom; in make_rgb_to_yuv_matrix() 275 scaleY = (219 << shift) / denom; in make_rgb_to_yuv_matrix() 276 addY = ( 16 << shift) / denom; in make_rgb_to_yuv_matrix() 277 scaleUV = (224 << shift) / denom; in make_rgb_to_yuv_matrix()
|