Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 48) sorted by relevance

12

/cmsis-nn-3.6.0-3.5.0/Tests/UnitTest/TestCases/Utils/
Dvalidate.h30 for (int i = 0; i < size; ++i) in validate() local
33 if (act[i] != ref[i]) in validate()
36 printf("ERROR at pos %d: Act: %d Ref: %d\r\n", i, act[i], ref[i]); in validate()
55 for (int i = 0; i < size; ++i) in validate_s16() local
58 if (act[i] != ref[i]) in validate_s16()
61 printf("ERROR at pos %d: Act: %d Ref: %d\r\n", i, act[i], ref[i]); in validate_s16()
Dutils.h25 for (int i = 0; i < size; i++) in get_bias_address() local
27 if (bias[i] != 0) in get_bias_address()
39 for (int i = 0; i < size; i++) in get_bias_s64_address() local
41 if (bias[i] != 0) in get_bias_s64_address()
/cmsis-nn-3.6.0-3.5.0/Source/ActivationFunctions/
Darm_relu_q7.c56 uint16_t i = size >> 2; in arm_relu_q7() local
63 while (i) in arm_relu_q7()
75 i--; in arm_relu_q7()
78 i = size & 0x3; in arm_relu_q7()
79 while (i) in arm_relu_q7()
86 i--; in arm_relu_q7()
92 uint16_t i; in arm_relu_q7()
94 for (i = 0; i < size; i++) in arm_relu_q7()
96 if (data[i] < 0) in arm_relu_q7()
97 data[i] = 0; in arm_relu_q7()
Darm_relu6_s8.c52 int32_t i; in arm_relu6_s8() local
54 for (i = 0; i < size; i++) in arm_relu6_s8()
56 int32_t ip = data[i]; in arm_relu6_s8()
59 data[i] = MIN(ip, 6); in arm_relu6_s8()
Darm_relu_q15.c56 uint16_t i = size >> 1; in arm_relu_q15() local
63 while (i) in arm_relu_q15()
74 i--; in arm_relu_q15()
87 uint16_t i; in arm_relu_q15()
89 for (i = 0; i < size; i++) in arm_relu_q15()
91 if (data[i] < 0) in arm_relu_q15()
92 data[i] = 0; in arm_relu_q15()
/cmsis-nn-3.6.0-3.5.0/Tests/UnitTest/TestCases/test_arm_softmax_s8/
Dtest_arm_softmax_s8.c37 for (int i = 0; i < REPEAT_NUM; i++) in softmax_arm_softmax_s8() local
55 for (int i = 0; i < SOFTMAX_DST_SIZE; i++) in softmax_invalid_diff_min_arm_softmax_s8() local
57 softmax_expect_invalid_output[i] = -128; in softmax_invalid_diff_min_arm_softmax_s8()
60 for (int i = 0; i < REPEAT_NUM; i++) in softmax_invalid_diff_min_arm_softmax_s8() local
/cmsis-nn-3.6.0-3.5.0/Tests/UnitTest/TestCases/test_arm_softmax_s8_s16/
Dtest_arm_softmax_s8_s16.c37 for (int i = 0; i < REPEAT_NUM; i++) in softmax_s8_s16_arm_softmax_s8_s16() local
55 for (int i = 0; i < SOFTMAX_S8_S16_DST_SIZE; i++) in softmax_s8_s16_invalid_diff_min_arm_softmax_s8_s16() local
57 softmax_s8_s16_expect_invalid_output[i] = -32768; in softmax_s8_s16_invalid_diff_min_arm_softmax_s8_s16()
60 for (int i = 0; i < REPEAT_NUM; i++) in softmax_s8_s16_invalid_diff_min_arm_softmax_s8_s16() local
/cmsis-nn-3.6.0-3.5.0/Source/NNSupportFunctions/
Darm_nn_lstm_update_output_s8_s16.c63 for (int32_t i = 0; i < size; i++) in arm_nn_lstm_update_output_s8_s16() local
65 cell_state[i] = cell_state[i] >> tanh_input_left_shift; in arm_nn_lstm_update_output_s8_s16()
Darm_nn_mat_mul_core_1x_s8.c66 for (int i = 0; i < out_ch; i++) in arm_nn_mat_mul_core_1x_s8() local
99 const int32_t index = i & 0x3; in arm_nn_mat_mul_core_1x_s8()
119 col_base = col_base_ref + (i + 1) * (row_elements + skipped_row_elements); in arm_nn_mat_mul_core_1x_s8()
122 for (int i = 0; i < (out_ch & 0x3); i++) in arm_nn_mat_mul_core_1x_s8() local
124 int32_t acc_n0 = acc[i]; in arm_nn_mat_mul_core_1x_s8()
127 acc_n0 += bias[i]; in arm_nn_mat_mul_core_1x_s8()
129 acc_n0 = arm_nn_requantize(acc_n0, output_mult[i], output_shift[i]); in arm_nn_mat_mul_core_1x_s8()
Darm_nn_lstm_update_cell_state_s16.c110 for (int i = 0; i < loop_count; i++) in arm_nn_lstm_update_cell_state_s16() local
112 int32_t value = cell_state[i] * forget_gate[i]; in arm_nn_lstm_update_cell_state_s16()
113 int32_t value_1 = input_gate[i] * cell_gate[i]; in arm_nn_lstm_update_cell_state_s16()
118 cell_state[i] = CLAMP(value + value_1, NN_Q15_MAX, NN_Q15_MIN); in arm_nn_lstm_update_cell_state_s16()
Darm_nn_mat_mul_core_4x_s8.c59 for (int i = 0; i < out_ch; i++) in arm_nn_mat_mul_core_4x_s8() local
70 const int8_t *col_base = col_base_ref + i * row_elements; in arm_nn_mat_mul_core_4x_s8()
118 sum_tmp += bias[i]; in arm_nn_mat_mul_core_4x_s8()
122 res = arm_requantize_mve(res, quant_params->multiplier[i], quant_params->shift[i]); in arm_nn_mat_mul_core_4x_s8()
/cmsis-nn-3.6.0-3.5.0/Source/ConcatenationFunctions/
Darm_concatenation_s8_x.c62 uint32_t i; in arm_concatenation_s8_x() local
65 for (i = 0; i < num_iterations; ++i) in arm_concatenation_s8_x()
Darm_concatenation_s8_z.c63 uint32_t i; in arm_concatenation_s8_z() local
65 for (i = 0; i < input_w; ++i) in arm_concatenation_s8_z()
Darm_concatenation_s8_y.c63 uint32_t i; in arm_concatenation_s8_y() local
66 for (i = 0; i < num_iterations; ++i) in arm_concatenation_s8_y()
/cmsis-nn-3.6.0-3.5.0/Source/SVDFunctions/
Darm_svdf_state_s16_s8.c148 for (int i = 0; i < block_count; i++) in arm_svdf_state_s16_s8() local
183 for (int i = 0; i < input_batches; i++) in arm_svdf_state_s16_s8() local
185 int32_t *output_temp = buffer_b + i * feature_batches; in arm_svdf_state_s16_s8()
186 const int32_t *ptr_a = buffer_a + i * feature_batches; in arm_svdf_state_s16_s8()
202 for (int i = 0; i < unit_count; i++) in arm_svdf_state_s16_s8() local
204 int32_t sum = bias_data[i]; in arm_svdf_state_s16_s8()
210 output_data_temp[i] = sum; in arm_svdf_state_s16_s8()
222 for (int i = 0; i < unit_count; i++) in arm_svdf_state_s16_s8() local
230 output_data_temp[i] = sum; in arm_svdf_state_s16_s8()
254 for (int i = 0; i < input_batches * unit_count; i++) in arm_svdf_state_s16_s8() local
[all …]
Darm_svdf_s8.c150 for (int i = 0; i < block_count; i++) in arm_svdf_s8() local
187 for (int i = 0; i < input_batches; i++) in arm_svdf_s8() local
189 int32_t *output_temp = buffer_b + i * feature_batches; in arm_svdf_s8()
190 const int32_t *ptr_a = buffer_a + i * feature_batches; in arm_svdf_s8()
206 for (int i = 0; i < unit_count; i++) in arm_svdf_s8() local
208 int32_t sum = bias_data[i]; in arm_svdf_s8()
214 output_data_temp[i] = sum; in arm_svdf_s8()
226 for (int i = 0; i < unit_count; i++) in arm_svdf_s8() local
234 output_data_temp[i] = sum; in arm_svdf_s8()
258 for (int i = 0; i < input_batches * unit_count; i++) in arm_svdf_s8() local
[all …]
/cmsis-nn-3.6.0-3.5.0/Source/PoolingFunctions/
Darm_avgpool_s16.c45 for (int i = 0; i < length; i++) in scale_q31_to_q15_and_clamp() local
47 int32_t sum = buffer[i] > 0 ? (buffer[i] + half_count) : (buffer[i] - half_count); in scale_q31_to_q15_and_clamp()
52 target[i] = (int16_t)sum; in scale_q31_to_q15_and_clamp()
157 for (int i = 0; i < 4; i++) in arm_avgpool_s16() local
159 sum_1[i] = sum_1[i] / count; in arm_avgpool_s16()
160 sum_2[i] = sum_2[i] / count; in arm_avgpool_s16()
216 for (int i = 0; i < ch_src; i++) in arm_avgpool_s16() local
218 buffer[i] = start[i]; in arm_avgpool_s16()
223 for (int i = 0; i < ch_src; i++) in arm_avgpool_s16() local
225 buffer[i] = QADD(start[i], buffer[i]); in arm_avgpool_s16()
Darm_avgpool_s8.c44 for (int i = 0; i < length; i++) in scale_q31_to_q7_and_clamp() local
46 int32_t sum = buffer[i] > 0 ? (buffer[i] + half_count) : (buffer[i] - half_count); in scale_q31_to_q7_and_clamp()
51 target[i] = (int8_t)sum; in scale_q31_to_q7_and_clamp()
179 for (int i = 0; i < 4; i++) in arm_avgpool_s8() local
181 sum_1[i] = sum_1[i] / count; in arm_avgpool_s8()
182 sum_2[i] = sum_2[i] / count; in arm_avgpool_s8()
183 sum_3[i] = sum_3[i] / count; in arm_avgpool_s8()
184 sum_4[i] = sum_4[i] / count; in arm_avgpool_s8()
276 for (int i = 0; i < ch_src; i++) in arm_avgpool_s8() local
278 buffer[i] = start[i]; in arm_avgpool_s8()
[all …]
/cmsis-nn-3.6.0-3.5.0/Tests/UnitTest/TestCases/test_arm_softmax_s16/
Dtest_arm_softmax_s16.c40 for (int i = 0; i < REPEAT_NUM; i++) in softmax_s16_arm_softmax_s16() local
/cmsis-nn-3.6.0-3.5.0/Tests/UnitTest/Corstone-300/
Dretarget.c275 int i; in _read() local
277 for (i = 0; i < len; i++) in _read()
285 return (len - i); in _read()
291 int i; in _write() local
293 for (i = 0; i < len; i++) in _write()
295 return (i); in _write()
/cmsis-nn-3.6.0-3.5.0/Source/SoftmaxFunctions/
Darm_softmax_s8.c107 for (int i = 0; i < vec_count; i++) in arm_softmax_s8() local
110 const int8x16_t ip = vldrbq_z_s8(&input[i * 16], p); in arm_softmax_s8()
141 for (int i = 0; i < (row_size & 3); i++) in arm_softmax_s8() local
143 const int32_t diff = input[tail_idx + i] - max; in arm_softmax_s8()
189 for (int i = 0; i < (row_size & 3); i++) in arm_softmax_s8() local
191 int32_t diff = input[tail_idx + i] - max; in arm_softmax_s8()
197 output[tail_idx + i] = (int8_t)CLAMP(res, (int32_t)ACT_MAX, (int32_t)ACT_MIN); in arm_softmax_s8()
201 output[tail_idx + i] = ACT_MIN; in arm_softmax_s8()
/cmsis-nn-3.6.0-3.5.0/Source/BasicMathFunctions/
Darm_elementwise_mul_s16_s8.c105 for (int i = 0; i < loop_count; i++) in arm_elementwise_mul_s16_s8() local
108 int32_t mul_res = input_1_vect[i] * input_2_vect[i]; in arm_elementwise_mul_s16_s8()
113 output[i] = (int8_t)mul_res; in arm_elementwise_mul_s16_s8()
/cmsis-nn-3.6.0-3.5.0/Tests/UnitTest/TestCases/test_arm_svdf_s8/
Dtest_arm_svdf_s8.c81 for (int i = 0; i < REPEAT_NUM; i++) in svdf_int8_arm_svdf_s8() local
109 for (int i = sizeof(svdf_int8_state); i < state_data_size; i++) in svdf_int8_arm_svdf_s8() local
111 TEST_ASSERT_EQUAL(state_data[i], initial_data); in svdf_int8_arm_svdf_s8()
/cmsis-nn-3.6.0-3.5.0/Tests/UnitTest/TestCases/test_arm_max_pool_s8/
Dtest_arm_max_pool_s8.c65 for (int i = 0; i < REPEAT_NUM; i++) in maxpooling_arm_max_pool_s8() local
106 for (int i = 0; i < REPEAT_NUM; i++) in maxpooling_1_arm_max_pool_s8() local
147 for (int i = 0; i < REPEAT_NUM; i++) in maxpooling_2_arm_max_pool_s8() local
188 for (int i = 0; i < REPEAT_NUM; i++) in maxpooling_3_arm_max_pool_s8() local
229 for (int i = 0; i < REPEAT_NUM; i++) in maxpooling_4_arm_max_pool_s8() local
270 for (int i = 0; i < REPEAT_NUM; i++) in maxpooling_5_arm_max_pool_s8() local
311 for (int i = 0; i < REPEAT_NUM; i++) in maxpooling_6_arm_max_pool_s8() local
352 for (int i = 0; i < REPEAT_NUM; i++) in maxpooling_7_arm_max_pool_s8() local
/cmsis-nn-3.6.0-3.5.0/Tests/UnitTest/TestCases/test_arm_max_pool_s16/
Dtest_arm_max_pool_s16.c60 for (int i = 0; i < REPEAT_NUM; i++) in maxpool_int16_arm_max_pool_s16() local
101 for (int i = 0; i < REPEAT_NUM; i++) in maxpool_int16_1_arm_max_pool_s16() local
142 for (int i = 0; i < REPEAT_NUM; i++) in maxpool_int16_2_arm_max_pool_s16() local

12