Home
last modified time | relevance | path

Searched refs:tolerance (Results 1 – 25 of 350) sorted by relevance

12345678910>>...14

/external/robolectric/integration_tests/nativegraphics/src/test/java/org/robolectric/integrationtests/nativegraphics/
DColorUtils.java32 public static void verifyColor(int expected, int observed, int tolerance) { in verifyColor() argument
33 verifyColor("", expected, observed, tolerance); in verifyColor()
44 public static void verifyColor(@NonNull String s, int expected, int observed, int tolerance) { in verifyColor() argument
51 + tolerance; in verifyColor()
52 String red = verifyChannel("red", expected, observed, tolerance, (i) -> Color.red(i)); in verifyColor()
53 String green = verifyChannel("green", expected, observed, tolerance, (i) -> Color.green(i)); in verifyColor()
54 String blue = verifyChannel("blue", expected, observed, tolerance, (i) -> Color.blue(i)); in verifyColor()
55 String alpha = verifyChannel("alpha", expected, observed, tolerance, (i) -> Color.alpha(i)); in verifyColor()
69 @NonNull String msg, Color expected, Color observed, float tolerance) { in verifyColor() argument
83 + tolerance; in verifyColor()
[all …]
/external/eigen/Eigen/src/SparseCore/
DSparseSparseProductWithPruning.h20 …(const Lhs& lhs, const Rhs& rhs, ResultType& res, const typename ResultType::RealScalar& tolerance) in sparse_sparse_product_with_pruning_impl() argument
74 for (typename AmbiVector<ResScalar,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/
Dlog_quantized_test.cc74 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/fonttools/Lib/fontTools/misc/
DroundTools.py44 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/OpenCL-CTS/test_conformance/basic/
Dtest_image_param.cpp44 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/
Diup.py89 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/
Dverifier.cc76 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/
Daudio_decoder_unittest.cc47 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/swiftshader/tests/MathUnitTests/
Dunittests.cpp105 const float tolerance = pow(2.0f, -7.0f); // Absolute in TEST() local
107 float margin = abs(val - ref) / tolerance; in TEST()
116 const float tolerance = 3; // ULP in TEST() local
119 float margin = ulp / tolerance; in TEST()
185 const float tolerance = (1 + 2 * abs(x)); in TEST() local
187 float margin = ulp / tolerance; in TEST()
260 const float tolerance = pow(2.0f, -21.0f); // Absolute in TEST() local
262 float margin = abs(val - ref) / tolerance; in TEST()
271 const float tolerance = 3; // ULP in TEST() local
274 float margin = ulp / tolerance; in TEST()
[all …]
/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/stats/
DStatsTestUtil.java88 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/oboe/apps/OboeTester/app/src/main/java/com/google/sample/oboe/manualtest/
DManualGlitchActivity.java67 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/
Dimage_diff.cc35 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/ComputeLibrary/tests/validation/CL/
DAccumulate.cpp47 constexpr AbsoluteTolerance<float> tolerance(1.0f); variable
62 validate(CLAccessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
67 validate(CLAccessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
82 validate(CLAccessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
87 validate(CLAccessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
102 validate(CLAccessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
107 validate(CLAccessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
DMagnitude.cpp43 AbsoluteTolerance<T> tolerance(MagnitudeType magnitude_type) in tolerance() function
60 validate(CLAccessor(_target), _reference, tolerance<int16_t>(_magnitude_type));
67 validate(CLAccessor(_target), _reference, tolerance<int16_t>(_magnitude_type));
76 validate(CLAccessor(_target), _reference, tolerance<int32_t>(_magnitude_type));
83 validate(CLAccessor(_target), _reference, tolerance<int32_t>(_magnitude_type));
/external/ComputeLibrary/tests/validation/NEON/
DAccumulate.cpp47 constexpr AbsoluteTolerance<float> tolerance(1.0f); variable
63 validate(Accessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
68 validate(Accessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
84 validate(Accessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
89 validate(Accessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
105 validate(Accessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
110 validate(Accessor(_target), _reference, tolerance); in FIXTURE_DATA_TEST_CASE()
/external/tensorflow/tensorflow/lite/experimental/acceleration/mini_benchmark/
Dlibjpeg_decoder_test_helper.h37 MATCHER_P(AreAlmostEqualWithTolerance, tolerance, "") {
44 << " which is greater than " << tolerance << ". ";
47 return diff <= tolerance;
53 MATCHER_P(HasChessboardPatternWithTolerance, tolerance, "") {
74 testing::Pointwise(AreAlmostEqualWithTolerance(tolerance),
91 MATCHER_P(HasRainbowPatternWithTolerance, tolerance, "") {
108 testing::Pointwise(AreAlmostEqualWithTolerance(tolerance),
/external/tensorflow/tensorflow/core/kernels/
Dquantized_resize_bilinear_op_test.cc152 const float max, const float tolerance, in CheckTensorValue() argument
173 const int q_tolerance = std::round(tolerance); in CheckTensorValue()
180 const float rel_tolerance = std::max(ref_val, 1.0f) * tolerance; in CheckTensorValue()
301 float tolerance, bool relative, in RunTestResizeBilinearTwoDims() argument
318 /*half_pixel_centers=*/half_pixel_centers, min, max, tolerance, relative); in RunTestResizeBilinearTwoDims()
341 void TestResizeBilinearTwoDimsType(const float tolerance, const bool relative, in TestResizeBilinearTwoDimsType() argument
343 RunTestResizeBilinearTwoDims<T>(1, 1, 1, 1, 1, 1, tolerance, relative, in TestResizeBilinearTwoDimsType()
345 RunTestResizeBilinearTwoDims<T>(1, 1, 128, 1, 256, 1, tolerance, relative, in TestResizeBilinearTwoDimsType()
347 RunTestResizeBilinearTwoDims<T>(1, 128, 1, 256, 1, 1, tolerance, relative, in TestResizeBilinearTwoDimsType()
349 RunTestResizeBilinearTwoDims<T>(1, 128, 128, 256, 256, 1, tolerance, relative, in TestResizeBilinearTwoDimsType()
[all …]
/external/musl/src/linux/
Dclock_adjtime.c14 long long constant, precision, tolerance; member
28 long constant, precision, tolerance; member
50 .tolerance = utx->tolerance, in clock_adjtime()
74 utx->tolerance = ktx.tolerance; in clock_adjtime()
103 .tolerance = utx->tolerance, in clock_adjtime()
131 utx->tolerance = ktx.tolerance; in clock_adjtime()
/external/armnn/delegate/src/test/
DTestUtils.cpp41 uint8_t tolerance = 1; in CompareData() local
44 CHECK(std::max(tensor1[i], tensor2[i]) - std::min(tensor1[i], tensor2[i]) <= tolerance); in CompareData()
50 int16_t tolerance = 1; in CompareData() local
53 CHECK(std::max(tensor1[i], tensor2[i]) - std::min(tensor1[i], tensor2[i]) <= tolerance); in CompareData()
59 int8_t tolerance = 1; in CompareData() local
62 CHECK(std::max(tensor1[i], tensor2[i]) - std::min(tensor1[i], tensor2[i]) <= tolerance); in CompareData()
/external/robolectric/integration_tests/ctesque/src/sharedTest/java/android/view/
DMotionEventTest.java876 public void isEqualToWithinTolerance(MotionEvent other, float tolerance) { in isEqualToWithinTolerance() argument
887 check("getX()").that(actual.getX()).isWithin(tolerance).of(other.getX()); in isEqualToWithinTolerance()
888 check("getY()").that(actual.getY()).isWithin(tolerance).of(other.getY()); in isEqualToWithinTolerance()
889 check("getPressure()").that(actual.getPressure()).isWithin(tolerance).of(other.getPressure()); in isEqualToWithinTolerance()
890 check("getSize()").that(actual.getSize()).isWithin(tolerance).of(other.getSize()); in isEqualToWithinTolerance()
893 .isWithin(tolerance) in isEqualToWithinTolerance()
897 .isWithin(tolerance) in isEqualToWithinTolerance()
901 .isWithin(tolerance) in isEqualToWithinTolerance()
905 .isWithin(tolerance) in isEqualToWithinTolerance()
909 .isWithin(tolerance) in isEqualToWithinTolerance()
[all …]
/external/fonttools/Lib/fontTools/pens/
DperimeterPen.py17 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/skia/resources/sksl/intrinsics/
DPackUnorm2x16.sksl11 const float2 tolerance = float2(0.015625);
13 return (all(lessThan(abs(unpackUnorm2x16(xy) - float2(expected.xy)), tolerance)) &&
14 all(lessThan(abs(unpackUnorm2x16(zw) - float2(expected.zw)), tolerance)) &&
15 all(lessThan(abs(unpackUnorm2x16(constXY) - float2(expected.xy)), tolerance)) &&
16 all(lessThan(abs(unpackUnorm2x16(constZW) - float2(expected.zw)), tolerance)))
/external/guava/guava-tests/test/com/google/common/math/
DDoubleMathTest.java581 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/android/guava-tests/test/com/google/common/math/
DDoubleMathTest.java581 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/armnn/tests/TfLiteYoloV3Big-Armnn/
DNMS.cpp87 float tolerance = 0.001f; in compare_detection() local
88 return (std::fabs(detection.classes[0] - expected[0]) < tolerance && in compare_detection()
89 std::fabs(detection.box.xmin - expected[1]) < tolerance && in compare_detection()
90 std::fabs(detection.box.ymin - expected[2]) < tolerance && in compare_detection()
91 std::fabs(detection.box.xmax - expected[3]) < tolerance && in compare_detection()
92 std::fabs(detection.box.ymax - expected[4]) < tolerance && in compare_detection()
93 std::fabs(detection.confidence - expected[5]) < tolerance ); in compare_detection()

12345678910>>...14