Home
last modified time | relevance | path

Searched refs:sum (Results 1 – 25 of 53) sorted by relevance

123

/cts/hostsidetests/incident/src/com/android/server/cts/
DNetstatsIncidentTest.java118 final long devRxPackets = sum(dump.getDevStats(), st, b -> b.getRxPackets()); in testSanityCheck()
119 final long devRxBytes = sum(dump.getDevStats(), st, b -> b.getRxBytes()); in testSanityCheck()
120 final long devTxPackets = sum(dump.getDevStats(), st, b -> b.getTxPackets()); in testSanityCheck()
121 final long devTxBytes = sum(dump.getDevStats(), st, b -> b.getTxBytes()); in testSanityCheck()
123 final long xtRxPackets = sum(dump.getXtStats(), st, b -> b.getRxPackets()); in testSanityCheck()
124 final long xtRxBytes = sum(dump.getXtStats(), st, b -> b.getRxBytes()); in testSanityCheck()
125 final long xtTxPackets = sum(dump.getXtStats(), st, b -> b.getTxPackets()); in testSanityCheck()
126 final long xtTxBytes = sum(dump.getXtStats(), st, b -> b.getTxBytes()); in testSanityCheck()
128 final long uidRxPackets = sum(dump.getUidStats(), st, uidFilt, b -> b.getRxPackets()); in testSanityCheck()
129 final long uidRxBytes = sum(dump.getUidStats(), st, uidFilt, b -> b.getRxBytes()); in testSanityCheck()
[all …]
/cts/apps/VpnApp/src/com/android/cts/vpnfirewall/
DRfc1071.java21 int sum = 0; in checksum() local
25 sum += (data[i] & 0xFF) << 8; in checksum()
26 sum = (sum & 0xFFFF) + (sum >> 16); in checksum()
31 sum += (data[i] & 0xFF); in checksum()
32 sum = (sum & 0xFFFF) + (sum >> 16); in checksum()
36 sum = (sum & 0xFFFF) + (sum >> 16); in checksum()
37 return sum ^ 0xFFFF; in checksum()
/cts/tests/camera/src/android/hardware/camera2/cts/
Dmeans_yuvx_444_2d_to_1d.rscript35 uint3 sum = { 0, 0, 0 };
46 sum.x += elem.x;
47 sum.y += elem.y;
48 sum.z += elem.z;
51 sum.x *= inv_width; // multiply by 1/w
52 sum.y *= inv_width; // multiply by 1/w
53 sum.z *= inv_width; // multiply by 1/w
55 yuvx_444 avg = convert_yuvx_444(sum);
66 uint3 sum = { 0, 0, 0 };
73 sum.x += elem.x;
[all …]
Dmeans_yuvx_444_1d_to_single.rscript31 uint3 sum = { 0, 0, 0 };
41 sum.x += elem.x;
42 sum.y += elem.y;
43 sum.z += elem.z;
46 sum.x *= inv_width; // multiply by 1/w
47 sum.y *= inv_width; // multiply by 1/w
48 sum.z *= inv_width; // multiply by 1/w
50 yuvx_444 avg = convert_yuvx_444(sum);
/cts/tests/tests/keystore/src/android/keystore/cts/
DPerformanceTestResult.java61 double sum = 0; in getTotalTime() local
63 sum += mSamples[i]; in getTotalTime()
65 return sum; in getTotalTime()
69 double sum = 0; in getTotalTimeSq() local
71 sum += (double) mSamples[i] * mSamples[i]; in getTotalTimeSq()
73 return sum; in getTotalTimeSq()
/cts/tests/simplecpu/jni/
DCpuNativeJni.cpp217 float sum[M]; in doMatrixMultiplication() local
219 sum[k] = 0; in doMatrixMultiplication()
226 sum[0] += a * B[k * n + j]; in doMatrixMultiplication()
227 sum[1] += a * B[k * n + j + 1]; in doMatrixMultiplication()
228 sum[2] += a * B[k * n + j + 2]; in doMatrixMultiplication()
229 sum[3] += a * B[k * n + j + 3]; in doMatrixMultiplication()
230 sum[4] += a * B[k * n + j + 4]; in doMatrixMultiplication()
231 sum[5] += a * B[k * n + j + 5]; in doMatrixMultiplication()
232 sum[6] += a * B[k * n + j + 6]; in doMatrixMultiplication()
233 sum[7] += a * B[k * n + j + 7]; in doMatrixMultiplication()
[all …]
/cts/hostsidetests/dumpsys/src/android/dumpsys/cts/
DProcessStatsDumpsysTest.java342 long sum = 0; in getTagValueSum() local
350 sum += assertInteger(parts[i].substring(m.end(0))); in getTagValueSum()
354 return sum; in getTagValueSum()
359 final long sum = getTagValueSum(parts, tagRegex); in assertTagValueLessThan() local
363 + sum, sum <= expectedMax); in assertTagValueLessThan()
368 final long sum = getTagValueSum(parts, tagRegex); in assertTagValueSumAbout() local
372 + sum, sum >= expectedValue); in assertTagValueSumAbout()
376 + sum, sum <= (expectedValue * DURATION_TIME_MAX_FACTOR)); in assertTagValueSumAbout()
/cts/tests/tests/media/libmediandkjni/
Dnative_media_utils.cpp88 int64_t sum = 0; in getBitrateAverage() local
91 sum += mInfos[i].size; in getBitrateAverage()
93 sum *= 8; // kB -> kb in getBitrateAverage()
103 int64_t avg = (sum * 1e6) / duration; in getBitrateAverage()
109 int64_t sum = 0; in getBitratePeak() local
115 sum += mInfos[i].size; in getBitratePeak()
117 sum -= mInfos[i - windowSize].size; in getBitratePeak()
119 maxSum = sum > maxSum ? sum : maxSum; in getBitratePeak()
/cts/tools/cfassembler/src/dxconvext/
DClassFileAssembler.java163 int sum = (int) a32.getValue(); in calcChecksum() local
165 bytes[8] = (byte) sum; in calcChecksum()
166 bytes[9] = (byte) (sum >> 8); in calcChecksum()
167 bytes[10] = (byte) (sum >> 16); in calcChecksum()
168 bytes[11] = (byte) (sum >> 24); in calcChecksum()
/cts/apps/CameraITS/tests/scene1/
Dtest_param_tonemap_mode.py66 "red": (sum([[i/LM1, min(1.0,(1+0.5*n)*i/LM1)]
68 "green": (sum([[i/LM1, min(1.0,(1+1.0*n)*i/LM1)]
70 "blue": (sum([[i/LM1, min(1.0,(1+1.5*n)*i/LM1)]
91 curve = sum([[i/m, i/m] for i in range(size)], [])
Dtest_linearity.py42 sum([[i/LM1, math.pow(i/LM1, 1/2.2)] for i in xrange(L)], []))
44 sum([[i/LM1, math.pow(i/LM1, 2.2)] for i in xrange(L)], []))
Dtest_yuv_plus_jpeg.py61 sum([pow(rgb0[i] - rgb1[i], 2.0) for i in range(3)]) / 3.0)
/cts/apps/CtsVerifier/jni/verifier/
Dcom_android_cts_verifier_camera_StatsImage.cpp55 float sum[4] = {0}; in com_android_cts_verifier_camera_its_computeStatsImage() local
68 sum[ch] += pixelValue; in com_android_cts_verifier_camera_its_computeStatsImage()
74 float m = (float)sum[ch] / count[ch]; in com_android_cts_verifier_camera_its_computeStatsImage()
/cts/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/
DBaseActivity.java29 int sum = Native.add(2, 3); in onCreate() local
30 tv.setText("2 + 3 = " + Integer.toString(sum)); in onCreate()
/cts/tests/sensor/src/android/hardware/cts/helpers/
DSensorCtsHelper.java85 double sum = 0.0; in getMean() local
87 sum += value.doubleValue(); in getMean()
89 return sum / collection.size(); in getMean()
107 double sum = 0.0; in getVariance() local
109 sum += value; in getVariance()
111 return sum / (squaredDiffs.size() - 1); in getVariance()
/cts/apps/CameraITS/tests/scene0/
Dtest_jitter.py50 avg = sum(deltas_ms) / len(deltas_ms)
51 var = sum([d*d for d in deltas_ms]) / len(deltas_ms) - avg * avg
/cts/suite/audio_quality/test_description/
Dprocessing_main.py50 sum = inputData[0] + inputData[1]
51 print "intsum sum is ", sum
53 outputData.append(sum)
/cts/tools/utils/
Dmonsoon.py283 checksum = (data_len + sum(struct.unpack("B" * len(data), data))) % 256
302 checksum = (data_len + sum(struct.unpack("B" * len(body), body))) % 256
400 this_sample = [sum(chan[:need]) / need for chan in chan_buffers]
409 chan_avgs.append(sum(chan_deque) / len(chan_deque))
/cts/tests/sensor/src/android/hardware/cts/
DSensorManagerStaticTest.java614 float sum = 0.f; in assertVectorRoughlyEqual() local
616 sum += (v1[i] - v2[i]) * (v1[i] - v2[i]); in assertVectorRoughlyEqual()
618 assertRoughlyEqual(message, (float)Math.sqrt(sum), 0.f, bound); in assertVectorRoughlyEqual()
732 float sum = 0.f; in vecInner() local
735 sum += u[i]*v[i]; in vecInner()
737 return (float)Math.sqrt(sum); in vecInner()
/cts/tests/tests/renderscript/src/android/renderscript/cts/
DReduceTest.java494 int sum = 0; in sumXor() local
496 sum += (input1[idx] ^ input2[idx]); in sumXor()
497 return sum; in sumXor()
607 long sum = 0; in sillySum() local
609sum += ((((input1[i] + (long)Math.ceil(Math.log(input2[i]))) + input3[3*i + 0]) + input3[3*i + 1])… in sillySum()
610 return sum; in sillySum()
/cts/apps/CtsVerifier/assets/scripts/
Dexecute_power_tests.py553 sub_avg = sum(sub_measurements[0:decimate_by]) / decimate_by
668 avg = sum(measurements) / len(measurements)
671 stddev = math.sqrt(sum(squared) / len(squared))
880 this_sample = sum(collected[:need]) / need
888 sum(history_deque) / len(history_deque))
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DMediaUtils.java794 double sum = 0; in movingAverage() local
796 sum += mData[i]; in movingAverage()
798 avgs[i - n + 1] = sum / n; in movingAverage()
799 sum -= mData[i - n + 1]; in movingAverage()
826 double sum = 0; // sum of elements in the window in movingAverageOverSum() local
848 sum += mData[ei]; in movingAverageOverSum()
857 avgs[ix++] = sum / num; in movingAverageOverSum()
874 sum -= mData[bi]; in movingAverageOverSum()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DMediaUtils.java901 double sum = 0; in movingAverage() local
903 sum += mData[i]; in movingAverage()
905 avgs[i - n + 1] = sum / n; in movingAverage()
906 sum -= mData[i - n + 1]; in movingAverage()
933 double sum = 0; // sum of elements in the window in movingAverageOverSum() local
955 sum += mData[ei]; in movingAverageOverSum()
964 avgs[ix++] = sum / num; in movingAverageOverSum()
981 sum -= mData[bi]; in movingAverageOverSum()
/cts/tests/tests/security/src/android/security/cts/
DEffectBundleTest.java347 int sum = 0; in eqGetParamFreqRangeCommand() local
349 sum += Math.abs(reply[i]); in eqGetParamFreqRangeCommand()
352 assertEquals("reply expected to be all zeros", sum, 0); in eqGetParamFreqRangeCommand()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DRVCVXCheckAnalyzer.java593 double sum = 0.0; in calcSensorPeriodStat() local
598 sum += dt; in calcSensorPeriodStat()
603 ret[0] = sum/srec.size(); in calcSensorPeriodStat()
685 double sum = 0.0; in calcSqrErr() local
707 sum += diff*diff; in calcSqrErr()
709 return sum/ra.size(); in calcSqrErr()

123