Home
last modified time | relevance | path

Searched refs:result (Results 1 – 25 of 47) sorted by relevance

12

/cmsis-nn-latest/Source/ActivationFunctions/
Darm_nn_activation_s16.c82 uint32_t result; in arm_nn_activation_s16() local
86 result = max_saturation; in arm_nn_activation_s16()
101 result = (ua << abs_input_shift) + ut * (ub - ua); in arm_nn_activation_s16()
105 result = (input_data >= 0) ? (result + (1 << 9)) : ((1 << 25) - result + (1 << 9) - 1); in arm_nn_activation_s16()
106 result >>= 10; in arm_nn_activation_s16()
110result = (input_data >= 0) ? (result - (1 << 23)) + (1 << 7) : ((-result + (1 << 23)) + (1 << 7) -… in arm_nn_activation_s16()
111 result >>= 8; in arm_nn_activation_s16()
113 *output = (int16_t)result; in arm_nn_activation_s16()
/cmsis-nn-latest/Include/Internal/
Darm_nn_compiler.h234 uint32_t result; in SXTAB16() local
236 __ASM("sxtab16 %0, %1, %2" : "=r"(result) : "r"(op1), "r"(op2)); in SXTAB16()
237 return (result); in SXTAB16()
242 uint32_t result; in SXTB16() local
244 __ASM("sxtb16 %0, %1" : "=r"(result) : "r"(op1)); in SXTB16()
245 return (result); in SXTB16()
251 uint32_t result; in SMLAD() local
253 __ASM volatile("smlad %0, %1, %2, %3" : "=r"(result) : "r"(op1), "r"(op2), "r"(op3)); in SMLAD()
254 return (result); in SMLAD()
269 uint32_t result; in SXTB16_RORn() local
[all …]
/cmsis-nn-latest/Source/ConvolutionFunctions/
Darm_transpose_conv_s8.c184 int32x4_t result = vldrwq_z_s32(&img_data[output_ch_idx], p); in arm_transpose_conv_s8() local
185 result = arm_requantize_mve_32x4(result, in arm_transpose_conv_s8()
188 result = vaddq_n_s32(result, out_offset); in arm_transpose_conv_s8()
189 result = vmaxq_s32(result, vdupq_n_s32(activation_min)); in arm_transpose_conv_s8()
190 result = vminq_s32(result, vdupq_n_s32(activation_max)); in arm_transpose_conv_s8()
191 vstrbq_p_s32(ip_out_data, result, p); in arm_transpose_conv_s8()
200 int32_t result = in arm_transpose_conv_s8()
202 result += out_offset; in arm_transpose_conv_s8()
203 result = MAX(result, activation_min); in arm_transpose_conv_s8()
204 result = MIN(result, activation_max); in arm_transpose_conv_s8()
[all …]
Darm_depthwise_conv_fast_s16.c227 int32_t result; in arm_depthwise_conv_fast_s16() local
372 result = arm_nn_requantize_s64(acc_1, output_mult_1, *output_shift++); in arm_depthwise_conv_fast_s16()
373 result = MAX(result, output_activation_min); in arm_depthwise_conv_fast_s16()
374 result = MIN(result, output_activation_max); in arm_depthwise_conv_fast_s16()
375 *output++ = (int16_t)result; in arm_depthwise_conv_fast_s16()
377 result = arm_nn_requantize_s64(acc_2, output_mult_2, *output_shift++); in arm_depthwise_conv_fast_s16()
378 result = MAX(result, output_activation_min); in arm_depthwise_conv_fast_s16()
379 result = MIN(result, output_activation_max); in arm_depthwise_conv_fast_s16()
380 *output++ = (int16_t)result; in arm_depthwise_conv_fast_s16()
382 result = arm_nn_requantize_s64(acc_3, output_mult_3, *output_shift++); in arm_depthwise_conv_fast_s16()
[all …]
Darm_convolve_1x1_s4.c86 arm_cmsis_nn_status result = arm_nn_mat_mult_nt_t_s4(input_data, in arm_convolve_1x1_s4() local
100 if (result != ARM_CMSIS_NN_SUCCESS) in arm_convolve_1x1_s4()
102 return result; in arm_convolve_1x1_s4()
Darm_convolve_1x1_s8.c86 arm_cmsis_nn_status result = arm_nn_mat_mult_nt_t_s8(input_data, in arm_convolve_1x1_s8() local
101 if (result != ARM_CMSIS_NN_SUCCESS) in arm_convolve_1x1_s8()
103 return result; in arm_convolve_1x1_s8()
/cmsis-nn-latest/Source/SoftmaxFunctions/
Darm_softmax_s16.c81 const int16_t result = (base + delta); in arm_softmax_s16() local
82 cached_exp_results[col] = result; in arm_softmax_s16()
108 int32_t result = (cached_exp_results[col] * one_by_one_result) >> right_shift; in arm_softmax_s16() local
109 result = (result + 1) >> 1; // Last shift position and insert round in arm_softmax_s16()
110 output[col] = (int16_t)result; in arm_softmax_s16()
Darm_softmax_s8.c50 int32x4_t result = vdupq_n_s32(1895147668) + MUL_SAT_MVE(vdupq_n_s32(1895147668), op_2); in arm_exp_on_negative_values_mve_32x4() local
56result = SELECT_USING_MASK(mask, MUL_SAT_MVE(result, vdupq_n_s32(x)), result); … in arm_exp_on_negative_values_mve_32x4()
72 result = SELECT_USING_MASK(mask, vdupq_n_s32(NN_Q31_MAX), result); in arm_exp_on_negative_values_mve_32x4()
73 return result; in arm_exp_on_negative_values_mve_32x4()
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_elementwise_mul_s16/
Dtest_arm_elementwise_mul_s16.c44 arm_cmsis_nn_status result = arm_elementwise_mul_s16(input_data1, in mul_s16_arm_elementwise_mul_s16() local
56 TEST_ASSERT_EQUAL(expected, result); in mul_s16_arm_elementwise_mul_s16()
78 arm_cmsis_nn_status result = arm_elementwise_mul_s16(input_data1, in mul_s16_spill_arm_elementwise_mul_s16() local
90 TEST_ASSERT_EQUAL(expected, result); in mul_s16_spill_arm_elementwise_mul_s16()
/cmsis-nn-latest/Source/NNSupportFunctions/
Darm_nn_vec_mat_mult_t_s16.c167 int32_t result = 0; in arm_nn_vec_mat_mult_t_s16() local
184 result = vmladavaq_p_s16(result, lhs_input, rhs_input, pred); in arm_nn_vec_mat_mult_t_s16()
190 int64_t result_64 = result; in arm_nn_vec_mat_mult_t_s16()
333 int64_t result = 0; in arm_nn_vec_mat_mult_t_s16()
340 result += lhs_value * rhs_value0; in arm_nn_vec_mat_mult_t_s16()
348 result += *bias++; in arm_nn_vec_mat_mult_t_s16()
351 result = arm_nn_requantize_s64(result, dst_multiplier, dst_shift); in arm_nn_vec_mat_mult_t_s16()
354 result = ((result) > (activation_min) ? (result) : (activation_min)); in arm_nn_vec_mat_mult_t_s16()
355 result = ((result) < (activation_max) ? (result) : (activation_max)); in arm_nn_vec_mat_mult_t_s16()
357 *dst++ = (int16_t)result; in arm_nn_vec_mat_mult_t_s16()
Darm_nn_vec_mat_mul_result_acc_s16.c172 int32_t result = *effective_bias_ptr++; in arm_nn_vec_mat_mul_result_acc_s16() local
187 result = vmladavaq_p_s16(result, lhs_input, rhs_input, pred); in arm_nn_vec_mat_mul_result_acc_s16()
193 int64_t result_64 = result; in arm_nn_vec_mat_mul_result_acc_s16()
330 int64_t result = *effective_bias_ptr++; in arm_nn_vec_mat_mul_result_acc_s16() local
337 result += lhs_value * rhs_value0; in arm_nn_vec_mat_mul_result_acc_s16()
343 result = arm_nn_requantize_s64(result, reduced_multiplier, dst_shift); in arm_nn_vec_mat_mul_result_acc_s16()
344 result += (int64_t)*dst; in arm_nn_vec_mat_mul_result_acc_s16()
347 result = ((result) > (NN_Q15_MIN) ? (result) : (NN_Q15_MIN)); in arm_nn_vec_mat_mul_result_acc_s16()
348 result = ((result) < (NN_Q15_MAX) ? (result) : (NN_Q15_MAX)); in arm_nn_vec_mat_mul_result_acc_s16()
350 *dst++ = (int16_t)result; in arm_nn_vec_mat_mul_result_acc_s16()
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_depthwise_conv_s4_opt/
Dtest_arm_depthwise_conv_s4_opt.c79 arm_cmsis_nn_status result = arm_depthwise_conv_s4_opt(&ctx, in depthwise_int4_1_arm_depthwise_conv_s4_opt() local
97 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_1_arm_depthwise_conv_s4_opt()
101 result = arm_depthwise_conv_wrapper_s4(&ctx, in depthwise_int4_1_arm_depthwise_conv_s4_opt()
118 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_1_arm_depthwise_conv_s4_opt()
124 result = arm_depthwise_conv_s4(&ctx, in depthwise_int4_1_arm_depthwise_conv_s4_opt()
142 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_1_arm_depthwise_conv_s4_opt()
196 arm_cmsis_nn_status result = arm_depthwise_conv_s4_opt(&ctx, in depthwise_int4_2_arm_depthwise_conv_s4_opt() local
213 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_2_arm_depthwise_conv_s4_opt()
217 result = arm_depthwise_conv_wrapper_s4(&ctx, in depthwise_int4_2_arm_depthwise_conv_s4_opt()
234 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_2_arm_depthwise_conv_s4_opt()
[all …]
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_elementwise_mul_s8/
Dtest_arm_elementwise_mul_s8.c43 arm_cmsis_nn_status result = arm_elementwise_mul_s8(input_data1, in mul_arm_elementwise_mul_s8() local
55 TEST_ASSERT_EQUAL(expected, result); in mul_arm_elementwise_mul_s8()
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_convolve_s16/
Dtest_arm_convolve_s16.c85 arm_cmsis_nn_status result; in int16xint8_arm_convolve_s16() local
86 result = arm_convolve_s16(&ctx, in int16xint8_arm_convolve_s16()
103 TEST_ASSERT_EQUAL(ARM_CMSIS_NN_SUCCESS, result); in int16xint8_arm_convolve_s16()
110 result = arm_convolve_wrapper_s16(&ctx, in int16xint8_arm_convolve_s16()
126 TEST_ASSERT_EQUAL(ARM_CMSIS_NN_SUCCESS, result); in int16xint8_arm_convolve_s16()
176 arm_cmsis_nn_status result = arm_convolve_s16(&ctx, in requantize_s64_arm_convolve_s16() local
192 TEST_ASSERT_EQUAL(ARM_CMSIS_NN_SUCCESS, result); in requantize_s64_arm_convolve_s16()
199 result = arm_convolve_wrapper_s16(&ctx, in requantize_s64_arm_convolve_s16()
216 TEST_ASSERT_EQUAL(ARM_CMSIS_NN_SUCCESS, result); in requantize_s64_arm_convolve_s16()
266 arm_cmsis_nn_status result = arm_convolve_s16(&ctx, in int16xint8_dilation_1_arm_convolve_s16() local
[all …]
/cmsis-nn-latest/Include/
Darm_nnsupportfunctions.h1294 int32_t result = 0; in arm_nn_doubling_high_mult() local
1307 result = (int32_t)(mult / (1ll << 31)); in arm_nn_doubling_high_mult()
1311 result = NN_Q31_MAX; in arm_nn_doubling_high_mult()
1313 return result; in arm_nn_doubling_high_mult()
1332 int32_t result = 0; in arm_nn_doubling_high_mult_no_sat() local
1344 result = (int32_t)(mult.long_long >> 31); in arm_nn_doubling_high_mult_no_sat()
1346 return result; in arm_nn_doubling_high_mult_no_sat()
1359 int32_t result = 0; in arm_nn_divide_by_power_of_two() local
1364 result = dividend >> exponent; in arm_nn_divide_by_power_of_two()
1368 if (result < 0) in arm_nn_divide_by_power_of_two()
[all …]
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_depthwise_conv_s4/
Dtest_arm_depthwise_conv_s4.c80 arm_cmsis_nn_status result = arm_depthwise_conv_s4(&ctx, in depthwise_int4_generic_arm_depthwise_conv_s4() local
98 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_generic_arm_depthwise_conv_s4()
103 result = arm_depthwise_conv_wrapper_s4(&ctx, in depthwise_int4_generic_arm_depthwise_conv_s4()
120 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_generic_arm_depthwise_conv_s4()
173 arm_cmsis_nn_status result = arm_depthwise_conv_s4(&ctx, in depthwise_int4_generic_2_arm_depthwise_conv_s4() local
191 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_generic_2_arm_depthwise_conv_s4()
196 result = arm_depthwise_conv_wrapper_s4(&ctx, in depthwise_int4_generic_2_arm_depthwise_conv_s4()
213 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_generic_2_arm_depthwise_conv_s4()
266 arm_cmsis_nn_status result = arm_depthwise_conv_s4(&ctx, in depthwise_int4_generic_3_arm_depthwise_conv_s4() local
284 TEST_ASSERT_EQUAL(expected, result); in depthwise_int4_generic_3_arm_depthwise_conv_s4()
[all …]
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_elementwise_add_s16/
Dtest_arm_elementwise_add_s16.c50 arm_cmsis_nn_status result = arm_elementwise_add_s16(input_data1, in add_s16_arm_elementwise_add_s16() local
67 TEST_ASSERT_EQUAL(expected, result); in add_s16_arm_elementwise_add_s16()
95 arm_cmsis_nn_status result = arm_elementwise_add_s16(input_data1, in add_s16_spill_arm_elementwise_add_s16() local
112 TEST_ASSERT_EQUAL(expected, result); in add_s16_spill_arm_elementwise_add_s16()
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_max_pool_s8/
Dtest_arm_max_pool_s8.c67 arm_cmsis_nn_status result = in maxpooling_arm_max_pool_s8() local
70 TEST_ASSERT_EQUAL(expected, result); in maxpooling_arm_max_pool_s8()
108 arm_cmsis_nn_status result = in maxpooling_1_arm_max_pool_s8() local
111 TEST_ASSERT_EQUAL(expected, result); in maxpooling_1_arm_max_pool_s8()
149 arm_cmsis_nn_status result = in maxpooling_2_arm_max_pool_s8() local
152 TEST_ASSERT_EQUAL(expected, result); in maxpooling_2_arm_max_pool_s8()
190 arm_cmsis_nn_status result = in maxpooling_3_arm_max_pool_s8() local
193 TEST_ASSERT_EQUAL(expected, result); in maxpooling_3_arm_max_pool_s8()
231 arm_cmsis_nn_status result = in maxpooling_4_arm_max_pool_s8() local
234 TEST_ASSERT_EQUAL(expected, result); in maxpooling_4_arm_max_pool_s8()
[all …]
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_max_pool_s16/
Dtest_arm_max_pool_s16.c62 arm_cmsis_nn_status result = in maxpool_int16_arm_max_pool_s16() local
65 TEST_ASSERT_EQUAL(expected, result); in maxpool_int16_arm_max_pool_s16()
103 arm_cmsis_nn_status result = in maxpool_int16_1_arm_max_pool_s16() local
106 TEST_ASSERT_EQUAL(expected, result); in maxpool_int16_1_arm_max_pool_s16()
144 arm_cmsis_nn_status result = in maxpool_int16_2_arm_max_pool_s16() local
147 TEST_ASSERT_EQUAL(expected, result); in maxpool_int16_2_arm_max_pool_s16()
183 arm_cmsis_nn_status result = in maxpool_int16_param_fail_arm_max_pool_s16() local
186 TEST_ASSERT_EQUAL(expected, result); in maxpool_int16_param_fail_arm_max_pool_s16()
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_convolve_1_x_n_s8/
Dtest_arm_convolve_1_x_n_s8.c83 arm_cmsis_nn_status result = arm_convolve_1_x_n_s8(&ctx, in conv_1_x_n_1_arm_convolve_s8() local
100 TEST_ASSERT_EQUAL(expected, result); in conv_1_x_n_1_arm_convolve_s8()
107 result = arm_convolve_s8(&ctx, in conv_1_x_n_1_arm_convolve_s8()
123 TEST_ASSERT_EQUAL(ARM_CMSIS_NN_SUCCESS, result); in conv_1_x_n_1_arm_convolve_s8()
175 arm_cmsis_nn_status result = arm_convolve_1_x_n_s8(&ctx, in conv_1_x_n_2_arm_convolve_s8() local
192 TEST_ASSERT_EQUAL(expected, result); in conv_1_x_n_2_arm_convolve_s8()
198 result = arm_convolve_wrapper_s8(&ctx, in conv_1_x_n_2_arm_convolve_s8()
214 TEST_ASSERT_EQUAL(ARM_CMSIS_NN_SUCCESS, result); in conv_1_x_n_2_arm_convolve_s8()
265 arm_cmsis_nn_status result = arm_convolve_1_x_n_s8(&ctx, in conv_1_x_n_3_arm_convolve_s8() local
282 TEST_ASSERT_EQUAL(ARM_CMSIS_NN_SUCCESS, result); in conv_1_x_n_3_arm_convolve_s8()
[all …]
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_convolve_s8/
Dtest_arm_convolve_s8.c87 arm_cmsis_nn_status result = arm_convolve_s8(&ctx, in basic_arm_convolve_s8() local
105 TEST_ASSERT_EQUAL(expected, result); in basic_arm_convolve_s8()
113 result = arm_convolve_wrapper_s8(&ctx, in basic_arm_convolve_s8()
130 TEST_ASSERT_EQUAL(expected, result); in basic_arm_convolve_s8()
182 arm_cmsis_nn_status result = arm_convolve_s8(&ctx, in stride2pad1_arm_convolve_s8() local
199 TEST_ASSERT_EQUAL(expected, result); in stride2pad1_arm_convolve_s8()
207 result = arm_convolve_wrapper_s8(&ctx, in stride2pad1_arm_convolve_s8()
224 TEST_ASSERT_EQUAL(expected, result); in stride2pad1_arm_convolve_s8()
276 arm_cmsis_nn_status result = arm_convolve_s8(&ctx, in conv_2_arm_convolve_s8() local
293 TEST_ASSERT_EQUAL(expected, result); in conv_2_arm_convolve_s8()
[all …]
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_elementwise_add_s8/
Dtest_arm_elementwise_add_s8.c49 arm_cmsis_nn_status result = arm_elementwise_add_s8(input_data1, in add_arm_elementwise_add_s8() local
66 TEST_ASSERT_EQUAL(expected, result); in add_arm_elementwise_add_s8()
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_convolve_s4/
Dtest_arm_convolve_s4.c92 arm_cmsis_nn_status result = arm_convolve_s4(&ctx, in basic_arm_convolve_s4() local
110 TEST_ASSERT_EQUAL(expected, result); in basic_arm_convolve_s4()
118 result = arm_convolve_wrapper_s4(&ctx, in basic_arm_convolve_s4()
135 TEST_ASSERT_EQUAL(expected, result); in basic_arm_convolve_s4()
186 arm_cmsis_nn_status result = arm_convolve_s4(&ctx, in basic_2_arm_convolve_s4() local
204 TEST_ASSERT_EQUAL(expected, result); in basic_2_arm_convolve_s4()
212 result = arm_convolve_wrapper_s4(&ctx, in basic_2_arm_convolve_s4()
229 TEST_ASSERT_EQUAL(expected, result); in basic_2_arm_convolve_s4()
280 arm_cmsis_nn_status result = arm_convolve_s4(&ctx, in stride2pad1_arm_convolve_s4() local
297 TEST_ASSERT_EQUAL(expected, result); in stride2pad1_arm_convolve_s4()
[all …]
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_avgpool_s8/
Dtest_arm_avgpool_s8.c64 arm_cmsis_nn_status result = in avgpooling_arm_avgpool_s8() local
73 TEST_ASSERT_EQUAL(expected, result); in avgpooling_arm_avgpool_s8()
111 arm_cmsis_nn_status result = in avgpooling_1_arm_avgpool_s8() local
119 TEST_ASSERT_EQUAL(expected, result); in avgpooling_1_arm_avgpool_s8()
157 arm_cmsis_nn_status result = in avgpooling_2_arm_avgpool_s8() local
165 TEST_ASSERT_EQUAL(expected, result); in avgpooling_2_arm_avgpool_s8()
203 arm_cmsis_nn_status result = in avgpooling_3_arm_avgpool_s8() local
211 TEST_ASSERT_EQUAL(expected, result); in avgpooling_3_arm_avgpool_s8()
249 arm_cmsis_nn_status result = in avgpooling_4_arm_avgpool_s8() local
257 TEST_ASSERT_EQUAL(expected, result); in avgpooling_4_arm_avgpool_s8()
[all …]
/cmsis-nn-latest/Tests/UnitTest/TestCases/test_arm_depthwise_conv_fast_s16/
Dtest_arm_depthwise_conv_fast_s16.c82 arm_cmsis_nn_status result = arm_depthwise_conv_fast_s16(&ctx, in dw_int16xint8_fast_arm_depthwise_conv_fast_s16() local
100 TEST_ASSERT_EQUAL(expected, result); in dw_int16xint8_fast_arm_depthwise_conv_fast_s16()
110 result = arm_depthwise_conv_wrapper_s16(&ctx, in dw_int16xint8_fast_arm_depthwise_conv_fast_s16()
127 TEST_ASSERT_EQUAL(expected, result); in dw_int16xint8_fast_arm_depthwise_conv_fast_s16()
179 arm_cmsis_nn_status result = arm_depthwise_conv_fast_s16(&ctx, in dw_int16xint8_fast_spill_arm_depthwise_conv_fast_s16() local
196 TEST_ASSERT_EQUAL(expected, result); in dw_int16xint8_fast_spill_arm_depthwise_conv_fast_s16()
206 result = arm_depthwise_conv_wrapper_s16(&ctx, in dw_int16xint8_fast_spill_arm_depthwise_conv_fast_s16()
223 TEST_ASSERT_EQUAL(expected, result); in dw_int16xint8_fast_spill_arm_depthwise_conv_fast_s16()
275 arm_cmsis_nn_status result = arm_depthwise_conv_fast_s16(&ctx, in dw_int16xint8_fast_stride_arm_depthwise_conv_fast_s16() local
292 TEST_ASSERT_EQUAL(expected, result); in dw_int16xint8_fast_stride_arm_depthwise_conv_fast_s16()
[all …]

12