/external/fonttools/Lib/fontTools/misc/ |
D | roundTools.py | 44 def maybeRound(v, tolerance, round=otRound): argument 46 return rounded if abs(rounded - v) <= tolerance else v 48 def roundFunc(tolerance, round=otRound): argument 49 if tolerance < 0: 52 if tolerance == 0: 55 if tolerance >= .5: 58 return functools.partial(maybeRound, tolerance=tolerance, round=round)
|
/external/eigen/Eigen/src/SparseCore/ |
D | SparseSparseProductWithPruning.h | 20 …(const Lhs& lhs, const Rhs& rhs, ResultType& res, const typename ResultType::RealScalar& tolerance) in sparse_sparse_product_with_pruning_impl() argument 73 for (typename AmbiVector<Scalar,StorageIndex>::Iterator it(tempVector,tolerance); it; ++it) in sparse_sparse_product_with_pruning_impl() 91 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) 94 … internal::sparse_sparse_product_with_pruning_impl<Lhs,Rhs,ResultType>(lhs, rhs, _res, tolerance); 103 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) 108 …l::sparse_sparse_product_with_pruning_impl<Lhs,Rhs,SparseTemporaryType>(lhs, rhs, _res, tolerance); 117 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) 121 … internal::sparse_sparse_product_with_pruning_impl<Rhs,Lhs,ResultType>(rhs, lhs, _res, tolerance); 130 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) 136 …_with_pruning_impl<ColMajorMatrixLhs,ColMajorMatrixRhs,ResultType>(colLhs, colRhs, res, tolerance); [all …]
|
/external/tensorflow/tensorflow/lite/kernels/internal/ |
D | log_quantized_test.cc | 74 int output_integer_bits, int tolerance) { in CheckOutputData() argument 86 ? tolerance in CheckOutputData() 87 : std::max(tolerance, static_cast<int>(std::ceil( in CheckOutputData() 105 << "; tolerance=" << tolerance in CheckOutputData() 121 const string& check_label, int tolerance) { in RunSingleTest() argument 149 InputIntegerBits, OutputIntegerBits, tolerance); in RunSingleTest() 155 const string& check_label, int tolerance) { in RunSingleTest() argument 159 tolerance) in RunSingleTest() 200 int tolerance) { in RunSingleTest() argument 204 tolerance) in RunSingleTest() [all …]
|
/external/OpenCL-CTS/test_conformance/basic/ |
D | test_image_param.cpp | 44 cl_float expected[ 4 ], tolerance; in validate_results() local 55 tolerance = 1.f / 255.f; in validate_results() 65 tolerance = 1.f / 127.f; in validate_results() 75 tolerance = 1.f / 127.f; in validate_results() 85 tolerance = 1.f / 127.f; in validate_results() 95 tolerance = 1.f / 65535.f; in validate_results() 105 tolerance = 0.0001f; in validate_results() 115 tolerance = 0.0001f; in validate_results() 136 if( error1 > tolerance || error2 > tolerance || error3 > tolerance || error4 > tolerance ) in validate_results() 148 … if( error1 <= tolerance && error2 <= tolerance && error3 <= tolerance && error4 <= tolerance ) in validate_results()
|
/external/fonttools/Lib/fontTools/varLib/ |
D | iup.py | 89 def can_iup_in_between(deltas, coords, i, j, tolerance): argument 96 return all(abs(complex(x-p, y-q)) <= tolerance for (x,y),(p,q) in zip(deltas, interp)) 98 def _iup_contour_bound_forced_set(delta, coords, tolerance=0): argument 138 if not (min(d1,d2)-tolerance <= dj <= max(d1,d2)+tolerance): 143 if abs(dj - d1) > tolerance: 146 if abs(dj) > tolerance: 152 if dj != d1 and ((dj-tolerance < d1) != (d1 < d2)): 155 if d2 != dj and ((d2 < dj+tolerance) != (d1 < d2)): 166 def _iup_contour_optimize_dp(delta, coords, forced={}, tolerance=0, lookback=None): argument 194 if cost < best_cost and can_iup_in_between(delta, coords, j, i, tolerance): [all …]
|
/external/deqp-deps/amber/src/ |
D | verifier.cc | 76 double tolerance, in IsEqualWithTolerance() argument 85 if (difference > ((tolerance / 100.0) * std::fabs(expected))) { in IsEqualWithTolerance() 88 } else if (difference > tolerance) { in IsEqualWithTolerance() 99 const auto& tolerance = command->GetTolerances(); in CheckActualValue() local 135 command->HasTolerances() ? tolerance[0].value : kEpsilon, in CheckActualValue() 136 command->HasTolerances() ? tolerance[0].is_percent : true)) { in CheckActualValue() 174 double* tolerance, in SetupToleranceForTexels() argument 179 tolerance[0] = tol[0].value; in SetupToleranceForTexels() 180 tolerance[1] = tol[1].value; in SetupToleranceForTexels() 181 tolerance[2] = tol[2].value; in SetupToleranceForTexels() [all …]
|
/external/webrtc/modules/audio_coding/neteq/ |
D | audio_decoder_unittest.cc | 47 int tolerance, in CompareInputOutput() argument 52 ASSERT_NEAR(input[n], output[channels * n + delay], tolerance) in CompareInputOutput() 62 int tolerance) { in CompareTwoChannels() argument 66 ASSERT_NEAR(output[channels * n], output[channels * n + 1], tolerance) in CompareTwoChannels() 158 int tolerance, in EncodeDecodeTest() argument 162 ASSERT_GE(tolerance, 0) << "Test must define a tolerance >= 0"; in EncodeDecodeTest() 200 CompareInputOutput(input, decoded, processed_samples, channels_, tolerance, in EncodeDecodeTest() 465 int tolerance = 251; in TEST_F() local 467 EncodeDecodeTest(data_length_, tolerance, mse); in TEST_F() 491 int tolerance = 308; in TEST_F() local [all …]
|
/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/stats/ |
D | StatsTestUtil.java | 88 double tolerance) { in assertAggregationMapEquals() argument 92 assertAggregationDataEquals(expected.get(entry.getKey()), entry.getValue(), tolerance); in assertAggregationMapEquals() local 104 AggregationData expected, final AggregationData actual, final double tolerance) { in assertAggregationDataEquals() argument 110 assertThat(((SumDataDouble) actual).getSum()).isWithin(tolerance).of(arg.getSum()); in assertAggregationDataEquals() 134 assertDistributionDataEquals(arg, (DistributionData) actual, tolerance); in assertAggregationDataEquals() 143 .isWithin(tolerance) in assertAggregationDataEquals() 162 .isWithin(tolerance) in assertAggregationDataEquals() 187 DistributionData expected, DistributionData actual, double tolerance) { in assertDistributionDataEquals() argument 188 assertThat(actual.getMean()).isWithin(tolerance).of(expected.getMean()); in assertDistributionDataEquals() 190 assertThat(actual.getMean()).isWithin(tolerance).of(expected.getMean()); in assertDistributionDataEquals() [all …]
|
/external/llvm-project/libc/utils/MPFRWrapper/ |
D | MPFRUtils.h | 155 template <typename T> static bool match(T in, T out, double tolerance) { 156 return compareUnaryOperationSingleOutput(op, in, out, tolerance); 160 static bool match(T in, const BinaryOutput<T> &out, double tolerance) { 161 return compareUnaryOperationTwoOutputs(op, in, out, tolerance); 165 static bool match(const BinaryInput<T> &in, T out, double tolerance) { 166 return compareBinaryOperationOneOutput(op, in, out, tolerance); 171 double tolerance) { 172 return compareBinaryOperationTwoOutputs(op, in, out, tolerance); 176 static bool match(const TernaryInput<T> &in, T out, double tolerance) { 244 #define EXPECT_MPFR_MATCH(op, input, matchValue, tolerance) \ [all …]
|
/external/oboe/apps/OboeTester/app/src/main/java/com/google/sample/oboe/manualtest/ |
D | ManualGlitchActivity.java | 67 float tolerance = (float) mTaperTolerance.linearToExponential( in setToleranceProgress() local 69 setTolerance(tolerance); in setToleranceProgress() 70 mTextTolerance.setText("Tolerance = " + String.format("%5.3f", tolerance)); in setToleranceProgress() 87 private void setToleranceFader(float tolerance) { in setToleranceFader() argument 89 tolerance) * FADER_PROGRESS_MAX)); in setToleranceFader() 142 float tolerance = bundle.getFloat(KEY_TOLERANCE, DEFAULT_TOLERANCE); in configureStreamsFromBundle() local 143 setToleranceFader(tolerance); in configureStreamsFromBundle() 144 setTolerance(tolerance); in configureStreamsFromBundle() 145 mTolerance = tolerance; in configureStreamsFromBundle()
|
/external/deqp-deps/amber/samples/ |
D | image_diff.cc | 35 float tolerance = 1.0f; member 82 sstream >> opts->tolerance; in ParseArgs() 87 if (opts->tolerance < 0 || opts->tolerance > 255) { in ParseArgs() 102 sstream >> opts->tolerance; in ParseArgs() 107 if (opts->tolerance < 0 || opts->tolerance > 1) { in ParseArgs() 188 res = buffers[0].CompareRMSE(&buffers[1], options.tolerance); in main() 190 res = buffers[0].CompareHistogramEMD(&buffers[1], options.tolerance); in main()
|
/external/fonttools/Lib/fontTools/pens/ |
D | perimeterPen.py | 17 def __init__(self, glyphset=None, tolerance=0.005): argument 20 self.tolerance = tolerance 25 self._addCubic = self._addCubicQuadrature if tolerance >= 0.0015 else self._addCubicRecursive 26 …self._addQuadratic = self._addQuadraticQuadrature if tolerance >= 0.00075 else self._addQuadraticE… 51 self.value += calcCubicArcLengthC(c0, c1, c2, c3, self.tolerance)
|
/external/tensorflow/tensorflow/core/kernels/ |
D | quantized_resize_bilinear_op_test.cc | 149 const float max, const float tolerance, in CheckTensorValue() argument 170 const int q_tolerance = std::round(tolerance); in CheckTensorValue() 177 const float rel_tolerance = std::max(ref_val, 1.0f) * tolerance; in CheckTensorValue() 298 float tolerance, bool relative, in RunTestResizeBilinearTwoDims() argument 315 /*half_pixel_centers=*/half_pixel_centers, min, max, tolerance, relative); in RunTestResizeBilinearTwoDims() 338 void TestResizeBilinearTwoDimsType(const float tolerance, const bool relative, in TestResizeBilinearTwoDimsType() argument 340 RunTestResizeBilinearTwoDims<T>(1, 1, 1, 1, 1, 1, tolerance, relative, in TestResizeBilinearTwoDimsType() 342 RunTestResizeBilinearTwoDims<T>(1, 1, 128, 1, 256, 1, tolerance, relative, in TestResizeBilinearTwoDimsType() 344 RunTestResizeBilinearTwoDims<T>(1, 128, 1, 256, 1, 1, tolerance, relative, in TestResizeBilinearTwoDimsType() 346 RunTestResizeBilinearTwoDims<T>(1, 128, 128, 256, 256, 1, tolerance, relative, in TestResizeBilinearTwoDimsType() [all …]
|
/external/skia/tests/ |
D | StrokeIndirectTest.cpp | 224 int8_t actualLevel, float tolerance, bool printError = true) { in check_resolve_level() argument 227 actualLevel > sk_float_nextlog2(numCombinedSegments + tolerance)) || in check_resolve_level() 229 actualLevel < sk_float_nextlog2(numCombinedSegments - tolerance))) { in check_resolve_level() 241 int8_t** nextResolveLevel, float tolerance) { in check_first_resolve_levels() argument 250 if (!check_resolve_level(r, numSegments, *(*nextResolveLevel)++, tolerance)) { in check_first_resolve_levels() 260 float tolerance = 1.15f; in test_tolerance() local 263 tolerance *= 2; in test_tolerance() 265 return tolerance; in test_tolerance() 278 float tolerance = test_tolerance(stroke.getJoin()); in verifyResolveLevels() local 294 tolerance)) { in verifyResolveLevels() [all …]
|
D | ColorMatrixTest.cpp | 20 SkColor expected, SkColor actual, int tolerance) { in assert_color() argument 21 REPORTER_ASSERT(reporter, abs((int)(SkColorGetA(expected) - SkColorGetA(actual))) <= tolerance); in assert_color() 22 REPORTER_ASSERT(reporter, abs((int)(SkColorGetR(expected) - SkColorGetR(actual))) <= tolerance); in assert_color() 23 REPORTER_ASSERT(reporter, abs((int)(SkColorGetG(expected) - SkColorGetG(actual))) <= tolerance); in assert_color() 24 REPORTER_ASSERT(reporter, abs((int)(SkColorGetB(expected) - SkColorGetB(actual))) <= tolerance); in assert_color()
|
/external/guava/android/guava-tests/test/com/google/common/math/ |
D | DoubleMathTest.java | 581 for (double tolerance : FINITE_TOLERANCE_CANDIDATES) { in testFuzzyEqualsFinite() 582 assertEquals(Math.abs(a - b) <= tolerance, DoubleMath.fuzzyEquals(a, b, tolerance)); in testFuzzyEqualsFinite() 591 for (double tolerance : FINITE_TOLERANCE_CANDIDATES) { in testFuzzyInfiniteVersusFiniteWithFiniteTolerance() 592 assertFalse(DoubleMath.fuzzyEquals(a, inf, tolerance)); in testFuzzyInfiniteVersusFiniteWithFiniteTolerance() 593 assertFalse(DoubleMath.fuzzyEquals(inf, a, tolerance)); in testFuzzyInfiniteVersusFiniteWithFiniteTolerance() 601 for (double tolerance : FINITE_TOLERANCE_CANDIDATES) { in testFuzzyInfiniteVersusInfiniteWithFiniteTolerance() 602 assertTrue(DoubleMath.fuzzyEquals(inf, inf, tolerance)); in testFuzzyInfiniteVersusInfiniteWithFiniteTolerance() 603 assertFalse(DoubleMath.fuzzyEquals(inf, -inf, tolerance)); in testFuzzyInfiniteVersusInfiniteWithFiniteTolerance() 618 for (double tolerance : TOLERANCE_CANDIDATES) { in testFuzzyEqualsOneNaN() 619 assertFalse(DoubleMath.fuzzyEquals(a, Double.NaN, tolerance)); in testFuzzyEqualsOneNaN() [all …]
|
/external/guava/guava-tests/test/com/google/common/math/ |
D | DoubleMathTest.java | 581 for (double tolerance : FINITE_TOLERANCE_CANDIDATES) { in testFuzzyEqualsFinite() 582 assertEquals(Math.abs(a - b) <= tolerance, DoubleMath.fuzzyEquals(a, b, tolerance)); in testFuzzyEqualsFinite() 591 for (double tolerance : FINITE_TOLERANCE_CANDIDATES) { in testFuzzyInfiniteVersusFiniteWithFiniteTolerance() 592 assertFalse(DoubleMath.fuzzyEquals(a, inf, tolerance)); in testFuzzyInfiniteVersusFiniteWithFiniteTolerance() 593 assertFalse(DoubleMath.fuzzyEquals(inf, a, tolerance)); in testFuzzyInfiniteVersusFiniteWithFiniteTolerance() 601 for (double tolerance : FINITE_TOLERANCE_CANDIDATES) { in testFuzzyInfiniteVersusInfiniteWithFiniteTolerance() 602 assertTrue(DoubleMath.fuzzyEquals(inf, inf, tolerance)); in testFuzzyInfiniteVersusInfiniteWithFiniteTolerance() 603 assertFalse(DoubleMath.fuzzyEquals(inf, -inf, tolerance)); in testFuzzyInfiniteVersusInfiniteWithFiniteTolerance() 618 for (double tolerance : TOLERANCE_CANDIDATES) { in testFuzzyEqualsOneNaN() 619 assertFalse(DoubleMath.fuzzyEquals(a, Double.NaN, tolerance)); in testFuzzyEqualsOneNaN() [all …]
|
/external/webrtc/call/ |
D | receive_time_calculator.cc | 31 tolerance("tol", TimeDelta::Millis(1)), in ReceiveTimeCalculatorConfig() 36 {&max_packet_time_repair, &stall_threshold, &tolerance, &max_stall}, in ReceiveTimeCalculatorConfig() 85 corrected_time_us + config_.tolerance->us() < last_corrected_time_us_; in ReconcileReceiveTimes() 92 safe_time_delta_us > system_time_delta_us + config_.tolerance->us(); in ReconcileReceiveTimes() 95 system_time_delta_us > packet_time_delta_us + config_.tolerance->us(); in ReconcileReceiveTimes()
|
/external/fonttools/Lib/fontTools/cu2qu/ |
D | cu2qu.py | 238 @cython.locals(tolerance=cython.double, p0=cython.complex, p1=cython.complex, p2=cython.complex, p3… 240 def cubic_farthest_fit_inside(p0, p1, p2, p3, tolerance): argument 259 if abs(p2) <= tolerance and abs(p1) <= tolerance: 264 if abs(mid) > tolerance: 267 return (cubic_farthest_fit_inside(p0, (p0+p1)*.5, mid-deriv3, mid, tolerance) and 268 cubic_farthest_fit_inside(mid, mid+deriv3, (p2+p3)*.5, p3, tolerance)) 272 @cython.locals(tolerance=cython.double, _2_3=cython.double) 274 def cubic_approx_quadratic(cubic, tolerance, _2_3=2/3): argument 300 0, tolerance): 306 @cython.locals(n=cython.int, tolerance=cython.double, _2_3=cython.double) [all …]
|
/external/skia/src/gpu/geometry/ |
D | GrWangsFormula.h | 133 SK_ALWAYS_INLINE static float conic_pow2(float tolerance, const SkPoint pts[], float w, 157 const float r_minus_eps = std::max(0.f, max_len - tolerance); 160 const float denom = 4 * min_w * tolerance; 169 SK_ALWAYS_INLINE static float conic(float tolerance, const SkPoint pts[], float w, 171 return sqrtf(conic_pow2(tolerance, pts, w, vectorXform)); 176 SK_ALWAYS_INLINE static int conic_log2(float tolerance, const SkPoint pts[], float w, 179 return nextlog4(conic_pow2(tolerance, pts, w, vectorXform));
|
/external/protobuf/src/google/protobuf/util/ |
D | field_comparator.cc | 189 Tolerance* tolerance = FindOrNull(map_tolerance_, &field); in CompareDoubleOrFloat() local 190 if (tolerance == NULL && has_default_tolerance_) { in CompareDoubleOrFloat() 191 tolerance = &default_tolerance_; in CompareDoubleOrFloat() 193 if (tolerance == NULL) { in CompareDoubleOrFloat() 200 value_1, value_2, static_cast<T>(tolerance->fraction), in CompareDoubleOrFloat() 201 static_cast<T>(tolerance->margin)); in CompareDoubleOrFloat()
|
/external/skqp/tests/ |
D | ColorMatrixTest.cpp | 21 SkColor expected, SkColor actual, int tolerance) { in assert_color() argument 22 REPORTER_ASSERT(reporter, abs((int)(SkColorGetA(expected) - SkColorGetA(actual))) <= tolerance); in assert_color() 23 REPORTER_ASSERT(reporter, abs((int)(SkColorGetR(expected) - SkColorGetR(actual))) <= tolerance); in assert_color() 24 REPORTER_ASSERT(reporter, abs((int)(SkColorGetG(expected) - SkColorGetG(actual))) <= tolerance); in assert_color() 25 REPORTER_ASSERT(reporter, abs((int)(SkColorGetB(expected) - SkColorGetB(actual))) <= tolerance); in assert_color()
|
/external/tensorflow/tensorflow/c/eager/ |
D | mnist_gradients_test.cc | 116 float tolerance = 1e-3; in TEST_P() local 118 ASSERT_NEAR(result_data[j], expected_dA[j], tolerance); in TEST_P() 130 ASSERT_NEAR(result_data[j], expected_dB[j], tolerance); in TEST_P() 193 float tolerance = 1e-3; in TEST_P() local 195 ASSERT_NEAR(result_data[j], expected_scores[j], tolerance); in TEST_P() 206 ASSERT_NEAR(result_data[j], expected_losses[j], tolerance); in TEST_P() 270 float tolerance = 1e-3; in TEST_P() local 272 ASSERT_NEAR(result_data[j], expected_scores[j], tolerance); in TEST_P() 283 ASSERT_NEAR(result_data[j], expected_losses[j], tolerance); in TEST_P() 339 float tolerance = 1e-3; in TEST_P() local [all …]
|
/external/skia/include/core/ |
D | SkScalar.h | 137 SkScalar tolerance = SK_ScalarNearlyZero) { 138 SkASSERT(tolerance >= 0); 139 return SkScalarAbs(x) <= tolerance; 143 SkScalar tolerance = SK_ScalarNearlyZero) { 144 SkASSERT(tolerance >= 0); 145 return SkScalarAbs(x-y) <= tolerance;
|
/external/tensorflow/tensorflow/lite/testing/model_coverage/ |
D | model_coverage_lib.py | 409 tolerance=5): argument 438 np.testing.assert_almost_equal(tf_result, tflite_result, tolerance) 444 tolerance=5): argument 463 np.testing.assert_almost_equal(tf_result, tflite_result, tolerance) 470 tolerance=5): argument 508 tolerance) 515 tolerance=5, argument 549 tolerance) 556 tolerance=5): argument 584 np.testing.assert_almost_equal(golden_data, tflite_results, tolerance) [all …]
|