Home
last modified time | relevance | path

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

12

/system/core/libnetutils/
Dpacket.c65 uint32_t sum = startsum; in checksum() local
69 sum += *up++; in checksum()
73 sum += (uint16_t) *(uint8_t *)up; in checksum()
75 while ((upper16 = (sum >> 16)) != 0) { in checksum()
76 sum = (sum & 0xffff) + upper16; in checksum()
78 return sum; in checksum()
81 static uint32_t finish_sum(uint32_t sum) in finish_sum() argument
83 return ~sum & 0xffff; in finish_sum()
163 uint32_t sum; in receive_packet() local
207 sum = finish_sum(checksum(&packet.ip, sizeof(packet.ip), 0)); in receive_packet()
[all …]
/system/bt/gd/packet/parser/test/
Dsimple_sum.h29 sum = 0; in Initialize()
33 sum += byte; in AddByte()
37 return sum; in GetChecksum()
41 uint16_t sum;
/system/extras/simpleperf/
Dcmd_stat_impl.h224 CounterSum& sum = sum_map[key]; in AddCountersForOneEventType() local
227 sum = sum + add; in AddCountersForOneEventType()
233 const CounterSum& sum = pair.second; in AddCountersForOneEventType() local
234 AddSummary(info, tid, cpu, sum); in AddCountersForOneEventType()
248 void AddSummary(const CountersInfo& info, pid_t tid, int cpu, const CounterSum& sum) { in AddSummary() argument
250 if (sum.time_running < sum.time_enabled && sum.time_running != 0) { in AddSummary()
251 scale = static_cast<double>(sum.time_enabled) / sum.time_running; in AddSummary()
253 if ((report_per_thread_ || report_per_core_) && sum.time_running == 0) { in AddSummary()
264 sum.value, sum.time_running, scale, false, csv_); in AddSummary()
Drecord_lib_interface.cpp183 Counter& sum = (*counters)[i]; in ReadRawCounters() local
184 sum.event = name; in ReadRawCounters()
185 sum.value = 0; in ReadRawCounters()
186 sum.time_enabled_in_ns = 0; in ReadRawCounters()
187 sum.time_running_in_ns = 0; in ReadRawCounters()
189 sum.value += c.counter.value; in ReadRawCounters()
190 sum.time_enabled_in_ns += c.counter.time_enabled; in ReadRawCounters()
191 sum.time_running_in_ns += c.counter.time_running; in ReadRawCounters()
/system/extras/tests/ext4/
Drand_emmc_perf.c54 struct timeval sum = { 0, 0 }; in print_stats() local
80 timeradd(&sum, &t, &sum); in print_stats()
88 total_usecs = (sum.tv_sec * 1000000LL) + sum.tv_usec; in print_stats()
/system/core/libutils/
DVector_fuzz.cpp67 size_t sum = 0; in runVectorFuzz() local
69 sum += it; in runVectorFuzz()
72 sum += it; in runVectorFuzz()
/system/bt/osi/test/
Dlist_test.cc150 int* sum = (int*)context; in list_callback_sum() local
152 *sum += *value; in list_callback_sum()
171 int sum = 0; in TEST_F() local
172 list_node_t* rc = list_foreach(list, list_callback_sum, &sum); in TEST_F()
173 EXPECT_EQ(sum, 15); in TEST_F()
/system/memory/libmemtrack/
Dmemtrack.cpp121 ssize_t sum = 0; in memtrack_proc_sum() local
128 sum += records[j].sizeInBytes; in memtrack_proc_sum()
133 return sum; in memtrack_proc_sum()
/system/media/audio_utils/include/audio_utils/
DStatistics.h728 constexpr auto sum(T begin, T end) {
729 S sum{};
731 sum += D(*it);
733 return sum;
739 S sum{};
742 sum += diff * diff;
744 return sum;
759 constexpr D sum(const T (&a)[N]) {
760 return sum<D, S>(&a[0], &a[N]);
Dfifo.h80 uint32_t sum(uint32_t index, uint32_t increment) const;
/system/libhidl/
Dtest_main.cpp285 int32_t sum = 0; // range based for loop interoperability in TEST_F() local
287 sum += i; in TEST_F()
289 EXPECT_EQ(sum, 5+6+7); in TEST_F()
295 sum = 0; in TEST_F()
297 sum += i; in TEST_F()
299 EXPECT_EQ(sum, 15+16+17); in TEST_F()
343 int sum = 0; in TEST_F() local
346 sum += hv[i]; in TEST_F()
348 EXPECT_EQ(sum, 1 + 2 + 3); in TEST_F()
/system/update_engine/scripts/
Dpayload_info.py136 num_blocks = sum([ext.num_blocks for ext in extents])
173 read_blocks += sum([ext.num_blocks for ext in curr_op.src_extents])
174 written_blocks += sum([ext.num_blocks for ext in curr_op.dst_extents])
/system/media/audio_utils/tests/
Dstatistics_tests.cpp63 , mMean{android::audio_utils::sum(a) / mN}
144 double rssum = android::audio_utils::sum<double, double>(simple); in TEST()
147 android::audio_utils::sum<double, android::audio_utils::KahanSum<double>>(simple); in TEST()
150 android::audio_utils::sum<double, android::audio_utils::NeumaierSum<double>>(simple); in TEST()
185 rssum = android::audio_utils::sum<double, double>(tricky); in TEST()
187 kssum = android::audio_utils::sum<double, android::audio_utils::KahanSum<double>>(tricky); in TEST()
189 nmsum = android::audio_utils::sum<double, android::audio_utils::NeumaierSum<double>>(tricky); in TEST()
/system/media/audio_utils/
Dminifloat.c32 #error EXPONENT_BITS and MANTISSA_BITS must sum to 16
Dsample.c37 #error SIGN_BITS, EXPONENT_BITS and MANTISSA_BITS must sum to 16
Dfifo.cpp51 uint32_t audio_utils_fifo_base::sum(uint32_t index, uint32_t increment) const in sum() function in audio_utils_fifo_base
317 mLocalRear = mFifo.sum(mLocalRear, count); in release()
348 mLocalRear = mFifo.sum(mLocalRear, count); in release()
475 mLocalFront = mFifo.sum(mLocalFront, count); in release()
506 mLocalFront = mFifo.sum(mLocalFront, count); in release()
Dprimitives.c599 int32_t sum; in accumulate_u8() local
602 sum = *dst + *src++ - 0x80; in accumulate_u8()
604 *dst++ = (sum & 0x100) ? (~sum >> 9) : sum; in accumulate_u8()
/system/update_engine/common/
Dutils.h229 uint64_t sum = 0; in BlocksInExtents() local
231 sum += ext.num_blocks(); in BlocksInExtents()
233 return sum; in BlocksInExtents()
/system/extras/tests/workloads/
Dsystemapps.sh259 sum=$3
260 ((ave=sum/iterations))
/system/update_engine/scripts/update_payload/
Dhistogram.py58 self.total = sum([count for key, count in self.data])
/system/extras/boottime_tools/bootanalyze/
Dbootanalyze.py179 item[0], sum(item[1])/num_runs, stddev(item[1]),\
187 item[0], sum(item[1])/num_runs, stddev(item[1]),\
197 item[0], sum(item[1])/num_runs, stddev(item[1]),\
212 average_with_stddev.append((item[0], sum(item[1])/len(item[1]), stddev(item[1]),\
224 average = sum(item[1])/len(item[1])
815 avg = sum(data) / items_count
816 sq_diffs_sum = sum([(v - avg) ** 2 for v in data])
/system/core/storaged/tests/
Dstoraged_test.cpp125 double sum = 0.0; in mean() local
127 sum += i; in mean()
129 return sum / nums.size(); in mean()
133 double sum = 0.0; in standard_deviation() local
136 sum += ((double)i - avg) * ((double)i - avg); in standard_deviation()
138 return sqrt(sum / nums.size()); in standard_deviation()
/system/core/init/
Dperfboot.py338 return float(sum(data)) / len(data)
344 return math.sqrt(sum((x - m) ** 2 for x in data) / len(data))
/system/bt/gd/cert/
Dbehavior.py96 invoked_times = sum((matcher(i) for i in self._invoked_obj))
/system/bt/gd/l2cap/classic/cert/
Dl2cap_performance_test.py180 mean = sum(duration, timedelta()) / len(duration)

12