From 3e9555a0bdefd2698a0e44493aec9f3b56c98948 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 13 Dec 2024 17:16:08 +0100 Subject: [PATCH 1/2] simplify set32_fx() --- lib_com/options.h | 1 + lib_com/tools_fx.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 686288b80..c644d36d0 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -95,4 +95,5 @@ #define FIX_1103_OPT_L_NORM_ARR /* FhG: Optimize L_norm_arr(), avoid IF */ #define FIX_1105_OPT_MINIMUM_SL /* FhG: Optimize minimum_s(), minimum_l(), avoid IF */ #define FIX_1104_OPT_GETMINSCALEFAC /* FhG: Optimize get_min_scalefactor(), avoid IF */ +#define FIX_1106_SIMPLIFY_SET32FX /* FhG: simplify set32_fx() */ #endif diff --git a/lib_com/tools_fx.c b/lib_com/tools_fx.c index b6cb03469..3f72b1664 100644 --- a/lib_com/tools_fx.c +++ b/lib_com/tools_fx.c @@ -692,6 +692,14 @@ void set32_fx( const Word16 N /* i : Lenght of the vector */ ) { +#ifdef FIX_1106_SIMPLIFY_SET32FX + + FOR( i = 0; i < N; i++ ) + { + y[i] = a; + move32(); + } +#else Word16 i, tmp; tmp = extract_l( a ); IF( EQ_32( L_deposit_l( tmp ), a ) ) @@ -710,6 +718,7 @@ void set32_fx( move32(); } } +#endif return; } -- GitLab From 091ea674b41590476d837a333dd67e12de5b752d Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 13 Dec 2024 17:31:34 +0100 Subject: [PATCH 2/2] fix compilation error --- lib_com/tools_fx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_com/tools_fx.c b/lib_com/tools_fx.c index 3f72b1664..62766e3b7 100644 --- a/lib_com/tools_fx.c +++ b/lib_com/tools_fx.c @@ -693,6 +693,7 @@ void set32_fx( ) { #ifdef FIX_1106_SIMPLIFY_SET32FX + Word16 i; FOR( i = 0; i < N; i++ ) { -- GitLab