Home
last modified time | relevance | path

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

123

/Zephyr-latest/tests/benchmarks/latency_measure/src/
Dint_to_thread.c56 static void int_to_interrupted_thread(uint32_t num_iterations, uint64_t *sum) in int_to_interrupted_thread() argument
61 *sum = 0ull; in int_to_interrupted_thread()
68 *sum += timing_cycles_get(&start, &finish); in int_to_interrupted_thread()
79 uint64_t sum = 0ull; in start_thread_entry() local
99 sum += timing_cycles_get(&start, &finish); in start_thread_entry()
102 timestamp.cycles = sum; in start_thread_entry()
127 static void int_to_another_thread(uint32_t num_iterations, uint64_t *sum, in int_to_another_thread() argument
131 *sum = 0ull; in int_to_another_thread()
157 *sum = timestamp.cycles; in int_to_another_thread()
168 uint64_t sum; in int_to_thread() local
[all …]
Dthread_switch_yield.c52 uint64_t sum = 0ull; in start_thread_entry() local
80 sum += timing_cycles_get(&start, &finish); in start_thread_entry()
89 timestamp.cycles = sum; in start_thread_entry()
98 uint64_t sum; in thread_switch_yield_common() local
130 sum = timestamp.cycles; in thread_switch_yield_common()
132 sum -= timestamp_overhead_adjustment(start_options, alt_options); in thread_switch_yield_common()
141 PRINT_STATS_AVG(summary, (uint32_t)sum, num_iterations, 0, ""); in thread_switch_yield_common()
Dcondvar.c27 uint64_t sum[2] = {0ull, 0ull}; in start_thread_entry() local
43 sum[0] += timing_cycles_get(&start, &timestamp.sample); in start_thread_entry()
44 sum[1] += timing_cycles_get(&timestamp.sample, &finish); in start_thread_entry()
51 timestamp.cycles = sum[0]; in start_thread_entry()
54 timestamp.cycles = sum[1]; in start_thread_entry()
Devents.c125 uint64_t sum[4] = {0ULL, 0ULL, 0ULL, 0ULL}; in alt_thread_entry() local
139 sum[0] += timing_cycles_get(&start, &mid); in alt_thread_entry()
140 sum[1] += timing_cycles_get(&mid, &finish); in alt_thread_entry()
155 sum[2] += timing_cycles_get(&start, &mid); in alt_thread_entry()
156 sum[3] += timing_cycles_get(&mid, &finish); in alt_thread_entry()
161 timestamp.cycles = sum[0]; in alt_thread_entry()
164 timestamp.cycles = sum[1]; in alt_thread_entry()
167 timestamp.cycles = sum[2]; in alt_thread_entry()
170 timestamp.cycles = sum[3]; in alt_thread_entry()
Dfifo.c173 uint64_t sum[4] = {0ULL, 0ULL, 0ULL, 0ULL}; in alt_thread_entry() local
195 sum[0] += timing_cycles_get(&start, &mid); in alt_thread_entry()
196 sum[1] += timing_cycles_get(&mid, &finish); in alt_thread_entry()
216 sum[2] += timing_cycles_get(&start, &mid); in alt_thread_entry()
217 sum[3] += timing_cycles_get(&mid, &finish); in alt_thread_entry()
221 timestamp.cycles = sum[0]; in alt_thread_entry()
223 timestamp.cycles = sum[1]; in alt_thread_entry()
227 timestamp.cycles = sum[2]; in alt_thread_entry()
229 timestamp.cycles = sum[3]; in alt_thread_entry()
Dlifo.c173 uint64_t sum[4] = {0ULL, 0ULL, 0ULL, 0ULL}; in alt_thread_entry() local
195 sum[0] += timing_cycles_get(&start, &mid); in alt_thread_entry()
196 sum[1] += timing_cycles_get(&mid, &finish); in alt_thread_entry()
216 sum[2] += timing_cycles_get(&start, &mid); in alt_thread_entry()
217 sum[3] += timing_cycles_get(&mid, &finish); in alt_thread_entry()
221 timestamp.cycles = sum[0]; in alt_thread_entry()
223 timestamp.cycles = sum[1]; in alt_thread_entry()
227 timestamp.cycles = sum[2]; in alt_thread_entry()
229 timestamp.cycles = sum[3]; in alt_thread_entry()
Dstack.c119 uint64_t sum[2] = {0ULL, 0ULL}; in alt_thread_entry() local
137 sum[0] += timing_cycles_get(&start, &mid); in alt_thread_entry()
138 sum[1] += timing_cycles_get(&mid, &finish); in alt_thread_entry()
141 timestamp.cycles = sum[0]; in alt_thread_entry()
143 timestamp.cycles = sum[1]; in alt_thread_entry()
/Zephyr-latest/drivers/gnss/
Dgnss_parse.c22 int64_t sum = 0; in gnss_parse_dec_to_nano() local
58 sum += (str[pos] - '0') * increment; in gnss_parse_dec_to_nano()
70 sum = start == 1 ? -sum : sum; in gnss_parse_dec_to_nano()
72 *nano = sum; in gnss_parse_dec_to_nano()
86 sum += (str[pos] - '0') * increment; in gnss_parse_dec_to_nano()
96 sum = start == 1 ? -sum : sum; in gnss_parse_dec_to_nano()
98 *nano = sum; in gnss_parse_dec_to_nano()
/Zephyr-latest/subsys/bluetooth/mesh/
Ddfu.h29 uint8_t sum[2] = {0, 0}; in dfu_metadata_checksum() local
37 sum[0] += byte; in dfu_metadata_checksum()
38 sum[1] += sum[0]; in dfu_metadata_checksum()
43 return (sum[0] << 8U) | sum[1]; in dfu_metadata_checksum()
/Zephyr-latest/subsys/net/ip/
Dutils.c532 uint64_t sum; in calc_chksum() local
542 sum = BSWAP_16(sum_in); in calc_chksum()
544 sum = sum_in; in calc_chksum()
549 sum += offset_based_swap8(data); in calc_chksum()
555 sum = sum + *((uint16_t *)data); in calc_chksum()
569 sum += sum_a + sum_b; in calc_chksum()
573 sum = sum + p[i++]; in calc_chksum()
578 sum = sum + *((uint16_t *)data); in calc_chksum()
582 sum += offset_based_swap8(data); in calc_chksum()
586 while (sum >> 16) { in calc_chksum()
[all …]
/Zephyr-latest/samples/arch/smp/pi/src/
Dmain.c61 int sum = 0, value; in test_thread() local
64 sum = sum * j + NEW_BASE * array[j]; in test_thread()
65 array[j] = sum % (j * 2 - 1); in test_thread()
66 sum /= j * 2 - 1; in test_thread()
69 value = carry + sum / NEW_BASE; in test_thread()
70 carry = sum % NEW_BASE; in test_thread()
/Zephyr-latest/subsys/net/lib/prometheus/
Dsummary.c27 summary->sum += value; in prometheus_summary_observe()
42 if (value == summary->sum && count == summary->count) { in prometheus_summary_observe_set()
54 old_sum = summary->sum; in prometheus_summary_observe_set()
55 summary->sum += (value - old_sum); in prometheus_summary_observe_set()
Dhistogram.c27 histogram->sum += value; in prometheus_histogram_observe()
/Zephyr-latest/tests/net/lib/prometheus/histogram/src/
Dmain.c27 zassert_equal(test_histogram_m.sum, 0, "Histogram value is not 0"); in ZTEST()
32 zassert_equal(test_histogram_m.sum, 1.0, "Histogram value is not 1"); in ZTEST()
37 zassert_equal(test_histogram_m.sum, 3.0, "Histogram value is not 2"); in ZTEST()
/Zephyr-latest/tests/net/lib/prometheus/summary/src/
Dmain.c27 zassert_equal(test_summary_m.sum, 0, "Histogram value is not 0"); in ZTEST()
32 zassert_equal(test_summary_m.sum, 1, "Histogram value is not 1"); in ZTEST()
37 zassert_equal(test_summary_m.sum, 3, "Histogram value is not 3"); in ZTEST()
/Zephyr-latest/subsys/shell/modules/
Ddevmem_service.c35 static int sum; variable
190 shell_print(sh, "Number of bytes read: %d", sum); in bypass_cb()
194 while (sum > 4) { in bypass_cb()
197 sum = sum - 4; in bypass_cb()
199 if (sum % 4 == 0) { in bypass_cb()
201 } else if (sum % 4 == 2) { in bypass_cb()
203 } else if (sum % 4 == 3) { in bypass_cb()
221 sum++; in bypass_cb()
232 sum = 0; in cmd_load()
/Zephyr-latest/tests/arch/x86/info/src/
Dtimer.c56 uint64_t sum = 0; in timer() local
65 sum += end - start; in timer()
71 printk("\taverage = %uHz\n", (unsigned) (sum / NR_SAMPLES)); in timer()
/Zephyr-latest/samples/boards/nxp/adsp/number_crunching/
DREADME.rst77 [Library Test] == Vector power sum test ==
79 [Library Test] Vector power sum takes 6659 cycles
80 [Library Test] == Vector power sum test end with 1 ==
82 [Library Test] == Vector power sum test ==
84 [Library Test] Vector power sum takes 3681 cycles
85 [Library Test] == Vector power sum test end ==
115 [Library Test] == Vector power sum test ==
117 [Library Test] Vector power sum takes 2432 cycles
118 [Library Test] == Vector power sum test end with 1 ==
120 [Library Test] == Vector power sum test ==
[all …]
/Zephyr-latest/include/zephyr/net/prometheus/
Dhistogram.h51 double sum; member
89 .sum = 0.0, \
Dsummary.h53 double sum; member
93 .sum = 0.0, \
/Zephyr-latest/samples/drivers/video/capture/src/
Dcheck_test_pattern.h90 static inline void sum_lab(CIELAB *sum, const CIELAB lab) in sum_lab() argument
92 sum->L += lab.L; in sum_lab()
93 sum->a += lab.a; in sum_lab()
94 sum->b += lab.b; in sum_lab()
/Zephyr-latest/drivers/fuel_gauge/bq27z746/
Demul_bq27z746.c85 uint8_t sum = 0; /* Intentionally 8 bit wide and overflowing */ in emul_bq27z746_read_altmac() local
88 sum += buf[i]; in emul_bq27z746_read_altmac()
90 buf[34] = 0xFF - sum; in emul_bq27z746_read_altmac()
/Zephyr-latest/drivers/counter/
Dcounter_nrfx_rtc.c146 uint32_t sum = val1 + val2; in ticks_add() local
150 return sum & NRF_RTC_COUNTER_MAX; in ticks_add()
153 sum = sum & top; in ticks_add()
155 sum = sum > top ? sum - (top + 1) : sum; in ticks_add()
158 return skip_zero_on_custom_top(sum, top); in ticks_add()
/Zephyr-latest/tests/net/utils/src/
Dmain.c866 static uint16_t calc_chksum_ref(uint16_t sum, const uint8_t *data, size_t len) in calc_chksum_ref() argument
875 sum += tmp; in calc_chksum_ref()
876 if (sum < tmp) { in calc_chksum_ref()
877 sum++; in calc_chksum_ref()
885 sum += tmp; in calc_chksum_ref()
886 if (sum < tmp) { in calc_chksum_ref()
887 sum++; in calc_chksum_ref()
891 return sum; in calc_chksum_ref()
/Zephyr-latest/subsys/net/l2/virtual/ipip/
Dipip.c384 uint16_t sum; in interface_recv() local
413 sum = calc_chksum(0, access.data, access.size); in interface_recv()
414 sum = (sum == 0U) ? 0xffff : htons(sum); in interface_recv()
416 hdr->chksum = ~sum; in interface_recv()

123