1818#include " mli_mem_info.h"
1919#include " arc_vector.h"
2020
21- const int unroll_factor[2 ][5 ] = {
22- {
23- /* ELTWISE_ADD_NO_CONVERT = */ 4 ,
24- /* ELTWISE_SUB_NO_CONVERT = */ 4 ,
25- /* ELTWISE_MUL_NO_CONVERT = */ 4 ,
26- /* ELTWISE_MAX_NO_CONVERT = */ 4 ,
27- /* ELTWISE_MIN_NO_CONVERT = */ 4
28- } ,
29- {
30- /* ELTWISE_ADD_CONVERT = */ 4 ,
31- /* ELTWISE_SUB_CONVERT = */ 4 ,
32- /* ELTWISE_MUL_CONVERT = */ 4 ,
33- /* ELTWISE_MAX_CONVERT = */ 4 ,
34- /* ELTWISE_MIN_CONVERT = */ 4
35- }
36- };
37-
3821namespace mli {
3922namespace krn {
4023namespace vdsp {
@@ -576,8 +559,6 @@ MLI_FORCE_INLINE void eltwise_innerloop(
576559 int remaining_part = count & (num_lanes - 1 );
577560 decltype (input) op1_scalar = op1_s;
578561 decltype (input) op2_scalar = op2_s;
579- const int convert_int = static_cast <int >(convert);
580- const int func_int = static_cast <int >(func_type);
581562
582563 if (remaining_part) {
583564 auto val1 = (scalar_op1) ? op1_scalar : mli_prv_load_1vec (op1_ptr + idx1);
@@ -591,7 +572,7 @@ MLI_FORCE_INLINE void eltwise_innerloop(
591572 idx_out += remaining_part;
592573 }
593574
594- #pragma clang loop unroll_count(unroll_factor[convert_int][func_int] )
575+ #pragma clang loop unroll_count(4 )
595576 for (int pos = 0 ; pos < (count - remaining_part); pos+=num_lanes) {
596577 auto val1 = (scalar_op1) ? op1_scalar : mli_prv_load_1vec (op1_ptr + idx1);
597578 auto val2 = (scalar_op2) ? op2_scalar : mli_prv_load_1vec (op2_ptr + idx2);
0 commit comments