Home
last modified time | relevance | path

Searched full:sum (Results 1 – 25 of 86) sorted by relevance

1234

/Zephyr-latest/drivers/gnss/
Dgnss_parse.c22 int64_t sum = 0; in gnss_parse_dec_to_nano() local
49 /* Add whole value to sum */ in gnss_parse_dec_to_nano()
57 /* Add value to sum */ in gnss_parse_dec_to_nano()
58 sum += (str[pos] - '0') * increment; in gnss_parse_dec_to_nano()
69 /* Set sign of sum */ 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()
76 /* Convert decimal part to nano fractions and add it to sum */ in gnss_parse_dec_to_nano()
86 sum += (str[pos] - '0') * increment; in gnss_parse_dec_to_nano()
95 /* Set sign of sum */ in gnss_parse_dec_to_nano()
[all …]
/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
78 /* 6. Track the sum of elapsed times */ in start_thread_entry()
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
128 /* Get the sum total of measured cycles */ in thread_switch_yield_common()
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/samples/boards/nxp/adsp/number_crunching/
DREADME.rst72 [Library Test] == Vector Sum test ==
74 [Library Test] Vector Sum takes 6886 cycles
75 [Library Test] == Vector Sum test end with 1 ==
77 [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 ==
110 [Library Test] == Vector Sum test ==
[all …]
/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/lib/prometheus/
Dsummary.c26 /* update sum */ in prometheus_summary_observe()
27 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.c26 /* update sum */ in prometheus_histogram_observe()
27 histogram->sum += value; in prometheus_histogram_observe()
/Zephyr-latest/subsys/net/ip/
Dutils.c527 * In those cases the variable that stores the accumulative sum has to be bigger too.
528 * Once the sum is computed a final step folds the sum to a 16-bit word (adding carry if any).
532 uint64_t sum; in calc_chksum() local
538 /* Sum in is in host endianness, working order endianness is both dependent on endianness in calc_chksum()
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()
[all …]
/Zephyr-latest/samples/boards/nxp/adsp/number_crunching/src/
Dmath_ops.c34 printk("[Library Test] == Vector Sum test ==\r\n"); in test_vec_sum_int16_op()
44 printk("[Library Test] Vector Sum takes %d cycles\r\n", stop - start); in test_vec_sum_int16_op()
45 printk("[Library Test] == Vector Sum test end with %d ==\r\n\r\n", ret); in test_vec_sum_int16_op()
53 printk("[Library Test] == Vector power sum test ==\r\n"); in test_power_int16_op()
67 printk("[Library Test] Vector power sum takes %d cycles\r\n", stop - start); in test_power_int16_op()
68 printk("[Library Test] == Vector power sum test end with %d ==\r\n\r\n", ret); in test_power_int16_op()
75 printk("[Library Test] == Vector power sum test ==\r\n"); in test_power_int32_op()
82 printk("[Library Test] Vector power sum takes %d cycles\r\n", stop - start); in test_power_int32_op()
83 printk("[Library Test] == Vector power sum test end ==\r\n\r\n"); in test_power_int32_op()
/Zephyr-latest/samples/boards/nxp/adsp/number_crunching/include/
Dmath_ops.h9 /* test vector sum on int16_t elements */
12 * @brief Vector Sum - makes pair wise saturated summation of vectors
24 /* test sum of the squares of the int16_t vector elements */
27 * @brief Power of a Vector - makes sum of the squares of the elements of
33 * @param[out] *output - sum of the squares value
49 /* test sum of the squares of the int32_t vector elements */
52 * @brief Power of a Vector - makes sum of the squares of the elements of
58 * @param[out] *output - sum of the squares value
/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/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/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/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/include/zephyr/net/prometheus/
Dhistogram.h50 /** Sum of all observed values in the histogram */
51 double sum; member
89 .sum = 0.0, \
Dsummary.h52 /** Sum of all observed values in the summary metric */
53 double sum; member
93 .sum = 0.0, \
/Zephyr-latest/boards/nordic/thingy53/
Dboard.c12 * respectively 2ms and 1ms power on delay. In order to avoid delays sum, common delay is
37 * sensors require, 2ms and 1ms power on delay respectively. In order not to sum in setup()
/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/tests/benchmarks/thread_metric/
DKconfig28 on each context switch. The sum total of the counters is reported
40 takes that semaphore. The sum total of the counters is reported

1234