From 2208df0e14e626a882531581888000b60ef59ee5 Mon Sep 17 00:00:00 2001 From: Jonatan Antoni Date: Tue, 29 Aug 2017 13:20:47 +0200 Subject: [PATCH] Global MISRA-C Rule 10.6 fix up: Unsigned constant values with U suffix, uppercase instead of lowercase. (Issue #227) --- .../src/transform_tests/cfft_family_tests.c | 4 +- .../src/transform_tests/rfft_fast_tests.c | 4 +- .../Common/src/transform_tests/rfft_tests.c | 14 +- .../RefLibs/src/ControllerFunctions/pid.c | 2 +- .../RefLibs/src/FilteringFunctions/biquad.c | 34 +- .../RefLibs/src/FilteringFunctions/conv.c | 12 +- .../src/FilteringFunctions/correlate.c | 136 ++-- .../RefLibs/src/FilteringFunctions/fir.c | 24 +- .../src/FilteringFunctions/fir_decimate.c | 40 +- .../src/FilteringFunctions/fir_interpolate.c | 30 +- .../src/FilteringFunctions/fir_lattice.c | 26 +- .../src/FilteringFunctions/fir_sparse.c | 38 +- .../src/FilteringFunctions/iir_lattice.c | 26 +- .../RefLibs/src/FilteringFunctions/lms.c | 66 +- Include/arm_math.h | 46 +- Source/BasicMathFunctions/arm_abs_f32.c | 12 +- Source/BasicMathFunctions/arm_abs_q15.c | 10 +- Source/BasicMathFunctions/arm_abs_q31.c | 8 +- Source/BasicMathFunctions/arm_abs_q7.c | 12 +- Source/BasicMathFunctions/arm_add_f32.c | 14 +- Source/BasicMathFunctions/arm_add_q15.c | 10 +- Source/BasicMathFunctions/arm_add_q31.c | 10 +- Source/BasicMathFunctions/arm_add_q7.c | 10 +- Source/BasicMathFunctions/arm_dot_prod_f32.c | 8 +- Source/BasicMathFunctions/arm_dot_prod_q15.c | 10 +- Source/BasicMathFunctions/arm_dot_prod_q31.c | 18 +- Source/BasicMathFunctions/arm_dot_prod_q7.c | 10 +- Source/BasicMathFunctions/arm_mult_f32.c | 14 +- Source/BasicMathFunctions/arm_mult_q15.c | 8 +- Source/BasicMathFunctions/arm_mult_q31.c | 20 +- Source/BasicMathFunctions/arm_mult_q7.c | 8 +- Source/BasicMathFunctions/arm_negate_f32.c | 12 +- Source/BasicMathFunctions/arm_negate_q15.c | 12 +- Source/BasicMathFunctions/arm_negate_q31.c | 8 +- Source/BasicMathFunctions/arm_negate_q7.c | 8 +- Source/BasicMathFunctions/arm_offset_f32.c | 12 +- Source/BasicMathFunctions/arm_offset_q15.c | 10 +- Source/BasicMathFunctions/arm_offset_q31.c | 10 +- Source/BasicMathFunctions/arm_offset_q7.c | 10 +- Source/BasicMathFunctions/arm_scale_f32.c | 12 +- Source/BasicMathFunctions/arm_scale_q15.c | 10 +- Source/BasicMathFunctions/arm_scale_q31.c | 22 +- Source/BasicMathFunctions/arm_scale_q7.c | 10 +- Source/BasicMathFunctions/arm_shift_q15.c | 22 +- Source/BasicMathFunctions/arm_shift_q31.c | 22 +- Source/BasicMathFunctions/arm_shift_q7.c | 26 +- Source/BasicMathFunctions/arm_sub_f32.c | 14 +- Source/BasicMathFunctions/arm_sub_q15.c | 10 +- Source/BasicMathFunctions/arm_sub_q31.c | 10 +- Source/BasicMathFunctions/arm_sub_q7.c | 10 +- Source/CommonTables/arm_const_structs.c | 88 +-- .../ComplexMathFunctions/arm_cmplx_conj_f32.c | 12 +- .../ComplexMathFunctions/arm_cmplx_conj_q15.c | 10 +- .../ComplexMathFunctions/arm_cmplx_conj_q31.c | 12 +- .../arm_cmplx_dot_prod_f32.c | 10 +- .../arm_cmplx_dot_prod_q15.c | 10 +- .../arm_cmplx_dot_prod_q31.c | 10 +- .../ComplexMathFunctions/arm_cmplx_mag_f32.c | 10 +- .../ComplexMathFunctions/arm_cmplx_mag_q15.c | 10 +- .../ComplexMathFunctions/arm_cmplx_mag_q31.c | 12 +- .../arm_cmplx_mag_squared_f32.c | 12 +- .../arm_cmplx_mag_squared_q15.c | 10 +- .../arm_cmplx_mag_squared_q31.c | 10 +- .../arm_cmplx_mult_cmplx_f32.c | 14 +- .../arm_cmplx_mult_cmplx_q15.c | 10 +- .../arm_cmplx_mult_cmplx_q31.c | 16 +- .../arm_cmplx_mult_real_f32.c | 14 +- .../arm_cmplx_mult_real_q15.c | 26 +- .../arm_cmplx_mult_real_q31.c | 10 +- Source/ControllerFunctions/arm_pid_init_f32.c | 2 +- Source/ControllerFunctions/arm_pid_init_q15.c | 4 +- Source/ControllerFunctions/arm_pid_init_q31.c | 2 +- .../ControllerFunctions/arm_pid_reset_f32.c | 2 +- .../ControllerFunctions/arm_pid_reset_q15.c | 2 +- .../ControllerFunctions/arm_pid_reset_q31.c | 2 +- .../arm_biquad_cascade_df1_32x64_init_q31.c | 2 +- .../arm_biquad_cascade_df1_32x64_q31.c | 22 +- .../arm_biquad_cascade_df1_f32.c | 14 +- .../arm_biquad_cascade_df1_fast_q15.c | 8 +- .../arm_biquad_cascade_df1_fast_q31.c | 24 +- .../arm_biquad_cascade_df1_init_f32.c | 2 +- .../arm_biquad_cascade_df1_init_q15.c | 2 +- .../arm_biquad_cascade_df1_init_q31.c | 2 +- .../arm_biquad_cascade_df1_q15.c | 10 +- .../arm_biquad_cascade_df1_q31.c | 14 +- .../arm_biquad_cascade_df2T_f32.c | 26 +- .../arm_biquad_cascade_df2T_f64.c | 26 +- .../arm_biquad_cascade_df2T_init_f32.c | 2 +- .../arm_biquad_cascade_df2T_init_f64.c | 2 +- .../arm_biquad_cascade_stereo_df2T_f32.c | 28 +- .../arm_biquad_cascade_stereo_df2T_init_f32.c | 2 +- Source/FilteringFunctions/arm_conv_f32.c | 76 +-- .../arm_conv_fast_opt_q15.c | 72 +-- Source/FilteringFunctions/arm_conv_fast_q15.c | 198 +++--- Source/FilteringFunctions/arm_conv_fast_q31.c | 64 +- Source/FilteringFunctions/arm_conv_opt_q15.c | 72 +-- Source/FilteringFunctions/arm_conv_opt_q7.c | 78 +-- .../FilteringFunctions/arm_conv_partial_f32.c | 68 +- .../arm_conv_partial_fast_opt_q15.c | 122 ++-- .../arm_conv_partial_fast_q15.c | 194 +++--- .../arm_conv_partial_fast_q31.c | 62 +- .../arm_conv_partial_opt_q15.c | 122 ++-- .../arm_conv_partial_opt_q7.c | 146 ++--- .../FilteringFunctions/arm_conv_partial_q15.c | 104 +-- .../FilteringFunctions/arm_conv_partial_q31.c | 70 +- .../FilteringFunctions/arm_conv_partial_q7.c | 66 +- Source/FilteringFunctions/arm_conv_q15.c | 106 +-- Source/FilteringFunctions/arm_conv_q31.c | 70 +- Source/FilteringFunctions/arm_conv_q7.c | 126 ++-- Source/FilteringFunctions/arm_correlate_f32.c | 90 +-- .../arm_correlate_fast_opt_q15.c | 78 +-- .../arm_correlate_fast_q15.c | 176 ++--- .../arm_correlate_fast_q31.c | 70 +- .../arm_correlate_opt_q15.c | 78 +-- .../FilteringFunctions/arm_correlate_opt_q7.c | 86 +-- Source/FilteringFunctions/arm_correlate_q15.c | 106 +-- Source/FilteringFunctions/arm_correlate_q31.c | 94 +-- Source/FilteringFunctions/arm_correlate_q7.c | 90 +-- .../FilteringFunctions/arm_fir_decimate_f32.c | 36 +- .../arm_fir_decimate_fast_q15.c | 52 +- .../arm_fir_decimate_fast_q31.c | 50 +- .../arm_fir_decimate_init_f32.c | 4 +- .../arm_fir_decimate_init_q15.c | 4 +- .../arm_fir_decimate_init_q31.c | 2 +- .../FilteringFunctions/arm_fir_decimate_q15.c | 62 +- .../FilteringFunctions/arm_fir_decimate_q31.c | 28 +- Source/FilteringFunctions/arm_fir_f32.c | 62 +- Source/FilteringFunctions/arm_fir_fast_q15.c | 30 +- Source/FilteringFunctions/arm_fir_fast_q31.c | 36 +- Source/FilteringFunctions/arm_fir_init_f32.c | 2 +- Source/FilteringFunctions/arm_fir_init_q15.c | 4 +- Source/FilteringFunctions/arm_fir_init_q31.c | 2 +- Source/FilteringFunctions/arm_fir_init_q7.c | 2 +- .../arm_fir_interpolate_f32.c | 52 +- .../arm_fir_interpolate_init_f32.c | 4 +- .../arm_fir_interpolate_init_q15.c | 4 +- .../arm_fir_interpolate_init_q31.c | 4 +- .../arm_fir_interpolate_q15.c | 48 +- .../arm_fir_interpolate_q31.c | 46 +- .../FilteringFunctions/arm_fir_lattice_f32.c | 24 +- .../FilteringFunctions/arm_fir_lattice_q15.c | 138 ++-- .../FilteringFunctions/arm_fir_lattice_q31.c | 46 +- Source/FilteringFunctions/arm_fir_q15.c | 78 +-- Source/FilteringFunctions/arm_fir_q31.c | 46 +- Source/FilteringFunctions/arm_fir_q7.c | 60 +- .../FilteringFunctions/arm_fir_sparse_f32.c | 38 +- .../arm_fir_sparse_init_f32.c | 2 +- .../arm_fir_sparse_init_q15.c | 2 +- .../arm_fir_sparse_init_q31.c | 2 +- .../arm_fir_sparse_init_q7.c | 2 +- .../FilteringFunctions/arm_fir_sparse_q15.c | 40 +- .../FilteringFunctions/arm_fir_sparse_q31.c | 40 +- Source/FilteringFunctions/arm_fir_sparse_q7.c | 40 +- .../FilteringFunctions/arm_iir_lattice_f32.c | 50 +- .../FilteringFunctions/arm_iir_lattice_q15.c | 28 +- .../FilteringFunctions/arm_iir_lattice_q31.c | 32 +- Source/FilteringFunctions/arm_lms_f32.c | 38 +- Source/FilteringFunctions/arm_lms_init_q15.c | 2 +- Source/FilteringFunctions/arm_lms_init_q31.c | 2 +- Source/FilteringFunctions/arm_lms_norm_f32.c | 38 +- .../arm_lms_norm_init_f32.c | 2 +- .../arm_lms_norm_init_q15.c | 2 +- .../arm_lms_norm_init_q31.c | 2 +- Source/FilteringFunctions/arm_lms_norm_q15.c | 48 +- Source/FilteringFunctions/arm_lms_norm_q31.c | 56 +- Source/FilteringFunctions/arm_lms_q15.c | 42 +- Source/FilteringFunctions/arm_lms_q31.c | 54 +- Source/MatrixFunctions/arm_mat_add_f32.c | 14 +- Source/MatrixFunctions/arm_mat_add_q15.c | 10 +- Source/MatrixFunctions/arm_mat_add_q31.c | 14 +- .../MatrixFunctions/arm_mat_cmplx_mult_f32.c | 46 +- .../MatrixFunctions/arm_mat_cmplx_mult_q15.c | 42 +- .../MatrixFunctions/arm_mat_cmplx_mult_q31.c | 46 +- Source/MatrixFunctions/arm_mat_inverse_f32.c | 80 +-- Source/MatrixFunctions/arm_mat_inverse_f64.c | 80 +-- Source/MatrixFunctions/arm_mat_mult_f32.c | 24 +- .../MatrixFunctions/arm_mat_mult_fast_q15.c | 44 +- .../MatrixFunctions/arm_mat_mult_fast_q31.c | 36 +- Source/MatrixFunctions/arm_mat_mult_q15.c | 30 +- Source/MatrixFunctions/arm_mat_mult_q31.c | 20 +- Source/MatrixFunctions/arm_mat_scale_f32.c | 10 +- Source/MatrixFunctions/arm_mat_scale_q15.c | 10 +- Source/MatrixFunctions/arm_mat_scale_q31.c | 12 +- Source/MatrixFunctions/arm_mat_sub_f32.c | 14 +- Source/MatrixFunctions/arm_mat_sub_q15.c | 10 +- Source/MatrixFunctions/arm_mat_sub_q31.c | 14 +- Source/MatrixFunctions/arm_mat_trans_f32.c | 14 +- Source/MatrixFunctions/arm_mat_trans_q15.c | 12 +- Source/MatrixFunctions/arm_mat_trans_q31.c | 16 +- Source/StatisticsFunctions/arm_max_f32.c | 28 +- Source/StatisticsFunctions/arm_max_q15.c | 28 +- Source/StatisticsFunctions/arm_max_q31.c | 28 +- Source/StatisticsFunctions/arm_max_q7.c | 28 +- Source/StatisticsFunctions/arm_mean_f32.c | 8 +- Source/StatisticsFunctions/arm_mean_q15.c | 16 +- Source/StatisticsFunctions/arm_mean_q31.c | 8 +- Source/StatisticsFunctions/arm_mean_q7.c | 16 +- Source/StatisticsFunctions/arm_min_f32.c | 28 +- Source/StatisticsFunctions/arm_min_q15.c | 28 +- Source/StatisticsFunctions/arm_min_q31.c | 28 +- Source/StatisticsFunctions/arm_min_q7.c | 28 +- Source/StatisticsFunctions/arm_power_f32.c | 8 +- Source/StatisticsFunctions/arm_power_q15.c | 10 +- Source/StatisticsFunctions/arm_power_q31.c | 18 +- Source/StatisticsFunctions/arm_power_q7.c | 8 +- Source/StatisticsFunctions/arm_rms_f32.c | 8 +- Source/StatisticsFunctions/arm_rms_q15.c | 10 +- Source/StatisticsFunctions/arm_rms_q31.c | 10 +- Source/StatisticsFunctions/arm_std_f32.c | 12 +- Source/StatisticsFunctions/arm_std_q15.c | 32 +- Source/StatisticsFunctions/arm_std_q31.c | 32 +- Source/StatisticsFunctions/arm_var_f32.c | 18 +- Source/StatisticsFunctions/arm_var_q15.c | 30 +- Source/StatisticsFunctions/arm_var_q31.c | 32 +- Source/SupportFunctions/arm_copy_f32.c | 8 +- Source/SupportFunctions/arm_copy_q15.c | 8 +- Source/SupportFunctions/arm_copy_q31.c | 8 +- Source/SupportFunctions/arm_copy_q7.c | 8 +- Source/SupportFunctions/arm_fill_f32.c | 8 +- Source/SupportFunctions/arm_fill_q15.c | 10 +- Source/SupportFunctions/arm_fill_q31.c | 8 +- Source/SupportFunctions/arm_fill_q7.c | 8 +- Source/SupportFunctions/arm_float_to_q15.c | 10 +- Source/SupportFunctions/arm_float_to_q31.c | 10 +- Source/SupportFunctions/arm_float_to_q7.c | 10 +- Source/SupportFunctions/arm_q15_to_float.c | 8 +- Source/SupportFunctions/arm_q15_to_q31.c | 16 +- Source/SupportFunctions/arm_q15_to_q7.c | 8 +- Source/SupportFunctions/arm_q31_to_float.c | 8 +- Source/SupportFunctions/arm_q31_to_q15.c | 8 +- Source/SupportFunctions/arm_q31_to_q7.c | 8 +- Source/SupportFunctions/arm_q7_to_float.c | 8 +- Source/SupportFunctions/arm_q7_to_q15.c | 12 +- Source/SupportFunctions/arm_q7_to_q31.c | 8 +- Source/TransformFunctions/arm_bitreversal.c | 128 ++-- Source/TransformFunctions/arm_cfft_f32.c | 16 +- Source/TransformFunctions/arm_cfft_q15.c | 38 +- Source/TransformFunctions/arm_cfft_q31.c | 18 +- .../TransformFunctions/arm_cfft_radix2_f32.c | 20 +- .../arm_cfft_radix2_init_f32.c | 54 +- .../arm_cfft_radix2_init_q15.c | 54 +- .../arm_cfft_radix2_init_q31.c | 54 +- .../TransformFunctions/arm_cfft_radix2_q15.c | 124 ++-- .../TransformFunctions/arm_cfft_radix2_q31.c | 66 +- .../TransformFunctions/arm_cfft_radix4_f32.c | 366 +++++------ .../arm_cfft_radix4_init_f32.c | 30 +- .../arm_cfft_radix4_init_q15.c | 30 +- .../arm_cfft_radix4_init_q31.c | 30 +- .../TransformFunctions/arm_cfft_radix4_q15.c | 608 +++++++++--------- .../TransformFunctions/arm_cfft_radix4_q31.c | 470 +++++++------- Source/TransformFunctions/arm_dct4_f32.c | 32 +- Source/TransformFunctions/arm_dct4_init_f32.c | 10 +- Source/TransformFunctions/arm_dct4_init_q15.c | 10 +- Source/TransformFunctions/arm_dct4_init_q31.c | 8 +- Source/TransformFunctions/arm_dct4_q15.c | 36 +- Source/TransformFunctions/arm_dct4_q31.c | 36 +- Source/TransformFunctions/arm_rfft_f32.c | 34 +- Source/TransformFunctions/arm_rfft_fast_f32.c | 4 +- .../arm_rfft_fast_init_f32.c | 16 +- Source/TransformFunctions/arm_rfft_init_f32.c | 22 +- Source/TransformFunctions/arm_rfft_init_q15.c | 36 +- Source/TransformFunctions/arm_rfft_init_q31.c | 36 +- Source/TransformFunctions/arm_rfft_q15.c | 76 +-- Source/TransformFunctions/arm_rfft_q31.c | 30 +- 264 files changed, 4691 insertions(+), 4691 deletions(-) diff --git a/DSP_Lib_TestSuite/Common/src/transform_tests/cfft_family_tests.c b/DSP_Lib_TestSuite/Common/src/transform_tests/cfft_family_tests.c index e23b9eb9..9fb8834d 100644 --- a/DSP_Lib_TestSuite/Common/src/transform_tests/cfft_family_tests.c +++ b/DSP_Lib_TestSuite/Common/src/transform_tests/cfft_family_tests.c @@ -151,8 +151,8 @@ /* TYPE_FROM_ABBREV(q15), \ */ /* ifft_flag) */ -CFFT_FAMILY_DEFINE_ALL_TESTS(forward, 0u); -CFFT_FAMILY_DEFINE_ALL_TESTS(inverse, 1u); +CFFT_FAMILY_DEFINE_ALL_TESTS(forward, 0U); +CFFT_FAMILY_DEFINE_ALL_TESTS(inverse, 1U); /*--------------------------------------------------------------------------------*/ /* Collect all tests in a group */ diff --git a/DSP_Lib_TestSuite/Common/src/transform_tests/rfft_fast_tests.c b/DSP_Lib_TestSuite/Common/src/transform_tests/rfft_fast_tests.c index ed73cc30..1b4ece2c 100644 --- a/DSP_Lib_TestSuite/Common/src/transform_tests/rfft_fast_tests.c +++ b/DSP_Lib_TestSuite/Common/src/transform_tests/rfft_fast_tests.c @@ -61,8 +61,8 @@ FFT fast function test template. Arguments are: function configuration suffix return JTEST_TEST_PASSED; \ } -RFFT_FAST_DEFINE_TEST(forward, 0u); -RFFT_FAST_DEFINE_TEST(inverse, 1u); +RFFT_FAST_DEFINE_TEST(forward, 0U); +RFFT_FAST_DEFINE_TEST(inverse, 1U); /*--------------------------------------------------------------------------------*/ /* Collect all tests in a group */ diff --git a/DSP_Lib_TestSuite/Common/src/transform_tests/rfft_tests.c b/DSP_Lib_TestSuite/Common/src/transform_tests/rfft_tests.c index 52c81123..092525c3 100644 --- a/DSP_Lib_TestSuite/Common/src/transform_tests/rfft_tests.c +++ b/DSP_Lib_TestSuite/Common/src/transform_tests/rfft_tests.c @@ -26,11 +26,11 @@ /* Initialize the RFFT and CFFT Instances */ \ arm_rfft_init_##suffix( \ &rfft_inst_fut, \ - (uint32_t) fftlen, ifft_flag, 1u); \ + (uint32_t) fftlen, ifft_flag, 1U); \ \ arm_rfft_init_##suffix( \ &rfft_inst_ref, \ - (uint32_t) fftlen, ifft_flag, 1u); \ + (uint32_t) fftlen, ifft_flag, 1U); \ \ if (ifft_flag) \ { \ @@ -74,11 +74,11 @@ return JTEST_TEST_PASSED; \ } -RFFT_DEFINE_TEST(q31, forward, 0u, TYPE_FROM_ABBREV(q31), TYPE_FROM_ABBREV(q31)); -RFFT_DEFINE_TEST(q15, forward, 0u, TYPE_FROM_ABBREV(q15), TYPE_FROM_ABBREV(q15)); -//RFFT_DEFINE_TEST(f32, inverse, 1u, TYPE_FROM_ABBREV(f32), TYPE_FROM_ABBREV(f32)); -RFFT_DEFINE_TEST(q31, inverse, 1u, TYPE_FROM_ABBREV(q31), TYPE_FROM_ABBREV(q31)); -RFFT_DEFINE_TEST(q15, inverse, 1u, TYPE_FROM_ABBREV(q15), TYPE_FROM_ABBREV(q15)); +RFFT_DEFINE_TEST(q31, forward, 0U, TYPE_FROM_ABBREV(q31), TYPE_FROM_ABBREV(q31)); +RFFT_DEFINE_TEST(q15, forward, 0U, TYPE_FROM_ABBREV(q15), TYPE_FROM_ABBREV(q15)); +//RFFT_DEFINE_TEST(f32, inverse, 1U, TYPE_FROM_ABBREV(f32), TYPE_FROM_ABBREV(f32)); +RFFT_DEFINE_TEST(q31, inverse, 1U, TYPE_FROM_ABBREV(q31), TYPE_FROM_ABBREV(q31)); +RFFT_DEFINE_TEST(q15, inverse, 1U, TYPE_FROM_ABBREV(q15), TYPE_FROM_ABBREV(q15)); /*--------------------------------------------------------------------------------*/ /* Collect all tests in a group */ diff --git a/DSP_Lib_TestSuite/RefLibs/src/ControllerFunctions/pid.c b/DSP_Lib_TestSuite/RefLibs/src/ControllerFunctions/pid.c index 2f9a9fda..652991e0 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/ControllerFunctions/pid.c +++ b/DSP_Lib_TestSuite/RefLibs/src/ControllerFunctions/pid.c @@ -35,7 +35,7 @@ q31_t ref_pid_q31( acc += (q63_t) S->A2 * S->state[1]; /* convert output to 1.31 format to add y[n-1] */ - out = (q31_t) (acc >> 31u); + out = (q31_t) (acc >> 31U); /* out += y[n-1] */ out += S->state[2]; diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/biquad.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/biquad.c index 11c2a78f..c340debd 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/biquad.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/biquad.c @@ -31,7 +31,7 @@ void ref_biquad_cascade_df2T_f32( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -66,7 +66,7 @@ void ref_biquad_cascade_df2T_f32( /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); } @@ -103,7 +103,7 @@ void ref_biquad_cascade_stereo_df2T_f32( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn1a = *pIn++; //Channel a @@ -145,7 +145,7 @@ void ref_biquad_cascade_stereo_df2T_f32( /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); } @@ -180,7 +180,7 @@ void ref_biquad_cascade_df2T_f64( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -215,7 +215,7 @@ void ref_biquad_cascade_df2T_f64( /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); } void ref_biquad_cascade_df1_f32( @@ -255,7 +255,7 @@ void ref_biquad_cascade_df1_f32( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -297,7 +297,7 @@ void ref_biquad_cascade_df1_f32( /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); } void ref_biquad_cas_df1_32x64_q31( @@ -318,8 +318,8 @@ void ref_biquad_cas_df1_32x64_q31( int32_t shift = (int32_t) S->postShift + 1; /* Shift to be applied to the output */ uint32_t sample, stage = S->numStages; /* loop counters */ q31_t acc_l, acc_h; /* temporary output */ - uint32_t uShift = ((uint32_t) S->postShift + 1u); - uint32_t lShift = 32u - uShift; /* Shift to be applied to the output */ + uint32_t uShift = ((uint32_t) S->postShift + 1U); + uint32_t lShift = 32U - uShift; /* Shift to be applied to the output */ do { @@ -338,7 +338,7 @@ void ref_biquad_cas_df1_32x64_q31( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -396,8 +396,8 @@ void ref_biquad_cascade_df1_q31( uint32_t blockSize) { q63_t acc; /* accumulator */ - uint32_t uShift = ((uint32_t) S->postShift + 1u); - uint32_t lShift = 32u - uShift; /* Shift to be applied to the output */ + uint32_t uShift = ((uint32_t) S->postShift + 1U); + uint32_t lShift = 32U - uShift; /* Shift to be applied to the output */ q31_t *pIn = pSrc; /* input pointer initialization */ q31_t *pOut = pDst; /* output pointer initialization */ q31_t *pState = S->pState; /* pState pointer initialization */ @@ -428,7 +428,7 @@ void ref_biquad_cascade_df1_q31( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -518,7 +518,7 @@ void ref_biquad_cascade_df1_fast_q31( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -597,7 +597,7 @@ void ref_biquad_cascade_df1_fast_q15( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -672,7 +672,7 @@ void ref_biquad_cascade_df1_q15( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/conv.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/conv.c index c1c8369b..b10c8741 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/conv.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/conv.c @@ -73,7 +73,7 @@ void ref_conv_q31( } /* Store the output in the destination buffer */ - pDst[i] = (q31_t)(sum >> 31u); + pDst[i] = (q31_t)(sum >> 31U); } } @@ -106,7 +106,7 @@ void ref_conv_fast_q31( } /* Store the output in the destination buffer */ - pDst[i] = (q31_t)(sum << 1u); + pDst[i] = (q31_t)(sum << 1U); } } @@ -166,7 +166,7 @@ void ref_conv_q15( } /* Store the output in the destination buffer */ - pDst[i] = ref_sat_q15(sum >> 15u); + pDst[i] = ref_sat_q15(sum >> 15U); } } @@ -202,7 +202,7 @@ arm_status ref_conv_partial_fast_opt_q15( } /* Store the output in the destination buffer */ - pDst[i] = ref_sat_q15(sum >> 15u); + pDst[i] = ref_sat_q15(sum >> 15U); } return ARM_MATH_SUCCESS; @@ -236,7 +236,7 @@ void ref_conv_fast_q15( } /* Store the output in the destination buffer */ - pDst[i] = sum >> 15u; + pDst[i] = sum >> 15U; } } @@ -270,7 +270,7 @@ void ref_conv_fast_opt_q15( } /* Store the output in the destination buffer */ - pDst[i] = ref_sat_q15(sum >> 15u); + pDst[i] = ref_sat_q15(sum >> 15U); } } diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/correlate.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/correlate.c index d9b427d0..9ce170ce 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/correlate.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/correlate.c @@ -8,11 +8,11 @@ void ref_correlate_f32( float32_t * pDst) { float32_t *pIn1 = pSrcA; /* inputA pointer */ - float32_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + float32_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ float32_t sum; /* Accumulator */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* The algorithm implementation is based on the lengths of the inputs. * srcB is always made to slide across srcA. @@ -32,7 +32,7 @@ void ref_correlate_f32( */ /* Calculate the length of the remaining sequence */ - tot = srcALen + srcBLen - 2u; + tot = srcALen + srcBLen - 2U; if (srcALen > srcBLen) { @@ -46,7 +46,7 @@ void ref_correlate_f32( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + srcALen - 1u; + pIn2 = pSrcA + srcALen - 1U; /* Initialisation of the pointer after zero padding */ pDst += tot; @@ -61,13 +61,13 @@ void ref_correlate_f32( } /* Loop to calculate convolution for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0.0f; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((i - j < srcBLen) && (j < srcALen)) @@ -92,14 +92,14 @@ void ref_correlate_q31( q31_t * pDst) { q31_t *pIn1 = pSrcA; /* inputA pointer */ - q31_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + q31_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ q63_t sum; /* Accumulators */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -116,7 +116,7 @@ void ref_correlate_q31( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -132,13 +132,13 @@ void ref_correlate_q31( } /* Loop to calculate correlation for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0; /* Loop to perform MAC operations according to correlation equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) @@ -149,9 +149,9 @@ void ref_correlate_q31( } /* Store the output in the destination buffer */ if (inv == 1) - *pDst-- = (q31_t)(sum >> 31u); + *pDst-- = (q31_t)(sum >> 31U); else - *pDst++ = (q31_t)(sum >> 31u); + *pDst++ = (q31_t)(sum >> 31U); } } @@ -163,14 +163,14 @@ void ref_correlate_fast_q31( q31_t * pDst) { q31_t *pIn1 = pSrcA; /* inputA pointer */ - q31_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + q31_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ q63_t sum; /* Accumulators */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -187,7 +187,7 @@ void ref_correlate_fast_q31( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -203,13 +203,13 @@ void ref_correlate_fast_q31( } /* Loop to calculate correlation for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0; /* Loop to perform MAC operations according to correlation equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) @@ -221,9 +221,9 @@ void ref_correlate_fast_q31( } /* Store the output in the destination buffer */ if (inv == 1) - *pDst-- = (q31_t)(sum << 1u); + *pDst-- = (q31_t)(sum << 1U); else - *pDst++ = (q31_t)(sum << 1u); + *pDst++ = (q31_t)(sum << 1U); } } @@ -235,14 +235,14 @@ void ref_correlate_q15( q15_t * pDst) { q15_t *pIn1 = pSrcA; /* inputA pointer */ - q15_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + q15_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ q63_t sum; /* Accumulators */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -259,7 +259,7 @@ void ref_correlate_q15( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -275,13 +275,13 @@ void ref_correlate_q15( } /* Loop to calculate convolution for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) @@ -292,9 +292,9 @@ void ref_correlate_q15( } /* Store the output in the destination buffer */ if (inv == 1) - *pDst-- = (q15_t) ref_sat_q15(sum >> 15u); + *pDst-- = (q15_t) ref_sat_q15(sum >> 15U); else - *pDst++ = (q15_t) ref_sat_q15(sum >> 15u); + *pDst++ = (q15_t) ref_sat_q15(sum >> 15U); } } @@ -306,14 +306,14 @@ void ref_correlate_fast_q15( q15_t * pDst) { q15_t *pIn1 = pSrcA; /* inputA pointer */ - q15_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + q15_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ q63_t sum; /* Accumulators */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -330,7 +330,7 @@ void ref_correlate_fast_q15( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -346,13 +346,13 @@ void ref_correlate_fast_q15( } /* Loop to calculate convolution for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) @@ -363,9 +363,9 @@ void ref_correlate_fast_q15( } /* Store the output in the destination buffer */ if (inv == 1) - *pDst-- = (q15_t)(sum >> 15u); + *pDst-- = (q15_t)(sum >> 15U); else - *pDst++ = (q15_t)(sum >> 15u); + *pDst++ = (q15_t)(sum >> 15U); } } @@ -378,14 +378,14 @@ void ref_correlate_fast_opt_q15( q15_t * pScratch) { q15_t *pIn1 = pSrcA; /* inputA pointer */ - q15_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + q15_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ q31_t sum; /* Accumulators */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -402,7 +402,7 @@ void ref_correlate_fast_opt_q15( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -418,13 +418,13 @@ void ref_correlate_fast_opt_q15( } /* Loop to calculate convolution for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) @@ -435,9 +435,9 @@ void ref_correlate_fast_opt_q15( } /* Store the output in the destination buffer */ if (inv == 1) - *pDst-- = (q15_t) ref_sat_q15(sum >> 15u); + *pDst-- = (q15_t) ref_sat_q15(sum >> 15U); else - *pDst++ = (q15_t) ref_sat_q15(sum >> 15u); + *pDst++ = (q15_t) ref_sat_q15(sum >> 15U); } } @@ -449,14 +449,14 @@ void ref_correlate_q7( q7_t * pDst) { q7_t *pIn1 = pSrcA; /* inputA pointer */ - q7_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + q7_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ q31_t sum; /* Accumulator */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -473,7 +473,7 @@ void ref_correlate_q7( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -489,13 +489,13 @@ void ref_correlate_q7( } /* Loop to calculate convolution for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) @@ -506,8 +506,8 @@ void ref_correlate_q7( } /* Store the output in the destination buffer */ if (inv == 1) - *pDst-- = (q7_t) __SSAT((sum >> 7u), 8u); + *pDst-- = (q7_t) __SSAT((sum >> 7U), 8U); else - *pDst++ = (q7_t) __SSAT((sum >> 7u), 8u); + *pDst++ = (q7_t) __SSAT((sum >> 7U), 8U); } } diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir.c index 391df7c1..8a7a90c3 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir.c @@ -15,9 +15,9 @@ void ref_fir_f32( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - while (blockSize > 0u) + while (blockSize > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -69,9 +69,9 @@ void ref_fir_q31( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - while (blockSize > 0u) + while (blockSize > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -123,9 +123,9 @@ void ref_fir_fast_q31( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - while (blockSize > 0u) + while (blockSize > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -177,9 +177,9 @@ void ref_fir_q15( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - while (blockSize > 0u) + while (blockSize > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -231,9 +231,9 @@ void ref_fir_fast_q15( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - while (blockSize > 0u) + while (blockSize > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -285,9 +285,9 @@ void ref_fir_q7( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - while (blockSize > 0u) + while (blockSize > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_decimate.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_decimate.c index d3633206..9ef1e5e6 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_decimate.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_decimate.c @@ -16,12 +16,12 @@ void ref_fir_decimate_f32( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + numTaps - 1u; + pStateCurnt = S->pState + numTaps - 1U; /* Total number of output samples to be computed */ blkCnt = blockSize / S->M; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -64,10 +64,10 @@ void ref_fir_decimate_f32( pStateCurnt = S->pState; /* Copy numTaps number of values */ - i = numTaps - 1u; + i = numTaps - 1U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -92,12 +92,12 @@ void ref_fir_decimate_q31( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + numTaps - 1u; + pStateCurnt = S->pState + numTaps - 1U; /* Total number of output samples to be computed */ blkCnt = blockSize / S->M; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -141,10 +141,10 @@ void ref_fir_decimate_q31( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = numTaps - 1u; + i = numTaps - 1U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -169,12 +169,12 @@ void ref_fir_decimate_fast_q31( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + numTaps - 1u; + pStateCurnt = S->pState + numTaps - 1U; /* Total number of output samples to be computed */ blkCnt = blockSize / S->M; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -218,10 +218,10 @@ void ref_fir_decimate_fast_q31( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = numTaps - 1u; + i = numTaps - 1U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -246,12 +246,12 @@ void ref_fir_decimate_q15( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + numTaps - 1u; + pStateCurnt = S->pState + numTaps - 1U; /* Total number of output samples to be computed */ blkCnt = blockSize / S->M; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -295,10 +295,10 @@ void ref_fir_decimate_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = numTaps - 1u; + i = numTaps - 1U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -323,12 +323,12 @@ void ref_fir_decimate_fast_q15( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + numTaps - 1u; + pStateCurnt = S->pState + numTaps - 1U; /* Total number of output samples to be computed */ blkCnt = blockSize / S->M; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -372,10 +372,10 @@ void ref_fir_decimate_fast_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = numTaps - 1u; + i = numTaps - 1U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_interpolate.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_interpolate.c index 50b12f59..4cb52ebe 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_interpolate.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_interpolate.c @@ -23,7 +23,7 @@ void ref_fir_interpolate_f32( blkCnt = blockSize; /* Loop over the blockSize. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -31,7 +31,7 @@ void ref_fir_interpolate_f32( /* Loop over the Interpolation factor. */ i = S->L; - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ sum = 0.0f; @@ -45,7 +45,7 @@ void ref_fir_interpolate_f32( /* Loop over the polyPhase length */ tapCnt = phaseLen; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ sum += *ptr1++ * *ptr2; @@ -79,9 +79,9 @@ void ref_fir_interpolate_f32( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = phaseLen - 1u; + tapCnt = phaseLen - 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -118,7 +118,7 @@ void ref_fir_interpolate_q31( blkCnt = blockSize; /* Loop over the blockSize. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -126,7 +126,7 @@ void ref_fir_interpolate_q31( /* Loop over the Interpolation factor. */ i = S->L; - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ sum = 0; @@ -139,7 +139,7 @@ void ref_fir_interpolate_q31( tapCnt = phaseLen; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the coefficient */ c0 = *(ptr2); @@ -179,10 +179,10 @@ void ref_fir_interpolate_q31( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = phaseLen - 1u; + tapCnt = phaseLen - 1U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -216,7 +216,7 @@ void ref_fir_interpolate_q15( blkCnt = blockSize; /* Loop over the blockSize. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -224,7 +224,7 @@ void ref_fir_interpolate_q15( /* Loop over the Interpolation factor. */ i = S->L; - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ sum = 0; @@ -238,7 +238,7 @@ void ref_fir_interpolate_q15( /* Loop over the polyPhase length */ tapCnt = (uint32_t)phaseLen; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the coefficient */ c0 = *ptr2; @@ -278,9 +278,9 @@ void ref_fir_interpolate_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = (uint32_t) phaseLen - 1u; + i = (uint32_t) phaseLen - 1U; - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_lattice.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_lattice.c index 5ba260f4..b7178a74 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_lattice.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_lattice.c @@ -18,7 +18,7 @@ void ref_fir_lattice_f32( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurr = *pSrc++; @@ -45,10 +45,10 @@ void ref_fir_lattice_f32( for next stage processing */ fcurr = fnext; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* read g2(n) from state buffer */ gcurr = *px; @@ -94,7 +94,7 @@ void ref_fir_lattice_q31( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurr = *pSrc++; @@ -120,10 +120,10 @@ void ref_fir_lattice_q31( for next stage processing */ fcurr = fnext; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* read g2(n) from state buffer */ gcurr = *px; @@ -171,7 +171,7 @@ void ref_fir_lattice_q15( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurnt = *pSrc++; @@ -187,12 +187,12 @@ void ref_fir_lattice_q15( /* for sample 1 processing */ /* f1(n) = f0(n) + K1 * g0(n-1) */ - fnext = ((gcurnt * (*pk)) >> 15u) + fcurnt; + fnext = ((gcurnt * (*pk)) >> 15U) + fcurnt; fnext = ref_sat_q15(fnext); /* g1(n) = f0(n) * K1 + g0(n-1) */ - gnext = ((fcurnt * (*pk++)) >> 15u) + gcurnt; + gnext = ((fcurnt * (*pk++)) >> 15U) + gcurnt; gnext = ref_sat_q15(gnext); /* save f0(n) in state buffer */ @@ -202,10 +202,10 @@ void ref_fir_lattice_q15( for next stage processing */ fcurnt = fnext; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* read g1(n-1) from state buffer */ gcurnt = *px; @@ -215,11 +215,11 @@ void ref_fir_lattice_q15( /* Sample processing for K2, K3.... */ /* f2(n) = f1(n) + K2 * g1(n-1) */ - fnext = ((gcurnt * (*pk)) >> 15u) + fcurnt; + fnext = ((gcurnt * (*pk)) >> 15U) + fcurnt; fnext = ref_sat_q15(fnext); /* g2(n) = f1(n) * K2 + g1(n-1) */ - gnext = ((fcurnt * (*pk++)) >> 15u) + gcurnt; + gnext = ((fcurnt * (*pk++)) >> 15U) + gcurnt; gnext = ref_sat_q15(gnext); diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_sparse.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_sparse.c index 1f977b04..11e79f90 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_sparse.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/fir_sparse.c @@ -52,7 +52,7 @@ void ref_fir_sparse_f32( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiplications and store in destination buffer */ *pOut++ = *px++ * coeff; @@ -62,9 +62,9 @@ void ref_fir_sparse_f32( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 1u; + tapCnt = (uint32_t) numTaps - 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Load the coefficient value and * increment the coefficient buffer for the next set of state values */ @@ -95,7 +95,7 @@ void ref_fir_sparse_f32( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pOut++ += *px++ * coeff; @@ -162,7 +162,7 @@ void ref_fir_sparse_q31( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiplications and store in the destination buffer */ *pOut++ = (q31_t) (((q63_t) * px++ * coeff) >> 32); @@ -172,9 +172,9 @@ void ref_fir_sparse_q31( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 1u; + tapCnt = (uint32_t) numTaps - 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Load the coefficient value and * increment the coefficient buffer for the next set of state values */ @@ -205,7 +205,7 @@ void ref_fir_sparse_q31( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ out = *pOut; @@ -226,7 +226,7 @@ void ref_fir_sparse_q31( /* Output is converted into 1.31 format. */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { in = *pOut << 1; *pOut++ = in; @@ -290,7 +290,7 @@ void ref_fir_sparse_q15( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform multiplication and store in the scratch buffer */ *pScratchOut++ = ((q31_t) * px++ * coeff); @@ -300,9 +300,9 @@ void ref_fir_sparse_q15( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 1u; + tapCnt = (uint32_t) numTaps - 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Load the coefficient value and * increment the coefficient buffer for the next set of state values */ @@ -332,7 +332,7 @@ void ref_fir_sparse_q15( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pScratchOut++ += (q31_t) * px++ * coeff; @@ -350,7 +350,7 @@ void ref_fir_sparse_q15( /* Loop over the blockSize. */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { *pOut++ = (q15_t) __SSAT(*pScr2++ >> 15, 16); blkCnt--; @@ -413,7 +413,7 @@ void ref_fir_sparse_q7( /* Loop over the blockSize */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform multiplication and store in the scratch buffer */ *pScratchOut++ = ((q31_t) * px++ * coeff); @@ -423,9 +423,9 @@ void ref_fir_sparse_q7( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 1u; + tapCnt = (uint32_t) numTaps - 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Load the coefficient value and * increment the coefficient buffer for the next set of state values */ @@ -456,7 +456,7 @@ void ref_fir_sparse_q7( /* Loop over the blockSize */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ in = *pScratchOut + ((q31_t) * px++ * coeff); @@ -475,7 +475,7 @@ void ref_fir_sparse_q7( /* Loop over the blockSize. */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { *pOut++ = (q7_t) __SSAT(*pScr2++ >> 7, 8); diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/iir_lattice.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/iir_lattice.c index 0aa0cb3f..7a0c91f6 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/iir_lattice.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/iir_lattice.c @@ -18,7 +18,7 @@ void ref_iir_lattice_f32( pState = &S->pState[0]; /* Sample processing */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read Sample from input buffer */ /* fN(n) = x(n) */ @@ -38,7 +38,7 @@ void ref_iir_lattice_f32( /* Process sample for numStages */ tapCnt = numStages; - while (tapCnt > 0u) + while (tapCnt > 0U) { gcurr = *px1++; /* Process sample for last taps */ @@ -63,7 +63,7 @@ void ref_iir_lattice_f32( *pDst++ = acc; /* Advance the state pointer by 1 to process the next group of samples */ - pState = pState + 1u; + pState = pState + 1U; blkCnt--; } @@ -77,7 +77,7 @@ void ref_iir_lattice_f32( tapCnt = numStages; /* Copy the data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -104,7 +104,7 @@ void ref_iir_lattice_q31( pState = &S->pState[0]; /* Sample processing */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read Sample from input buffer */ /* fN(n) = x(n) */ @@ -123,7 +123,7 @@ void ref_iir_lattice_q31( tapCnt = numStages; - while (tapCnt > 0u) + while (tapCnt > 0U) { gcurr = *px1++; /* Process sample */ @@ -152,10 +152,10 @@ void ref_iir_lattice_q31( *px2++ = fnext; /* write out into pDst */ - *pDst++ = (q31_t) (acc >> 31u); + *pDst++ = (q31_t) (acc >> 31U); /* Advance the state pointer by 1 to process the next group of samples */ - pState = pState + 1u; + pState = pState + 1U; blkCnt--; } @@ -169,7 +169,7 @@ void ref_iir_lattice_q31( tapCnt = numStages; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -198,7 +198,7 @@ void ref_iir_lattice_q15( pState = &S->pState[0]; /* Sample processing */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read Sample from input buffer */ /* fN(n) = x(n) */ @@ -217,7 +217,7 @@ void ref_iir_lattice_q15( tapCnt = numStages; - while (tapCnt > 0u) + while (tapCnt > 0U) { gcurr = *px1++; /* Process sample */ @@ -248,7 +248,7 @@ void ref_iir_lattice_q15( *pDst++ = out; /* Advance the state pointer by 1 to process the next group of samples */ - pState = pState + 1u; + pState = pState + 1U; blkCnt--; } @@ -261,7 +261,7 @@ void ref_iir_lattice_q15( stgCnt = numStages; /* copy data */ - while (stgCnt > 0u) + while (stgCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/lms.c b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/lms.c index fd9c2bda..2b7f3def 100644 --- a/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/lms.c +++ b/DSP_Lib_TestSuite/RefLibs/src/FilteringFunctions/lms.c @@ -22,11 +22,11 @@ void ref_lms_f32( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[numTaps - 1u]); + pStateCurnt = &(S->pState[numTaps - 1U]); blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -99,9 +99,9 @@ void ref_lms_norm_f32( /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[numTaps - 1u]); + pStateCurnt = &(S->pState[numTaps - 1U]); - for(blkCnt = blockSize; blkCnt > 0u; blkCnt--) + for(blkCnt = blockSize; blkCnt > 0U; blkCnt--) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc; @@ -179,13 +179,13 @@ void ref_lms_q31( q31_t coef; /* Temporary variable for coef */ q31_t acc_l, acc_h; /* temporary input */ uint32_t uShift = (uint32_t)S->postShift + 1; - uint32_t lShift = 32u - uShift; /* Shift to be applied to the output */ + uint32_t lShift = 32U - uShift; /* Shift to be applied to the output */ /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - for(blkCnt = blockSize; blkCnt > 0u; blkCnt--) + for(blkCnt = blockSize; blkCnt > 0U; blkCnt--) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -202,7 +202,7 @@ void ref_lms_q31( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += (q63_t)(*px++) * (*pb++); @@ -241,7 +241,7 @@ void ref_lms_q31( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = (q31_t)(((q63_t) alpha * (*px++)) >> 32); @@ -260,11 +260,11 @@ void ref_lms_q31( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Copy (numTaps - 1u) samples */ + /* Copy (numTaps - 1U) samples */ tapCnt = numTaps - 1; /* Copy the data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -296,17 +296,17 @@ void ref_lms_norm_q31( q63_t errorXmu; /* Temporary variables to store error and mu product and reciprocal of energy */ q31_t coef; /* Temporary variable for coef */ q31_t acc_l, acc_h; /* temporary input */ - uint32_t uShift = ((uint32_t) S->postShift + 1u); - uint32_t lShift = 32u - uShift; /* Shift to be applied to the output */ + uint32_t uShift = ((uint32_t) S->postShift + 1U); + uint32_t lShift = 32U - uShift; /* Shift to be applied to the output */ energy = S->energy; x0 = S->x0; /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - for(blkCnt = blockSize; blkCnt > 0u; blkCnt--) + for(blkCnt = blockSize; blkCnt > 0U; blkCnt--) { /* Copy the new input sample into the state buffer */ @@ -331,7 +331,7 @@ void ref_lms_norm_q31( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += ((q63_t) (*px++)) * (*pb++); @@ -372,13 +372,13 @@ void ref_lms_norm_q31( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ /* coef is in 2.30 format */ coef = (q31_t)(((q63_t)w * (*px++)) >> 32); /* get coef in 1.31 format by left shifting */ - *pb = ref_sat_q31((q63_t)*pb + (coef << 1u)); + *pb = ref_sat_q31((q63_t)*pb + (coef << 1U)); /* update coefficient buffer to next coefficient */ pb++; @@ -404,11 +404,11 @@ void ref_lms_norm_q31( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Loop for (numTaps - 1u) samples copy */ + /* Loop for (numTaps - 1U) samples copy */ tapCnt = numTaps - 1; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -443,9 +443,9 @@ void ref_lms_q15( /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - for(blkCnt = blockSize; blkCnt > 0u; blkCnt--) + for(blkCnt = blockSize; blkCnt > 0U; blkCnt--) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -462,7 +462,7 @@ void ref_lms_q15( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += (q63_t)((q31_t)(*px++) * (*pb++)); @@ -504,7 +504,7 @@ void ref_lms_q15( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = (q31_t) * pb + (((q31_t) alpha * (*px++)) >> 15); @@ -522,11 +522,11 @@ void ref_lms_q15( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Copy (numTaps - 1u) samples */ + /* Copy (numTaps - 1U) samples */ tapCnt = numTaps - 1; /* Copy the data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -568,9 +568,9 @@ void ref_lms_norm_q15( /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); - for(blkCnt = blockSize; blkCnt > 0u; blkCnt--) + for(blkCnt = blockSize; blkCnt > 0U; blkCnt--) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc; @@ -594,7 +594,7 @@ void ref_lms_norm_q15( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += (q31_t)*px++ * (*pb++); @@ -653,7 +653,7 @@ void ref_lms_norm_q15( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = *pb + (((q31_t)w * (*px++)) >> 15); @@ -667,7 +667,7 @@ void ref_lms_norm_q15( x0 = *pState; /* Advance state pointer by 1 for the next sample */ - pState = pState + 1u; + pState = pState + 1U; } /* Save energy and x0 values for the next frame */ @@ -681,11 +681,11 @@ void ref_lms_norm_q15( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* copy (numTaps - 1u) data */ + /* copy (numTaps - 1U) data */ tapCnt = numTaps - 1; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Include/arm_math.h b/Include/arm_math.h index 6d754018..4c1d4ea1 100644 --- a/Include/arm_math.h +++ b/Include/arm_math.h @@ -590,8 +590,8 @@ extern "C" while ((data & mask) == 0) { - count += 1u; - mask = mask >> 1u; + count += 1U; + mask = mask >> 1U; } return (count); @@ -633,7 +633,7 @@ extern "C" /* calculation of reciprocal value */ /* running approximation for two iterations */ - for (i = 0u; i < 2u; i++) + for (i = 0U; i < 2U; i++) { tempVal = (uint32_t) (((q63_t) in * out) >> 31); tempVal = 0x7FFFFFFFu - tempVal; @@ -646,7 +646,7 @@ extern "C" *dst = out; /* return num of signbits of out = 1/in value */ - return (signBits + 1u); + return (signBits + 1U); } @@ -684,7 +684,7 @@ extern "C" /* calculation of reciprocal value */ /* running approximation for two iterations */ - for (i = 0u; i < 2u; i++) + for (i = 0U; i < 2U; i++) { tempVal = (uint32_t) (((q31_t) in * out) >> 15); tempVal = 0x7FFFu - tempVal; @@ -4924,7 +4924,7 @@ void arm_rfft_fast_f32( acc += (q63_t) S->A2 * S->state[1]; /* convert output to 1.31 format to add y[n-1] */ - out = (q31_t) (acc >> 31u); + out = (q31_t) (acc >> 31U); /* out += y[n-1] */ out += S->state[2]; @@ -5608,7 +5608,7 @@ void arm_rfft_fast_f32( y += ((q31_t) (((q63_t) y1 * fract) >> 32)); /* Convert y to 1.31 format */ - return (y << 1u); + return (y << 1U); } } @@ -5892,7 +5892,7 @@ void arm_rfft_fast_f32( int32_t srcInc, uint32_t blockSize) { - uint32_t i = 0u; + uint32_t i = 0U; int32_t wOffset; /* Copy the value of Index pointer that points @@ -5902,7 +5902,7 @@ void arm_rfft_fast_f32( /* Loop over the blockSize */ i = blockSize; - while (i > 0u) + while (i > 0U) { /* copy the input sample to the circular buffer */ circBuffer[wOffset] = *src; @@ -5939,7 +5939,7 @@ void arm_rfft_fast_f32( int32_t dstInc, uint32_t blockSize) { - uint32_t i = 0u; + uint32_t i = 0U; int32_t rOffset, dst_end; /* Copy the value of Index pointer that points @@ -5950,7 +5950,7 @@ void arm_rfft_fast_f32( /* Loop over the blockSize */ i = blockSize; - while (i > 0u) + while (i > 0U) { /* copy the sample from the circular buffer to the destination buffer */ *dst = circBuffer[rOffset]; @@ -5992,7 +5992,7 @@ void arm_rfft_fast_f32( int32_t srcInc, uint32_t blockSize) { - uint32_t i = 0u; + uint32_t i = 0U; int32_t wOffset; /* Copy the value of Index pointer that points @@ -6002,7 +6002,7 @@ void arm_rfft_fast_f32( /* Loop over the blockSize */ i = blockSize; - while (i > 0u) + while (i > 0U) { /* copy the input sample to the circular buffer */ circBuffer[wOffset] = *src; @@ -6050,7 +6050,7 @@ void arm_rfft_fast_f32( /* Loop over the blockSize */ i = blockSize; - while (i > 0u) + while (i > 0U) { /* copy the sample from the circular buffer to the destination buffer */ *dst = circBuffer[rOffset]; @@ -6092,7 +6092,7 @@ void arm_rfft_fast_f32( int32_t srcInc, uint32_t blockSize) { - uint32_t i = 0u; + uint32_t i = 0U; int32_t wOffset; /* Copy the value of Index pointer that points @@ -6102,7 +6102,7 @@ void arm_rfft_fast_f32( /* Loop over the blockSize */ i = blockSize; - while (i > 0u) + while (i > 0U) { /* copy the input sample to the circular buffer */ circBuffer[wOffset] = *src; @@ -6150,7 +6150,7 @@ void arm_rfft_fast_f32( /* Loop over the blockSize */ i = blockSize; - while (i > 0u) + while (i > 0U) { /* copy the sample from the circular buffer to the destination buffer */ *dst = circBuffer[rOffset]; @@ -6928,7 +6928,7 @@ void arm_rfft_fast_f32( /* 20 bits for the fractional part */ /* shift left xfract by 11 to keep 1.31 format */ - xfract = (X & 0x000FFFFF) << 11u; + xfract = (X & 0x000FFFFF) << 11U; /* Read two nearest output values from the index */ x1 = pYData[(rI) + (int32_t)nCols * (cI) ]; @@ -6936,7 +6936,7 @@ void arm_rfft_fast_f32( /* 20 bits for the fractional part */ /* shift left yfract by 11 to keep 1.31 format */ - yfract = (Y & 0x000FFFFF) << 11u; + yfract = (Y & 0x000FFFFF) << 11U; /* Read two nearest output values from the index */ y1 = pYData[(rI) + (int32_t)nCols * (cI + 1) ]; @@ -7020,19 +7020,19 @@ void arm_rfft_fast_f32( /* x1 is in 1.15(q15), xfract in 12.20 format and out is in 13.35 format */ /* convert 13.35 to 13.31 by right shifting and out is in 1.31 */ - out = (q31_t) (((q63_t) x1 * (0xFFFFF - xfract)) >> 4u); + out = (q31_t) (((q63_t) x1 * (0xFFFFF - xfract)) >> 4U); acc = ((q63_t) out * (0xFFFFF - yfract)); /* x2 * (xfract) * (1-yfract) in 1.51 and adding to acc */ - out = (q31_t) (((q63_t) x2 * (0xFFFFF - yfract)) >> 4u); + out = (q31_t) (((q63_t) x2 * (0xFFFFF - yfract)) >> 4U); acc += ((q63_t) out * (xfract)); /* y1 * (1 - xfract) * (yfract) in 1.51 and adding to acc */ - out = (q31_t) (((q63_t) y1 * (0xFFFFF - xfract)) >> 4u); + out = (q31_t) (((q63_t) y1 * (0xFFFFF - xfract)) >> 4U); acc += ((q63_t) out * (yfract)); /* y2 * (xfract) * (yfract) in 1.51 and adding to acc */ - out = (q31_t) (((q63_t) y2 * (xfract)) >> 4u); + out = (q31_t) (((q63_t) y2 * (xfract)) >> 4U); acc += ((q63_t) out * (yfract)); /* acc is in 13.51 format and down shift acc by 36 times */ diff --git a/Source/BasicMathFunctions/arm_abs_f32.c b/Source/BasicMathFunctions/arm_abs_f32.c index fbdfd8f4..f88ef95e 100644 --- a/Source/BasicMathFunctions/arm_abs_f32.c +++ b/Source/BasicMathFunctions/arm_abs_f32.c @@ -73,11 +73,11 @@ void arm_abs_f32( float32_t in1, in2, in3, in4; /* temporary variables */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = |A| */ /* Calculate absolute and then store the results in the destination buffer. */ @@ -115,10 +115,10 @@ void arm_abs_f32( /* Update source pointer to process next sampels */ - pSrc += 4u; + pSrc += 4U; /* Update destination pointer to process next sampels */ - pDst += 4u; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -126,7 +126,7 @@ void arm_abs_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -137,7 +137,7 @@ void arm_abs_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = |A| */ /* Calculate absolute and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_abs_q15.c b/Source/BasicMathFunctions/arm_abs_q15.c index a084a358..ec47fff0 100644 --- a/Source/BasicMathFunctions/arm_abs_q15.c +++ b/Source/BasicMathFunctions/arm_abs_q15.c @@ -67,12 +67,12 @@ void arm_abs_q15( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ simd = __SIMD32_CONST(pDst); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = |A| */ /* Read two inputs */ @@ -121,9 +121,9 @@ void arm_abs_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = |A| */ /* Read the input */ @@ -145,7 +145,7 @@ void arm_abs_q15( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = |A| */ /* Read the input */ diff --git a/Source/BasicMathFunctions/arm_abs_q31.c b/Source/BasicMathFunctions/arm_abs_q31.c index 75595c78..2733f51f 100644 --- a/Source/BasicMathFunctions/arm_abs_q31.c +++ b/Source/BasicMathFunctions/arm_abs_q31.c @@ -65,11 +65,11 @@ void arm_abs_q31( q31_t in1, in2, in3, in4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = |A| */ /* Calculate absolute of input (if -1 then saturated to 0x7fffffff) and then store the results in the destination buffer. */ @@ -89,7 +89,7 @@ void arm_abs_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -100,7 +100,7 @@ void arm_abs_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = |A| */ /* Calculate absolute value of the input (if -1 then saturated to 0x7fffffff) and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_abs_q7.c b/Source/BasicMathFunctions/arm_abs_q7.c index 19d91671..d0acbfc2 100644 --- a/Source/BasicMathFunctions/arm_abs_q7.c +++ b/Source/BasicMathFunctions/arm_abs_q7.c @@ -69,11 +69,11 @@ void arm_abs_q7( q31_t out1, out2, out3, out4; /* temporary output variables */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = |A| */ /* Read inputs */ @@ -109,8 +109,8 @@ void arm_abs_q7( *(pDst + 3) = (q7_t) out4; /* update pointers to process next samples */ - pSrc += 4u; - pDst += 4u; + pSrc += 4U; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -118,7 +118,7 @@ void arm_abs_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ @@ -126,7 +126,7 @@ void arm_abs_q7( #endif /* #define ARM_MATH_CM0_FAMILY */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = |A| */ /* Read the input */ diff --git a/Source/BasicMathFunctions/arm_add_f32.c b/Source/BasicMathFunctions/arm_add_f32.c index 91512611..78feb648 100644 --- a/Source/BasicMathFunctions/arm_add_f32.c +++ b/Source/BasicMathFunctions/arm_add_f32.c @@ -73,11 +73,11 @@ void arm_add_f32( float32_t inB1, inB2, inB3, inB4; /* temporary input variables */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ @@ -100,9 +100,9 @@ void arm_add_f32( *(pDst + 3) = inA4 + inB4; /* update pointers to process next samples */ - pSrcA += 4u; - pSrcB += 4u; - pDst += 4u; + pSrcA += 4U; + pSrcB += 4U; + pDst += 4U; /* Decrement the loop counter */ @@ -111,7 +111,7 @@ void arm_add_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -122,7 +122,7 @@ void arm_add_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_add_q15.c b/Source/BasicMathFunctions/arm_add_q15.c index 111fbd2d..80a523fd 100644 --- a/Source/BasicMathFunctions/arm_add_q15.c +++ b/Source/BasicMathFunctions/arm_add_q15.c @@ -65,11 +65,11 @@ void arm_add_q15( q31_t inA1, inA2, inB1, inB2; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ @@ -87,9 +87,9 @@ void arm_add_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ @@ -108,7 +108,7 @@ void arm_add_q15( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_add_q31.c b/Source/BasicMathFunctions/arm_add_q31.c index 8b78fee4..c008bccc 100644 --- a/Source/BasicMathFunctions/arm_add_q31.c +++ b/Source/BasicMathFunctions/arm_add_q31.c @@ -67,11 +67,11 @@ void arm_add_q31( q31_t inB1, inB2, inB3, inB4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ @@ -96,9 +96,9 @@ void arm_add_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ @@ -117,7 +117,7 @@ void arm_add_q31( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_add_q7.c b/Source/BasicMathFunctions/arm_add_q7.c index 903d1edc..ab4e7856 100644 --- a/Source/BasicMathFunctions/arm_add_q7.c +++ b/Source/BasicMathFunctions/arm_add_q7.c @@ -65,11 +65,11 @@ void arm_add_q7( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ @@ -81,9 +81,9 @@ void arm_add_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ @@ -102,7 +102,7 @@ void arm_add_q7( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + B */ /* Add and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_dot_prod_f32.c b/Source/BasicMathFunctions/arm_dot_prod_f32.c index bcb24706..0cd0afc4 100644 --- a/Source/BasicMathFunctions/arm_dot_prod_f32.c +++ b/Source/BasicMathFunctions/arm_dot_prod_f32.c @@ -74,11 +74,11 @@ void arm_dot_prod_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Calculate dot product and then store the result in a temporary buffer */ @@ -93,7 +93,7 @@ void arm_dot_prod_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -105,7 +105,7 @@ void arm_dot_prod_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Calculate dot product and then store the result in a temporary buffer. */ diff --git a/Source/BasicMathFunctions/arm_dot_prod_q15.c b/Source/BasicMathFunctions/arm_dot_prod_q15.c index c15c8b87..dec4ec5f 100644 --- a/Source/BasicMathFunctions/arm_dot_prod_q15.c +++ b/Source/BasicMathFunctions/arm_dot_prod_q15.c @@ -69,11 +69,11 @@ void arm_dot_prod_q15( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Calculate dot product and then store the result in a temporary buffer. */ @@ -86,9 +86,9 @@ void arm_dot_prod_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Calculate dot product and then store the results in a temporary buffer. */ @@ -106,7 +106,7 @@ void arm_dot_prod_q15( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Calculate dot product and then store the results in a temporary buffer. */ diff --git a/Source/BasicMathFunctions/arm_dot_prod_q31.c b/Source/BasicMathFunctions/arm_dot_prod_q31.c index 4f1bc584..67ae8874 100644 --- a/Source/BasicMathFunctions/arm_dot_prod_q31.c +++ b/Source/BasicMathFunctions/arm_dot_prod_q31.c @@ -72,11 +72,11 @@ void arm_dot_prod_q31( q31_t inB1, inB2, inB3, inB4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Calculate dot product and then store the result in a temporary buffer. */ @@ -89,10 +89,10 @@ void arm_dot_prod_q31( inB3 = *pSrcB++; inB4 = *pSrcB++; - sum += ((q63_t) inA1 * inB1) >> 14u; - sum += ((q63_t) inA2 * inB2) >> 14u; - sum += ((q63_t) inA3 * inB3) >> 14u; - sum += ((q63_t) inA4 * inB4) >> 14u; + sum += ((q63_t) inA1 * inB1) >> 14U; + sum += ((q63_t) inA2 * inB2) >> 14U; + sum += ((q63_t) inA3 * inB3) >> 14U; + sum += ((q63_t) inA4 * inB4) >> 14U; /* Decrement the loop counter */ blkCnt--; @@ -100,7 +100,7 @@ void arm_dot_prod_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -112,11 +112,11 @@ void arm_dot_prod_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Calculate dot product and then store the result in a temporary buffer. */ - sum += ((q63_t) * pSrcA++ * *pSrcB++) >> 14u; + sum += ((q63_t) * pSrcA++ * *pSrcB++) >> 14U; /* Decrement the loop counter */ blkCnt--; diff --git a/Source/BasicMathFunctions/arm_dot_prod_q7.c b/Source/BasicMathFunctions/arm_dot_prod_q7.c index cd3c5099..487efe39 100644 --- a/Source/BasicMathFunctions/arm_dot_prod_q7.c +++ b/Source/BasicMathFunctions/arm_dot_prod_q7.c @@ -74,11 +74,11 @@ void arm_dot_prod_q7( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* read 4 samples at a time from sourceA */ input1 = *__SIMD32(pSrcA)++; @@ -104,9 +104,9 @@ void arm_dot_prod_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Dot product and then store the results in a temporary buffer. */ @@ -125,7 +125,7 @@ void arm_dot_prod_q7( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0]* B[0] + A[1]* B[1] + A[2]* B[2] + .....+ A[blockSize-1]* B[blockSize-1] */ /* Dot product and then store the results in a temporary buffer. */ diff --git a/Source/BasicMathFunctions/arm_mult_f32.c b/Source/BasicMathFunctions/arm_mult_f32.c index c3a9ff0e..e4a9ef2d 100644 --- a/Source/BasicMathFunctions/arm_mult_f32.c +++ b/Source/BasicMathFunctions/arm_mult_f32.c @@ -73,11 +73,11 @@ void arm_mult_f32( float32_t out1, out2, out3, out4; /* temporary output variables */ /* loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * B */ /* Multiply the inputs and store the results in output buffer */ @@ -125,9 +125,9 @@ void arm_mult_f32( /* update pointers to process next samples */ - pSrcA += 4u; - pSrcB += 4u; - pDst += 4u; + pSrcA += 4U; + pSrcB += 4U; + pDst += 4U; /* Decrement the blockSize loop counter */ blkCnt--; @@ -135,7 +135,7 @@ void arm_mult_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -146,7 +146,7 @@ void arm_mult_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * B */ /* Multiply the inputs and store the results in output buffer */ diff --git a/Source/BasicMathFunctions/arm_mult_q15.c b/Source/BasicMathFunctions/arm_mult_q15.c index bdb757ee..8e20963b 100644 --- a/Source/BasicMathFunctions/arm_mult_q15.c +++ b/Source/BasicMathFunctions/arm_mult_q15.c @@ -68,11 +68,11 @@ void arm_mult_q15( q31_t mul1, mul2, mul3, mul4; /* temporary variables */ /* loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* read two samples at a time from sourceA */ inA1 = *__SIMD32(pSrcA)++; @@ -114,7 +114,7 @@ void arm_mult_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -126,7 +126,7 @@ void arm_mult_q15( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * B */ /* Multiply the inputs and store the result in the destination buffer */ diff --git a/Source/BasicMathFunctions/arm_mult_q31.c b/Source/BasicMathFunctions/arm_mult_q31.c index f13a1a38..c302b016 100644 --- a/Source/BasicMathFunctions/arm_mult_q31.c +++ b/Source/BasicMathFunctions/arm_mult_q31.c @@ -67,11 +67,11 @@ void arm_mult_q31( q31_t out1, out2, out3, out4; /* temporary output variables */ /* loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * B */ /* Multiply the inputs and then store the results in the destination buffer. */ @@ -94,10 +94,10 @@ void arm_mult_q31( out3 = __SSAT(out3, 31); out4 = __SSAT(out4, 31); - *pDst++ = out1 << 1u; - *pDst++ = out2 << 1u; - *pDst++ = out3 << 1u; - *pDst++ = out4 << 1u; + *pDst++ = out1 << 1U; + *pDst++ = out2 << 1U; + *pDst++ = out3 << 1U; + *pDst++ = out4 << 1U; /* Decrement the blockSize loop counter */ blkCnt--; @@ -105,9 +105,9 @@ void arm_mult_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * B */ /* Multiply the inputs and then store the results in the destination buffer. */ @@ -115,7 +115,7 @@ void arm_mult_q31( inB1 = *pSrcB++; out1 = ((q63_t) inA1 * inB1) >> 32; out1 = __SSAT(out1, 31); - *pDst++ = out1 << 1u; + *pDst++ = out1 << 1U; /* Decrement the blockSize loop counter */ blkCnt--; @@ -129,7 +129,7 @@ void arm_mult_q31( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * B */ /* Multiply the inputs and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_mult_q7.c b/Source/BasicMathFunctions/arm_mult_q7.c index 7d4c192e..d8a2f8a1 100644 --- a/Source/BasicMathFunctions/arm_mult_q7.c +++ b/Source/BasicMathFunctions/arm_mult_q7.c @@ -65,11 +65,11 @@ void arm_mult_q7( q7_t out1, out2, out3, out4; /* Temporary variables to store the product */ /* loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * B */ /* Multiply the inputs and store the results in temporary variables */ @@ -87,7 +87,7 @@ void arm_mult_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -99,7 +99,7 @@ void arm_mult_q7( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * B */ /* Multiply the inputs and store the result in the destination buffer */ diff --git a/Source/BasicMathFunctions/arm_negate_f32.c b/Source/BasicMathFunctions/arm_negate_f32.c index 91115cc8..e39624c3 100644 --- a/Source/BasicMathFunctions/arm_negate_f32.c +++ b/Source/BasicMathFunctions/arm_negate_f32.c @@ -73,11 +73,11 @@ void arm_negate_f32( float32_t in1, in2, in3, in4; /* temporary variables */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* read inputs from source */ in1 = *pSrc; @@ -98,8 +98,8 @@ void arm_negate_f32( *(pDst + 3) = in4; /* update pointers to process next samples */ - pSrc += 4u; - pDst += 4u; + pSrc += 4U; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -107,7 +107,7 @@ void arm_negate_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -118,7 +118,7 @@ void arm_negate_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = -A */ /* Negate and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_negate_q15.c b/Source/BasicMathFunctions/arm_negate_q15.c index dac68fe4..9624160f 100644 --- a/Source/BasicMathFunctions/arm_negate_q15.c +++ b/Source/BasicMathFunctions/arm_negate_q15.c @@ -70,11 +70,11 @@ void arm_negate_q15( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = -A */ /* Read two inputs at a time */ @@ -94,8 +94,8 @@ void arm_negate_q15( /* update pointers to process next samples */ - pSrc += 4u; - pDst += 4u; + pSrc += 4U; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -103,7 +103,7 @@ void arm_negate_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -114,7 +114,7 @@ void arm_negate_q15( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = -A */ /* Negate and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_negate_q31.c b/Source/BasicMathFunctions/arm_negate_q31.c index 53cfa775..4a5a58d7 100644 --- a/Source/BasicMathFunctions/arm_negate_q31.c +++ b/Source/BasicMathFunctions/arm_negate_q31.c @@ -64,11 +64,11 @@ void arm_negate_q31( q31_t in1, in2, in3, in4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = -A */ /* Negate and then store the results in the destination buffer. */ @@ -88,7 +88,7 @@ void arm_negate_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -100,7 +100,7 @@ void arm_negate_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = -A */ /* Negate and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_negate_q7.c b/Source/BasicMathFunctions/arm_negate_q7.c index d457e275..d72c3171 100644 --- a/Source/BasicMathFunctions/arm_negate_q7.c +++ b/Source/BasicMathFunctions/arm_negate_q7.c @@ -66,11 +66,11 @@ void arm_negate_q7( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = -A */ /* Read four inputs */ @@ -85,7 +85,7 @@ void arm_negate_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -96,7 +96,7 @@ void arm_negate_q7( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = -A */ /* Negate and then store the results in the destination buffer. */ \ diff --git a/Source/BasicMathFunctions/arm_offset_f32.c b/Source/BasicMathFunctions/arm_offset_f32.c index a929f8dd..ebc20a47 100644 --- a/Source/BasicMathFunctions/arm_offset_f32.c +++ b/Source/BasicMathFunctions/arm_offset_f32.c @@ -75,11 +75,11 @@ void arm_offset_f32( float32_t in1, in2, in3, in4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the results in the destination buffer. */ @@ -118,8 +118,8 @@ void arm_offset_f32( *(pDst + 3) = in4; /* update pointers to process next samples */ - pSrc += 4u; - pDst += 4u; + pSrc += 4U; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -127,7 +127,7 @@ void arm_offset_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -138,7 +138,7 @@ void arm_offset_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_offset_q15.c b/Source/BasicMathFunctions/arm_offset_q15.c index 6508c15e..dab0b10d 100644 --- a/Source/BasicMathFunctions/arm_offset_q15.c +++ b/Source/BasicMathFunctions/arm_offset_q15.c @@ -66,14 +66,14 @@ void arm_offset_q15( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* Offset is packed to 32 bit in order to use SIMD32 for addition */ offset_packed = __PKHBT(offset, offset, 16); /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the results in the destination buffer, 2 samples at a time. */ @@ -86,9 +86,9 @@ void arm_offset_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the results in the destination buffer. */ @@ -105,7 +105,7 @@ void arm_offset_q15( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_offset_q31.c b/Source/BasicMathFunctions/arm_offset_q31.c index 35d9c2eb..655426e5 100644 --- a/Source/BasicMathFunctions/arm_offset_q31.c +++ b/Source/BasicMathFunctions/arm_offset_q31.c @@ -66,11 +66,11 @@ void arm_offset_q31( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the results in the destination buffer. */ @@ -90,9 +90,9 @@ void arm_offset_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the result in the destination buffer. */ @@ -109,7 +109,7 @@ void arm_offset_q31( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_offset_q7.c b/Source/BasicMathFunctions/arm_offset_q7.c index 1e76b49c..5de62412 100644 --- a/Source/BasicMathFunctions/arm_offset_q7.c +++ b/Source/BasicMathFunctions/arm_offset_q7.c @@ -66,14 +66,14 @@ void arm_offset_q7( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* Offset is packed to 32 bit in order to use SIMD32 for addition */ offset_packed = __PACKq7(offset, offset, offset, offset); /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the results in the destination bufferfor 4 samples at a time. */ @@ -85,9 +85,9 @@ void arm_offset_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the result in the destination buffer. */ @@ -104,7 +104,7 @@ void arm_offset_q7( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A + offset */ /* Add offset and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_scale_f32.c b/Source/BasicMathFunctions/arm_scale_f32.c index 9c4202a8..c90c0378 100644 --- a/Source/BasicMathFunctions/arm_scale_f32.c +++ b/Source/BasicMathFunctions/arm_scale_f32.c @@ -87,11 +87,11 @@ void arm_scale_f32( float32_t in1, in2, in3, in4; /* temporary variabels */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * scale */ /* Scale the input and then store the results in the destination buffer. */ @@ -121,8 +121,8 @@ void arm_scale_f32( *(pDst + 3) = in4; /* update pointers to process next samples */ - pSrc += 4u; - pDst += 4u; + pSrc += 4U; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -130,7 +130,7 @@ void arm_scale_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -141,7 +141,7 @@ void arm_scale_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * scale */ /* Scale the input and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_scale_q15.c b/Source/BasicMathFunctions/arm_scale_q15.c index cd11e284..9d5727db 100644 --- a/Source/BasicMathFunctions/arm_scale_q15.c +++ b/Source/BasicMathFunctions/arm_scale_q15.c @@ -72,11 +72,11 @@ void arm_scale_q15( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Reading 2 inputs from memory */ inA1 = *__SIMD32(pSrc)++; @@ -112,9 +112,9 @@ void arm_scale_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * scale */ /* Scale the input and then store the result in the destination buffer. */ @@ -131,7 +131,7 @@ void arm_scale_q15( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * scale */ /* Scale the input and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_scale_q31.c b/Source/BasicMathFunctions/arm_scale_q31.c index 34d8b966..e89524d7 100644 --- a/Source/BasicMathFunctions/arm_scale_q31.c +++ b/Source/BasicMathFunctions/arm_scale_q31.c @@ -73,13 +73,13 @@ void arm_scale_q31( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; - if (sign == 0u) + if (sign == 0U) { /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* read four inputs from source */ in1 = *pSrc; @@ -121,8 +121,8 @@ void arm_scale_q31( *(pDst + 3) = out4; /* Update pointers to process next sampels */ - pSrc += 4u; - pDst += 4u; + pSrc += 4U; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -133,7 +133,7 @@ void arm_scale_q31( { /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* read four inputs from source */ in1 = *pSrc; @@ -162,8 +162,8 @@ void arm_scale_q31( *(pDst + 3) = out4; /* Update pointers to process next sampels */ - pSrc += 4u; - pDst += 4u; + pSrc += 4U; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -171,7 +171,7 @@ void arm_scale_q31( } /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -184,7 +184,7 @@ void arm_scale_q31( if (sign == 0) { - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * scale */ /* Scale the input and then store the result in the destination buffer. */ @@ -204,7 +204,7 @@ void arm_scale_q31( } else { - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * scale */ /* Scale the input and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_scale_q7.c b/Source/BasicMathFunctions/arm_scale_q7.c index a8263215..6cf1bbb5 100644 --- a/Source/BasicMathFunctions/arm_scale_q7.c +++ b/Source/BasicMathFunctions/arm_scale_q7.c @@ -69,12 +69,12 @@ void arm_scale_q7( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Reading 4 inputs from memory */ in1 = *pSrc++; @@ -99,9 +99,9 @@ void arm_scale_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * scale */ /* Scale the input and then store the result in the destination buffer. */ @@ -118,7 +118,7 @@ void arm_scale_q7( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A * scale */ /* Scale the input and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_shift_q15.c b/Source/BasicMathFunctions/arm_shift_q15.c index e1f89822..d2cd0377 100644 --- a/Source/BasicMathFunctions/arm_shift_q15.c +++ b/Source/BasicMathFunctions/arm_shift_q15.c @@ -68,17 +68,17 @@ void arm_shift_q15( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* Getting the sign of shiftBits */ sign = (shiftBits & 0x80); /* If the shift value is positive then do right shift else left shift */ - if (sign == 0u) + if (sign == 0U) { /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read 2 inputs */ in1 = *pSrc++; @@ -118,9 +118,9 @@ void arm_shift_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A << shiftBits */ /* Shift and then store the results in the destination buffer. */ @@ -134,7 +134,7 @@ void arm_shift_q15( { /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read 2 inputs */ in1 = *pSrc++; @@ -175,9 +175,9 @@ void arm_shift_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A >> shiftBits */ /* Shift the inputs and then store the results in the destination buffer. */ @@ -196,12 +196,12 @@ void arm_shift_q15( sign = (shiftBits & 0x80); /* If the shift value is positive then do right shift else left shift */ - if (sign == 0u) + if (sign == 0U) { /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A << shiftBits */ /* Shift and then store the results in the destination buffer. */ @@ -216,7 +216,7 @@ void arm_shift_q15( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A >> shiftBits */ /* Shift the inputs and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_shift_q31.c b/Source/BasicMathFunctions/arm_shift_q31.c index e495625e..7e728d4e 100644 --- a/Source/BasicMathFunctions/arm_shift_q31.c +++ b/Source/BasicMathFunctions/arm_shift_q31.c @@ -84,14 +84,14 @@ void arm_shift_q31( q31_t out1, out2, out3, out4; /* Temporary output variables */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; - if (sign == 0u) + if (sign == 0U) { /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A << shiftBits */ /* Shift the input and then store the results in the destination buffer. */ @@ -122,8 +122,8 @@ void arm_shift_q31( *(pDst + 3) = out4; /* Update destination pointer to process next sampels */ - pSrc += 4u; - pDst += 4u; + pSrc += 4U; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -134,7 +134,7 @@ void arm_shift_q31( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A >> shiftBits */ /* Shift the input and then store the results in the destination buffer. */ @@ -149,8 +149,8 @@ void arm_shift_q31( *(pDst + 3) = (in4 >> -shiftBits); - pSrc += 4u; - pDst += 4u; + pSrc += 4U; + pDst += 4U; blkCnt--; } @@ -159,7 +159,7 @@ void arm_shift_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -172,11 +172,11 @@ void arm_shift_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A (>> or <<) shiftBits */ /* Shift the input and then store the result in the destination buffer. */ - *pDst++ = (sign == 0u) ? clip_q63_to_q31((q63_t) * pSrc++ << shiftBits) : + *pDst++ = (sign == 0U) ? clip_q63_to_q31((q63_t) * pSrc++ << shiftBits) : (*pSrc++ >> -shiftBits); /* Decrement the loop counter */ diff --git a/Source/BasicMathFunctions/arm_shift_q7.c b/Source/BasicMathFunctions/arm_shift_q7.c index 6080cb98..fd508b47 100644 --- a/Source/BasicMathFunctions/arm_shift_q7.c +++ b/Source/BasicMathFunctions/arm_shift_q7.c @@ -75,17 +75,17 @@ void arm_shift_q7( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* Getting the sign of shiftBits */ sign = (shiftBits & 0x80); /* If the shift value is positive then do right shift else left shift */ - if (sign == 0u) + if (sign == 0U) { /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A << shiftBits */ /* Read 4 inputs */ @@ -100,7 +100,7 @@ void arm_shift_q7( __SSAT((in3 << shiftBits), 8), __SSAT((in4 << shiftBits), 8)); /* Update source pointer to process next sampels */ - pSrc += 4u; + pSrc += 4U; /* Decrement the loop counter */ blkCnt--; @@ -108,9 +108,9 @@ void arm_shift_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A << shiftBits */ /* Shift the input and then store the result in the destination buffer. */ @@ -125,7 +125,7 @@ void arm_shift_q7( shiftBits = -shiftBits; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A >> shiftBits */ /* Read 4 inputs */ @@ -139,7 +139,7 @@ void arm_shift_q7( (in3 >> shiftBits), (in4 >> shiftBits)); - pSrc += 4u; + pSrc += 4U; /* Decrement the loop counter */ blkCnt--; @@ -147,9 +147,9 @@ void arm_shift_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A >> shiftBits */ /* Shift the input and then store the result in the destination buffer. */ @@ -169,12 +169,12 @@ void arm_shift_q7( sign = (shiftBits & 0x80); /* If the shift value is positive then do right shift else left shift */ - if (sign == 0u) + if (sign == 0U) { /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A << shiftBits */ /* Shift the input and then store the result in the destination buffer. */ @@ -189,7 +189,7 @@ void arm_shift_q7( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A >> shiftBits */ /* Shift the input and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_sub_f32.c b/Source/BasicMathFunctions/arm_sub_f32.c index fe59c6e1..74a2944d 100644 --- a/Source/BasicMathFunctions/arm_sub_f32.c +++ b/Source/BasicMathFunctions/arm_sub_f32.c @@ -74,11 +74,11 @@ void arm_sub_f32( float32_t inB1, inB2, inB3, inB4; /* temporary variables */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the results in the destination buffer. */ @@ -101,9 +101,9 @@ void arm_sub_f32( /* Update pointers to process next sampels */ - pSrcA += 4u; - pSrcB += 4u; - pDst += 4u; + pSrcA += 4U; + pSrcB += 4U; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -111,7 +111,7 @@ void arm_sub_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -122,7 +122,7 @@ void arm_sub_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the results in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_sub_q15.c b/Source/BasicMathFunctions/arm_sub_q15.c index 758f9986..17942ebf 100644 --- a/Source/BasicMathFunctions/arm_sub_q15.c +++ b/Source/BasicMathFunctions/arm_sub_q15.c @@ -67,11 +67,11 @@ void arm_sub_q15( q31_t inB1, inB2; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the results in the destination buffer two samples at a time. */ @@ -89,9 +89,9 @@ void arm_sub_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the result in the destination buffer. */ @@ -108,7 +108,7 @@ void arm_sub_q15( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_sub_q31.c b/Source/BasicMathFunctions/arm_sub_q31.c index b63cada9..72b8597f 100644 --- a/Source/BasicMathFunctions/arm_sub_q31.c +++ b/Source/BasicMathFunctions/arm_sub_q31.c @@ -67,11 +67,11 @@ void arm_sub_q31( q31_t inB1, inB2, inB3, inB4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the results in the destination buffer. */ @@ -96,9 +96,9 @@ void arm_sub_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the result in the destination buffer. */ @@ -115,7 +115,7 @@ void arm_sub_q31( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the result in the destination buffer. */ diff --git a/Source/BasicMathFunctions/arm_sub_q7.c b/Source/BasicMathFunctions/arm_sub_q7.c index 8f625454..d211f405 100644 --- a/Source/BasicMathFunctions/arm_sub_q7.c +++ b/Source/BasicMathFunctions/arm_sub_q7.c @@ -64,11 +64,11 @@ void arm_sub_q7( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the results in the destination buffer 4 samples at a time. */ @@ -80,9 +80,9 @@ void arm_sub_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the result in the destination buffer. */ @@ -99,7 +99,7 @@ void arm_sub_q7( /* Initialize blkCnt with number of samples */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A - B */ /* Subtract and then store the result in the destination buffer. */ diff --git a/Source/CommonTables/arm_const_structs.c b/Source/CommonTables/arm_const_structs.c index b288a2b3..4f412623 100644 --- a/Source/CommonTables/arm_const_structs.c +++ b/Source/CommonTables/arm_const_structs.c @@ -143,49 +143,49 @@ const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096 = { /* Floating-point structs */ const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len32 = { { 16, twiddleCoef_32, armBitRevIndexTable32, ARMBITREVINDEXTABLE_16_TABLE_LENGTH }, - 32u, + 32U, (float32_t *)twiddleCoef_rfft_32 }; const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len64 = { { 32, twiddleCoef_32, armBitRevIndexTable32, ARMBITREVINDEXTABLE_32_TABLE_LENGTH }, - 64u, + 64U, (float32_t *)twiddleCoef_rfft_64 }; const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len128 = { { 64, twiddleCoef_64, armBitRevIndexTable64, ARMBITREVINDEXTABLE_64_TABLE_LENGTH }, - 128u, + 128U, (float32_t *)twiddleCoef_rfft_128 }; const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len256 = { { 128, twiddleCoef_128, armBitRevIndexTable128, ARMBITREVINDEXTABLE_128_TABLE_LENGTH }, - 256u, + 256U, (float32_t *)twiddleCoef_rfft_256 }; const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len512 = { { 256, twiddleCoef_256, armBitRevIndexTable256, ARMBITREVINDEXTABLE_256_TABLE_LENGTH }, - 512u, + 512U, (float32_t *)twiddleCoef_rfft_512 }; const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len1024 = { { 512, twiddleCoef_512, armBitRevIndexTable512, ARMBITREVINDEXTABLE_512_TABLE_LENGTH }, - 1024u, + 1024U, (float32_t *)twiddleCoef_rfft_1024 }; const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len2048 = { { 1024, twiddleCoef_1024, armBitRevIndexTable1024, ARMBITREVINDEXTABLE_1024_TABLE_LENGTH }, - 2048u, + 2048U, (float32_t *)twiddleCoef_rfft_2048 }; const arm_rfft_fast_instance_f32 arm_rfft_fast_sR_f32_len4096 = { { 2048, twiddleCoef_2048, armBitRevIndexTable2048, ARMBITREVINDEXTABLE_2048_TABLE_LENGTH }, - 4096u, + 4096U, (float32_t *)twiddleCoef_rfft_4096 }; @@ -195,90 +195,90 @@ extern const q31_t realCoefAQ31[8192]; extern const q31_t realCoefBQ31[8192]; const arm_rfft_instance_q31 arm_rfft_sR_q31_len32 = { - 32u, + 32U, 0, 1, - 256u, + 256U, (q31_t*)realCoefAQ31, (q31_t*)realCoefBQ31, &arm_cfft_sR_q31_len16 }; const arm_rfft_instance_q31 arm_rfft_sR_q31_len64 = { - 64u, + 64U, 0, 1, - 128u, + 128U, (q31_t*)realCoefAQ31, (q31_t*)realCoefBQ31, &arm_cfft_sR_q31_len32 }; const arm_rfft_instance_q31 arm_rfft_sR_q31_len128 = { - 128u, + 128U, 0, 1, - 64u, + 64U, (q31_t*)realCoefAQ31, (q31_t*)realCoefBQ31, &arm_cfft_sR_q31_len64 }; const arm_rfft_instance_q31 arm_rfft_sR_q31_len256 = { - 256u, + 256U, 0, 1, - 32u, + 32U, (q31_t*)realCoefAQ31, (q31_t*)realCoefBQ31, &arm_cfft_sR_q31_len128 }; const arm_rfft_instance_q31 arm_rfft_sR_q31_len512 = { - 512u, + 512U, 0, 1, - 16u, + 16U, (q31_t*)realCoefAQ31, (q31_t*)realCoefBQ31, &arm_cfft_sR_q31_len256 }; const arm_rfft_instance_q31 arm_rfft_sR_q31_len1024 = { - 1024u, + 1024U, 0, 1, - 8u, + 8U, (q31_t*)realCoefAQ31, (q31_t*)realCoefBQ31, &arm_cfft_sR_q31_len512 }; const arm_rfft_instance_q31 arm_rfft_sR_q31_len2048 = { - 2048u, + 2048U, 0, 1, - 4u, + 4U, (q31_t*)realCoefAQ31, (q31_t*)realCoefBQ31, &arm_cfft_sR_q31_len1024 }; const arm_rfft_instance_q31 arm_rfft_sR_q31_len4096 = { - 4096u, + 4096U, 0, 1, - 2u, + 2U, (q31_t*)realCoefAQ31, (q31_t*)realCoefBQ31, &arm_cfft_sR_q31_len2048 }; const arm_rfft_instance_q31 arm_rfft_sR_q31_len8192 = { - 8192u, + 8192U, 0, 1, - 1u, + 1U, (q31_t*)realCoefAQ31, (q31_t*)realCoefBQ31, &arm_cfft_sR_q31_len4096 @@ -289,90 +289,90 @@ extern const q15_t realCoefAQ15[8192]; extern const q15_t realCoefBQ15[8192]; const arm_rfft_instance_q15 arm_rfft_sR_q15_len32 = { - 32u, + 32U, 0, 1, - 256u, + 256U, (q15_t*)realCoefAQ15, (q15_t*)realCoefBQ15, &arm_cfft_sR_q15_len16 }; const arm_rfft_instance_q15 arm_rfft_sR_q15_len64 = { - 64u, + 64U, 0, 1, - 128u, + 128U, (q15_t*)realCoefAQ15, (q15_t*)realCoefBQ15, &arm_cfft_sR_q15_len32 }; const arm_rfft_instance_q15 arm_rfft_sR_q15_len128 = { - 128u, + 128U, 0, 1, - 64u, + 64U, (q15_t*)realCoefAQ15, (q15_t*)realCoefBQ15, &arm_cfft_sR_q15_len64 }; const arm_rfft_instance_q15 arm_rfft_sR_q15_len256 = { - 256u, + 256U, 0, 1, - 32u, + 32U, (q15_t*)realCoefAQ15, (q15_t*)realCoefBQ15, &arm_cfft_sR_q15_len128 }; const arm_rfft_instance_q15 arm_rfft_sR_q15_len512 = { - 512u, + 512U, 0, 1, - 16u, + 16U, (q15_t*)realCoefAQ15, (q15_t*)realCoefBQ15, &arm_cfft_sR_q15_len256 }; const arm_rfft_instance_q15 arm_rfft_sR_q15_len1024 = { - 1024u, + 1024U, 0, 1, - 8u, + 8U, (q15_t*)realCoefAQ15, (q15_t*)realCoefBQ15, &arm_cfft_sR_q15_len512 }; const arm_rfft_instance_q15 arm_rfft_sR_q15_len2048 = { - 2048u, + 2048U, 0, 1, - 4u, + 4U, (q15_t*)realCoefAQ15, (q15_t*)realCoefBQ15, &arm_cfft_sR_q15_len1024 }; const arm_rfft_instance_q15 arm_rfft_sR_q15_len4096 = { - 4096u, + 4096U, 0, 1, - 2u, + 2U, (q15_t*)realCoefAQ15, (q15_t*)realCoefBQ15, &arm_cfft_sR_q15_len2048 }; const arm_rfft_instance_q15 arm_rfft_sR_q15_len8192 = { - 8192u, + 8192U, 0, 1, - 1u, + 1U, (q15_t*)realCoefAQ15, (q15_t*)realCoefBQ15, &arm_cfft_sR_q15_len4096 diff --git a/Source/ComplexMathFunctions/arm_cmplx_conj_f32.c b/Source/ComplexMathFunctions/arm_cmplx_conj_f32.c index 955345c8..cfb6f1f9 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_conj_f32.c +++ b/Source/ComplexMathFunctions/arm_cmplx_conj_f32.c @@ -82,11 +82,11 @@ void arm_cmplx_conj_f32( float32_t inI1, inI2, inI3, inI4; /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0]+jC[1] = A[0]+ j (-1) A[1] */ /* Calculate Complex Conjugate and then store the results in the destination buffer. */ @@ -131,13 +131,13 @@ void arm_cmplx_conj_f32( pDst[5] = inI3; /* increment source pointer by 8 to process next sampels */ - pSrc += 8u; + pSrc += 8U; /* store imaginary sample to destination */ pDst[7] = inI4; /* increment destination pointer by 8 to store next samples */ - pDst += 8u; + pDst += 8U; /* Decrement the loop counter */ blkCnt--; @@ -145,7 +145,7 @@ void arm_cmplx_conj_f32( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -154,7 +154,7 @@ void arm_cmplx_conj_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* realOut + j (imagOut) = realIn + j (-1) imagIn */ /* Calculate Complex Conjugate and then store the results in the destination buffer. */ diff --git a/Source/ComplexMathFunctions/arm_cmplx_conj_q15.c b/Source/ComplexMathFunctions/arm_cmplx_conj_q15.c index 77ce9b95..79502297 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_conj_q15.c +++ b/Source/ComplexMathFunctions/arm_cmplx_conj_q15.c @@ -64,11 +64,11 @@ void arm_cmplx_conj_q15( q31_t zero = 0; /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0]+jC[1] = A[0]+ j (-1) A[1] */ /* Calculate Complex Conjugate and then store the results in the destination buffer. */ @@ -109,9 +109,9 @@ void arm_cmplx_conj_q15( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0]+jC[1] = A[0]+ j (-1) A[1] */ /* Calculate Complex Conjugate and then store the results in the destination buffer. */ @@ -128,7 +128,7 @@ void arm_cmplx_conj_q15( /* Run the below code for Cortex-M0 */ - while (numSamples > 0u) + while (numSamples > 0U) { /* realOut + j (imagOut) = realIn+ j (-1) imagIn */ /* Calculate Complex Conjugate and then store the results in the destination buffer. */ diff --git a/Source/ComplexMathFunctions/arm_cmplx_conj_q31.c b/Source/ComplexMathFunctions/arm_cmplx_conj_q31.c index f9f100cb..709ce0e0 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_conj_q31.c +++ b/Source/ComplexMathFunctions/arm_cmplx_conj_q31.c @@ -65,11 +65,11 @@ void arm_cmplx_conj_q31( q31_t inI1, inI2, inI3, inI4; /* Temporary imaginary variables */ /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0]+jC[1] = A[0]+ j (-1) A[1] */ /* Calculate Complex Conjugate and then store the results in the destination buffer. */ @@ -125,14 +125,14 @@ void arm_cmplx_conj_q31( pDst[3] = inI2; /* increment source pointer by 8 to proecess next samples */ - pSrc += 8u; + pSrc += 8U; /* store imaginary input samples */ pDst[5] = inI3; pDst[7] = inI4; /* increment destination pointer by 8 to process next samples */ - pDst += 8u; + pDst += 8U; /* Decrement the loop counter */ blkCnt--; @@ -140,7 +140,7 @@ void arm_cmplx_conj_q31( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -150,7 +150,7 @@ void arm_cmplx_conj_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0]+jC[1] = A[0]+ j (-1) A[1] */ /* Calculate Complex Conjugate and then store the results in the destination buffer. */ diff --git a/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f32.c b/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f32.c index 7d8688c2..bfc352b7 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f32.c +++ b/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f32.c @@ -89,11 +89,11 @@ void arm_cmplx_dot_prod_f32( uint32_t blkCnt; /* loop counter */ /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { a0 = *pSrcA++; b0 = *pSrcA++; @@ -141,9 +141,9 @@ void arm_cmplx_dot_prod_f32( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples & 0x3u; + blkCnt = numSamples & 0x3U; - while (blkCnt > 0u) + while (blkCnt > 0U) { a0 = *pSrcA++; b0 = *pSrcA++; @@ -163,7 +163,7 @@ void arm_cmplx_dot_prod_f32( /* Run the below code for Cortex-M0 */ - while (numSamples > 0u) + while (numSamples > 0U) { a0 = *pSrcA++; b0 = *pSrcA++; diff --git a/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q15.c b/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q15.c index f46a5e5b..9e23a012 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q15.c +++ b/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q15.c @@ -72,11 +72,11 @@ void arm_cmplx_dot_prod_q15( /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { a0 = *pSrcA++; b0 = *pSrcA++; @@ -124,9 +124,9 @@ void arm_cmplx_dot_prod_q15( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { a0 = *pSrcA++; b0 = *pSrcA++; @@ -146,7 +146,7 @@ void arm_cmplx_dot_prod_q15( /* Run the below code for Cortex-M0 */ - while (numSamples > 0u) + while (numSamples > 0U) { a0 = *pSrcA++; b0 = *pSrcA++; diff --git a/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q31.c b/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q31.c index 61818f9d..6eb5b6e5 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q31.c +++ b/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q31.c @@ -73,11 +73,11 @@ void arm_cmplx_dot_prod_q31( /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { a0 = *pSrcA++; b0 = *pSrcA++; @@ -125,9 +125,9 @@ void arm_cmplx_dot_prod_q31( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { a0 = *pSrcA++; b0 = *pSrcA++; @@ -147,7 +147,7 @@ void arm_cmplx_dot_prod_q31( /* Run the below code for Cortex-M0 */ - while (numSamples > 0u) + while (numSamples > 0U) { a0 = *pSrcA++; b0 = *pSrcA++; diff --git a/Source/ComplexMathFunctions/arm_cmplx_mag_f32.c b/Source/ComplexMathFunctions/arm_cmplx_mag_f32.c index 4d342861..95aaf1ee 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mag_f32.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mag_f32.c @@ -82,11 +82,11 @@ void arm_cmplx_mag_f32( uint32_t blkCnt; /* loop counter */ /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = sqrt(A[0] * A[0] + A[1] * A[1]) */ @@ -114,9 +114,9 @@ void arm_cmplx_mag_f32( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = sqrt(A[0] * A[0] + A[1] * A[1]) */ realIn = *pSrc++; @@ -132,7 +132,7 @@ void arm_cmplx_mag_f32( /* Run the below code for Cortex-M0 */ - while (numSamples > 0u) + while (numSamples > 0U) { /* out = sqrt((real * real) + (imag * imag)) */ realIn = *pSrc++; diff --git a/Source/ComplexMathFunctions/arm_cmplx_mag_q15.c b/Source/ComplexMathFunctions/arm_cmplx_mag_q15.c index afbd37e9..03d9b2ae 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mag_q15.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mag_q15.c @@ -66,11 +66,11 @@ void arm_cmplx_mag_q15( /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = sqrt(A[0] * A[0] + A[1] * A[1]) */ @@ -96,9 +96,9 @@ void arm_cmplx_mag_q15( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = sqrt(A[0] * A[0] + A[1] * A[1]) */ in1 = *__SIMD32(pSrc)++; @@ -116,7 +116,7 @@ void arm_cmplx_mag_q15( /* Run the below code for Cortex-M0 */ q15_t real, imag; /* Temporary variables to hold input values */ - while (numSamples > 0u) + while (numSamples > 0U) { /* out = sqrt(real * real + imag * imag) */ real = *pSrc++; diff --git a/Source/ComplexMathFunctions/arm_cmplx_mag_q31.c b/Source/ComplexMathFunctions/arm_cmplx_mag_q31.c index 29a05594..830ecb9b 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mag_q31.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mag_q31.c @@ -68,11 +68,11 @@ void arm_cmplx_mag_q31( /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* read complex input from source buffer */ real1 = pSrc[0]; @@ -130,13 +130,13 @@ void arm_cmplx_mag_q31( arm_sqrt_q31(out1, &pDst[2]); /* increment destination by 8 to process next samples */ - pSrc += 8u; + pSrc += 8U; /* calculate square root */ arm_sqrt_q31(out3, &pDst[3]); /* increment destination by 4 to process next samples */ - pDst += 4u; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -144,7 +144,7 @@ void arm_cmplx_mag_q31( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -153,7 +153,7 @@ void arm_cmplx_mag_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = sqrt(A[0] * A[0] + A[1] * A[1]) */ real = *pSrc++; diff --git a/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f32.c b/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f32.c index 955d2d6b..59127a22 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f32.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f32.c @@ -86,11 +86,11 @@ void arm_cmplx_mag_squared_f32( float32_t out1, out2, out3, out4; /* Temporary variables to hold output values */ /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = (A[0] * A[0] + A[1] * A[1]) */ /* read real input sample from source buffer */ @@ -160,13 +160,13 @@ void arm_cmplx_mag_squared_f32( pDst[2] = out3; /* increment destination pointer by 8 to process next samples */ - pSrc += 8u; + pSrc += 8U; /* store output to destination */ pDst[3] = out4; /* increment destination pointer by 4 to process next samples */ - pDst += 4u; + pDst += 4U; /* Decrement the loop counter */ blkCnt--; @@ -174,7 +174,7 @@ void arm_cmplx_mag_squared_f32( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -184,7 +184,7 @@ void arm_cmplx_mag_squared_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = (A[0] * A[0] + A[1] * A[1]) */ real = *pSrc++; diff --git a/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q15.c b/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q15.c index bbffef10..3f740c39 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q15.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q15.c @@ -64,11 +64,11 @@ void arm_cmplx_mag_squared_q15( q31_t acc2, acc3; /*loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = (A[0] * A[0] + A[1] * A[1]) */ in1 = *__SIMD32(pSrc)++; @@ -93,9 +93,9 @@ void arm_cmplx_mag_squared_q15( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = (A[0] * A[0] + A[1] * A[1]) */ in1 = *__SIMD32(pSrc)++; @@ -113,7 +113,7 @@ void arm_cmplx_mag_squared_q15( /* Run the below code for Cortex-M0 */ q15_t real, imag; /* Temporary variables to store real and imaginary values */ - while (numSamples > 0u) + while (numSamples > 0U) { /* out = ((real * real) + (imag * imag)) */ real = *pSrc++; diff --git a/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q31.c b/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q31.c index f39c580c..c2b2c500 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q31.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q31.c @@ -65,11 +65,11 @@ void arm_cmplx_mag_squared_q31( uint32_t blkCnt; /* loop counter */ /* loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = (A[0] * A[0] + A[1] * A[1]) */ real = *pSrc++; @@ -106,9 +106,9 @@ void arm_cmplx_mag_squared_q31( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[0] = (A[0] * A[0] + A[1] * A[1]) */ real = *pSrc++; @@ -126,7 +126,7 @@ void arm_cmplx_mag_squared_q31( /* Run the below code for Cortex-M0 */ - while (numSamples > 0u) + while (numSamples > 0U) { /* out = ((real * real) + (imag * imag)) */ real = *pSrc++; diff --git a/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f32.c b/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f32.c index 7d4204c9..3717591e 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f32.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f32.c @@ -86,11 +86,11 @@ void arm_cmplx_mult_cmplx_f32( /* loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[2 * i] - A[2 * i + 1] * B[2 * i + 1]. */ /* C[2 * i + 1] = A[2 * i] * B[2 * i + 1] + A[2 * i + 1] * B[2 * i]. */ @@ -145,18 +145,18 @@ void arm_cmplx_mult_cmplx_f32( acc4 = (b2 * c2); *(pDst + 4) = acc1; - pSrcA += 8u; + pSrcA += 8U; acc3 -= (b2 * d2); acc4 += (a2 * d2); *(pDst + 5) = acc2; - pSrcB += 8u; + pSrcB += 8U; *(pDst + 6) = acc3; *(pDst + 7) = acc4; - pDst += 8u; + pDst += 8U; /* Decrement the numSamples loop counter */ blkCnt--; @@ -164,7 +164,7 @@ void arm_cmplx_mult_cmplx_f32( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -173,7 +173,7 @@ void arm_cmplx_mult_cmplx_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[2 * i] - A[2 * i + 1] * B[2 * i + 1]. */ /* C[2 * i + 1] = A[2 * i] * B[2 * i + 1] + A[2 * i + 1] * B[2 * i]. */ diff --git a/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q15.c b/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q15.c index 956af1ca..2869837d 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q15.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q15.c @@ -64,11 +64,11 @@ void arm_cmplx_mult_cmplx_q15( uint32_t blkCnt; /* loop counters */ /* loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[2 * i] - A[2 * i + 1] * B[2 * i + 1]. */ /* C[2 * i + 1] = A[2 * i] * B[2 * i + 1] + A[2 * i + 1] * B[2 * i]. */ @@ -126,9 +126,9 @@ void arm_cmplx_mult_cmplx_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[2 * i] - A[2 * i + 1] * B[2 * i + 1]. */ /* C[2 * i + 1] = A[2 * i] * B[2 * i + 1] + A[2 * i + 1] * B[2 * i]. */ @@ -152,7 +152,7 @@ void arm_cmplx_mult_cmplx_q15( /* Run the below code for Cortex-M0 */ - while (numSamples > 0u) + while (numSamples > 0U) { /* C[2 * i] = A[2 * i] * B[2 * i] - A[2 * i + 1] * B[2 * i + 1]. */ /* C[2 * i + 1] = A[2 * i] * B[2 * i + 1] + A[2 * i + 1] * B[2 * i]. */ diff --git a/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q31.c b/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q31.c index 1810213b..b01c4f67 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q31.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q31.c @@ -68,11 +68,11 @@ void arm_cmplx_mult_cmplx_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[2 * i] - A[2 * i + 1] * B[2 * i + 1]. */ /* C[2 * i + 1] = A[2 * i] * B[2 * i + 1] + A[2 * i + 1] * B[2 * i]. */ @@ -174,9 +174,9 @@ void arm_cmplx_mult_cmplx_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[2 * i] - A[2 * i + 1] * B[2 * i + 1]. */ /* C[2 * i + 1] = A[2 * i] * B[2 * i + 1] + A[2 * i + 1] * B[2 * i]. */ @@ -212,11 +212,11 @@ void arm_cmplx_mult_cmplx_q31( /* Run the below code for Cortex-M0 */ /* loop Unrolling */ - blkCnt = numSamples >> 1u; + blkCnt = numSamples >> 1U; /* First part of the processing with loop unrolling. Compute 2 outputs at a time. ** a second loop below computes the remaining 1 sample. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[2 * i] - A[2 * i + 1] * B[2 * i + 1]. */ /* C[2 * i + 1] = A[2 * i] * B[2 * i + 1] + A[2 * i + 1] * B[2 * i]. */ @@ -272,9 +272,9 @@ void arm_cmplx_mult_cmplx_q31( /* If the blockSize is not a multiple of 2, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x2u; + blkCnt = numSamples % 0x2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[2 * i] - A[2 * i + 1] * B[2 * i + 1]. */ /* C[2 * i + 1] = A[2 * i] * B[2 * i + 1] + A[2 * i + 1] * B[2 * i]. */ diff --git a/Source/ComplexMathFunctions/arm_cmplx_mult_real_f32.c b/Source/ComplexMathFunctions/arm_cmplx_mult_real_f32.c index d6cf6585..8c7ca313 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mult_real_f32.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mult_real_f32.c @@ -89,11 +89,11 @@ void arm_cmplx_mult_real_f32( float32_t out5, out6, out7, out8; /* Temporary variables to hold output data */ /* loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[i]. */ /* C[2 * i + 1] = A[2 * i + 1] * B[i]. */ @@ -164,20 +164,20 @@ void arm_cmplx_mult_real_f32( pCmplxDst[4] = out5; /* incremnet complex input buffer by 8 to process next samples */ - pSrcCmplx += 8u; + pSrcCmplx += 8U; /* store result to destination bufer */ pCmplxDst[5] = out6; /* increment real input buffer by 4 to process next samples */ - pSrcReal += 4u; + pSrcReal += 4U; /* store result to destination bufer */ pCmplxDst[6] = out7; pCmplxDst[7] = out8; /* increment destination buffer by 8 to process next sampels */ - pCmplxDst += 8u; + pCmplxDst += 8U; /* Decrement the numSamples loop counter */ blkCnt--; @@ -185,7 +185,7 @@ void arm_cmplx_mult_real_f32( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -194,7 +194,7 @@ void arm_cmplx_mult_real_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[i]. */ /* C[2 * i + 1] = A[2 * i + 1] * B[i]. */ diff --git a/Source/ComplexMathFunctions/arm_cmplx_mult_real_q15.c b/Source/ComplexMathFunctions/arm_cmplx_mult_real_q15.c index c6d01d26..340d8520 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mult_real_q15.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mult_real_q15.c @@ -70,11 +70,11 @@ void arm_cmplx_mult_real_q15( q31_t mul1, mul2, mul3, mul4; /* Temporary variables to hold intermediate data */ /* loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[i]. */ /* C[2 * i + 1] = A[2 * i + 1] * B[i]. */ @@ -103,10 +103,10 @@ void arm_cmplx_mult_real_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* saturate the result */ - out1 = (q15_t) __SSAT(mul1 >> 15u, 16); - out2 = (q15_t) __SSAT(mul2 >> 15u, 16); - out3 = (q15_t) __SSAT(mul3 >> 15u, 16); - out4 = (q15_t) __SSAT(mul4 >> 15u, 16); + out1 = (q15_t) __SSAT(mul1 >> 15U, 16); + out2 = (q15_t) __SSAT(mul2 >> 15U, 16); + out3 = (q15_t) __SSAT(mul3 >> 15U, 16); + out4 = (q15_t) __SSAT(mul4 >> 15U, 16); /* pack real and imaginary outputs and store them to destination */ *__SIMD32(pCmplxDst)++ = __PKHBT(out1, out2, 16); @@ -132,10 +132,10 @@ void arm_cmplx_mult_real_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - out1 = (q15_t) __SSAT(mul1 >> 15u, 16); - out2 = (q15_t) __SSAT(mul2 >> 15u, 16); - out3 = (q15_t) __SSAT(mul3 >> 15u, 16); - out4 = (q15_t) __SSAT(mul4 >> 15u, 16); + out1 = (q15_t) __SSAT(mul1 >> 15U, 16); + out2 = (q15_t) __SSAT(mul2 >> 15U, 16); + out3 = (q15_t) __SSAT(mul3 >> 15U, 16); + out4 = (q15_t) __SSAT(mul4 >> 15U, 16); *__SIMD32(pCmplxDst)++ = __PKHBT(out1, out2, 16); *__SIMD32(pCmplxDst)++ = __PKHBT(out3, out4, 16); @@ -146,9 +146,9 @@ void arm_cmplx_mult_real_q15( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[i]. */ /* C[2 * i + 1] = A[2 * i + 1] * B[i]. */ @@ -167,7 +167,7 @@ void arm_cmplx_mult_real_q15( /* Run the below code for Cortex-M0 */ - while (numSamples > 0u) + while (numSamples > 0U) { /* realOut = realA * realB. */ /* imagOut = imagA * realB. */ diff --git a/Source/ComplexMathFunctions/arm_cmplx_mult_real_q31.c b/Source/ComplexMathFunctions/arm_cmplx_mult_real_q31.c index 36959652..19fc55bb 100644 --- a/Source/ComplexMathFunctions/arm_cmplx_mult_real_q31.c +++ b/Source/ComplexMathFunctions/arm_cmplx_mult_real_q31.c @@ -69,11 +69,11 @@ void arm_cmplx_mult_real_q31( q31_t out1, out2, out3, out4; /* Temporary variables to hold output data */ /* loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[i]. */ /* C[2 * i + 1] = A[2 * i + 1] * B[i]. */ @@ -151,9 +151,9 @@ void arm_cmplx_mult_real_q31( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C[2 * i] = A[2 * i] * B[i]. */ /* C[2 * i + 1] = A[2 * i + 1] * B[i]. */ @@ -187,7 +187,7 @@ void arm_cmplx_mult_real_q31( /* Run the below code for Cortex-M0 */ - while (numSamples > 0u) + while (numSamples > 0U) { /* realOut = realA * realB. */ /* imagReal = imagA * realB. */ diff --git a/Source/ControllerFunctions/arm_pid_init_f32.c b/Source/ControllerFunctions/arm_pid_init_f32.c index 05ea4607..f75d61f0 100644 --- a/Source/ControllerFunctions/arm_pid_init_f32.c +++ b/Source/ControllerFunctions/arm_pid_init_f32.c @@ -64,7 +64,7 @@ void arm_pid_init_f32( if (resetStateFlag) { /* Clear the state buffer. The size will be always 3 samples */ - memset(S->state, 0, 3u * sizeof(float32_t)); + memset(S->state, 0, 3U * sizeof(float32_t)); } } diff --git a/Source/ControllerFunctions/arm_pid_init_q15.c b/Source/ControllerFunctions/arm_pid_init_q15.c index f4169e26..61049cfb 100644 --- a/Source/ControllerFunctions/arm_pid_init_q15.c +++ b/Source/ControllerFunctions/arm_pid_init_q15.c @@ -74,7 +74,7 @@ void arm_pid_init_q15( if (resetStateFlag) { /* Clear the state buffer. The size will be always 3 samples */ - memset(S->state, 0, 3u * sizeof(q15_t)); + memset(S->state, 0, 3U * sizeof(q15_t)); } #else @@ -98,7 +98,7 @@ void arm_pid_init_q15( if (resetStateFlag) { /* Clear the state buffer. The size will be always 3 samples */ - memset(S->state, 0, 3u * sizeof(q15_t)); + memset(S->state, 0, 3U * sizeof(q15_t)); } #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/ControllerFunctions/arm_pid_init_q31.c b/Source/ControllerFunctions/arm_pid_init_q31.c index 1fe71d6b..17b3b094 100644 --- a/Source/ControllerFunctions/arm_pid_init_q31.c +++ b/Source/ControllerFunctions/arm_pid_init_q31.c @@ -85,7 +85,7 @@ void arm_pid_init_q31( if (resetStateFlag) { /* Clear the state buffer. The size will be always 3 samples */ - memset(S->state, 0, 3u * sizeof(q31_t)); + memset(S->state, 0, 3U * sizeof(q31_t)); } } diff --git a/Source/ControllerFunctions/arm_pid_reset_f32.c b/Source/ControllerFunctions/arm_pid_reset_f32.c index ad5b1799..318ec894 100644 --- a/Source/ControllerFunctions/arm_pid_reset_f32.c +++ b/Source/ControllerFunctions/arm_pid_reset_f32.c @@ -45,7 +45,7 @@ void arm_pid_reset_f32( { /* Clear the state buffer. The size will be always 3 samples */ - memset(S->state, 0, 3u * sizeof(float32_t)); + memset(S->state, 0, 3U * sizeof(float32_t)); } /** diff --git a/Source/ControllerFunctions/arm_pid_reset_q15.c b/Source/ControllerFunctions/arm_pid_reset_q15.c index 52f4acf5..93c0e7c6 100644 --- a/Source/ControllerFunctions/arm_pid_reset_q15.c +++ b/Source/ControllerFunctions/arm_pid_reset_q15.c @@ -44,7 +44,7 @@ void arm_pid_reset_q15( arm_pid_instance_q15 * S) { /* Reset state to zero, The size will be always 3 samples */ - memset(S->state, 0, 3u * sizeof(q15_t)); + memset(S->state, 0, 3U * sizeof(q15_t)); } /** diff --git a/Source/ControllerFunctions/arm_pid_reset_q31.c b/Source/ControllerFunctions/arm_pid_reset_q31.c index d6547ef9..4c5b14e3 100644 --- a/Source/ControllerFunctions/arm_pid_reset_q31.c +++ b/Source/ControllerFunctions/arm_pid_reset_q31.c @@ -45,7 +45,7 @@ void arm_pid_reset_q31( { /* Clear the state buffer. The size will be always 3 samples */ - memset(S->state, 0, 3u * sizeof(q31_t)); + memset(S->state, 0, 3U * sizeof(q31_t)); } /** diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_init_q31.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_init_q31.c index f7274099..8f92496e 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_init_q31.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_init_q31.c @@ -87,7 +87,7 @@ void arm_biquad_cas_df1_32x64_init_q31( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always 4 * numStages */ - memset(pState, 0, (4u * (uint32_t) numStages) * sizeof(q63_t)); + memset(pState, 0, (4U * (uint32_t) numStages) * sizeof(q63_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_q31.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_q31.c index 2a5c123e..c77cc8e4 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_q31.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_q31.c @@ -190,8 +190,8 @@ void arm_biquad_cas_df1_32x64_q31( int32_t shift = (int32_t) S->postShift + 1; /* Shift to be applied to the output */ uint32_t sample, stage = S->numStages; /* loop counters */ q31_t acc_l, acc_h; /* temporary output */ - uint32_t uShift = ((uint32_t) S->postShift + 1u); - uint32_t lShift = 32u - uShift; /* Shift to be applied to the output */ + uint32_t uShift = ((uint32_t) S->postShift + 1U); + uint32_t lShift = 32U - uShift; /* Shift to be applied to the output */ #if defined (ARM_MATH_DSP) @@ -219,11 +219,11 @@ void arm_biquad_cas_df1_32x64_q31( * acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] */ - sample = blockSize >> 2u; + sample = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -297,7 +297,7 @@ void arm_biquad_cas_df1_32x64_q31( /* The result is converted to 1.31 */ /* Store the output in the destination buffer. */ - *(pOut + 1u) = acc_h; + *(pOut + 1U) = acc_h; /* acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] */ @@ -329,7 +329,7 @@ void arm_biquad_cas_df1_32x64_q31( acc_h = (uint32_t) acc_l >> lShift | acc_h << uShift; /* Store the output in the destination buffer in 1.31 format. */ - *(pOut + 2u) = acc_h; + *(pOut + 2U) = acc_h; /* Read the fourth input into Xn, to reuse the value */ Xn = *pIn++; @@ -363,7 +363,7 @@ void arm_biquad_cas_df1_32x64_q31( acc_h = (uint32_t) acc_l >> lShift | acc_h << uShift; /* Store the output in the destination buffer in 1.31 format. */ - *(pOut + 3u) = acc_h; + *(pOut + 3U) = acc_h; /* Every time after the output is computed state should be updated. */ /* The states should be updated as: */ @@ -375,7 +375,7 @@ void arm_biquad_cas_df1_32x64_q31( Xn1 = Xn; /* update output pointer */ - pOut += 4u; + pOut += 4U; /* decrement the loop counter */ sample--; @@ -383,9 +383,9 @@ void arm_biquad_cas_df1_32x64_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - sample = (blockSize & 0x3u); + sample = (blockSize & 0x3U); - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -476,7 +476,7 @@ void arm_biquad_cas_df1_32x64_q31( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_f32.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_f32.c index 99fce401..0ffb29ee 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_f32.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_f32.c @@ -207,11 +207,11 @@ void arm_biquad_cascade_df1_f32( * acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] */ - sample = blockSize >> 2u; + sample = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (sample > 0u) + while (sample > 0U) { /* Read the first input */ Xn = *pIn++; @@ -286,9 +286,9 @@ void arm_biquad_cascade_df1_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - sample = blockSize & 0x3u; + sample = blockSize & 0x3U; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -331,7 +331,7 @@ void arm_biquad_cascade_df1_f32( /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); #else @@ -358,7 +358,7 @@ void arm_biquad_cascade_df1_f32( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -400,7 +400,7 @@ void arm_biquad_cascade_df1_f32( /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q15.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q15.c index c242cfe7..ab517d88 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q15.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q15.c @@ -104,11 +104,11 @@ void arm_biquad_cascade_df1_fast_q15( * acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] * acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] */ - sample = blockSize >> 1u; + sample = blockSize >> 1U; /* First part of the processing with loop unrolling. Compute 2 outputs at a time. ** a second loop below computes the remaining 1 sample. */ - while (sample > 0u) + while (sample > 0U) { /* Read the input */ @@ -198,7 +198,7 @@ void arm_biquad_cascade_df1_fast_q15( /* If the blockSize is not a multiple of 2, compute any remaining output samples here. ** No loop unrolling is used. */ - if ((blockSize & 0x1u) != 0u) + if ((blockSize & 0x1U) != 0U) { /* Read the input */ in = *pIn++; @@ -264,7 +264,7 @@ void arm_biquad_cascade_df1_fast_q15( /* Decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); } diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q31.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q31.c index e8ac0747..00dbae1f 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q31.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q31.c @@ -100,11 +100,11 @@ void arm_biquad_cascade_df1_fast_q31( * acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] */ - sample = blockSize >> 2u; + sample = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn; @@ -130,7 +130,7 @@ void arm_biquad_cascade_df1_fast_q31( Yn2 = acc << shift; /* Read the second input */ - Xn2 = *(pIn + 1u); + Xn2 = *(pIn + 1U); /* Store the output in the destination buffer. */ *pOut = Yn2; @@ -156,10 +156,10 @@ void arm_biquad_cascade_df1_fast_q31( Yn1 = acc << shift; /* Read the third input */ - Xn1 = *(pIn + 2u); + Xn1 = *(pIn + 2U); /* Store the output in the destination buffer. */ - *(pOut + 1u) = Yn1; + *(pOut + 1U) = Yn1; /* acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] */ /* acc = b0 * x[n] */ @@ -182,11 +182,11 @@ void arm_biquad_cascade_df1_fast_q31( Yn2 = acc << shift; /* Read the forth input */ - Xn = *(pIn + 3u); + Xn = *(pIn + 3U); /* Store the output in the destination buffer. */ - *(pOut + 2u) = Yn2; - pIn += 4u; + *(pOut + 2U) = Yn2; + pIn += 4U; /* acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] */ /* acc = b0 * x[n] */ @@ -217,8 +217,8 @@ void arm_biquad_cascade_df1_fast_q31( Xn1 = Xn; /* Store the output in the destination buffer. */ - *(pOut + 3u) = Yn1; - pOut += 4u; + *(pOut + 3U) = Yn1; + pOut += 4U; /* decrement the loop counter */ sample--; @@ -226,9 +226,9 @@ void arm_biquad_cascade_df1_fast_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - sample = (blockSize & 0x3u); + sample = (blockSize & 0x3U); - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_init_f32.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_init_f32.c index d100da0e..35ceed4a 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_init_f32.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_init_f32.c @@ -86,7 +86,7 @@ void arm_biquad_cascade_df1_init_f32( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always 4 * numStages */ - memset(pState, 0, (4u * (uint32_t) numStages) * sizeof(float32_t)); + memset(pState, 0, (4U * (uint32_t) numStages) * sizeof(float32_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q15.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q15.c index 5ad21c1a..2b3243d7 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q15.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q15.c @@ -88,7 +88,7 @@ void arm_biquad_cascade_df1_init_q15( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always 4 * numStages */ - memset(pState, 0, (4u * (uint32_t) numStages) * sizeof(q15_t)); + memset(pState, 0, (4U * (uint32_t) numStages) * sizeof(q15_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q31.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q31.c index 3cb6925e..5c60e4a6 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q31.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q31.c @@ -87,7 +87,7 @@ void arm_biquad_cascade_df1_init_q31( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always 4 * numStages */ - memset(pState, 0, (4u * (uint32_t) numStages) * sizeof(q31_t)); + memset(pState, 0, (4U * (uint32_t) numStages) * sizeof(q31_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_q15.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_q15.c index 6a487c43..382b7444 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_q15.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_q15.c @@ -109,11 +109,11 @@ void arm_biquad_cascade_df1_q15( * acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] * acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] */ - sample = blockSize >> 1u; + sample = blockSize >> 1U; /* First part of the processing with loop unrolling. Compute 2 outputs at a time. ** a second loop below computes the remaining 1 sample. */ - while (sample > 0u) + while (sample > 0U) { /* Read the input */ @@ -220,7 +220,7 @@ void arm_biquad_cascade_df1_q15( /* If the blockSize is not a multiple of 2, compute any remaining output samples here. ** No loop unrolling is used. */ - if ((blockSize & 0x1u) != 0u) + if ((blockSize & 0x1U) != 0U) { /* Read the input */ in = *pIn++; @@ -295,7 +295,7 @@ void arm_biquad_cascade_df1_q15( /* Decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); #else @@ -334,7 +334,7 @@ void arm_biquad_cascade_df1_q15( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df1_q31.c b/Source/FilteringFunctions/arm_biquad_cascade_df1_q31.c index 90d7ce1e..4ca3f85a 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df1_q31.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df1_q31.c @@ -65,8 +65,8 @@ void arm_biquad_cascade_df1_q31( uint32_t blockSize) { q63_t acc; /* accumulator */ - uint32_t uShift = ((uint32_t) S->postShift + 1u); - uint32_t lShift = 32u - uShift; /* Shift to be applied to the output */ + uint32_t uShift = ((uint32_t) S->postShift + 1U); + uint32_t lShift = 32U - uShift; /* Shift to be applied to the output */ q31_t *pIn = pSrc; /* input pointer initialization */ q31_t *pOut = pDst; /* output pointer initialization */ q31_t *pState = S->pState; /* pState pointer initialization */ @@ -104,11 +104,11 @@ void arm_biquad_cascade_df1_q31( * acc = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] */ - sample = blockSize >> 2u; + sample = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -246,9 +246,9 @@ void arm_biquad_cascade_df1_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - sample = (blockSize & 0x3u); + sample = (blockSize & 0x3U); - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; @@ -327,7 +327,7 @@ void arm_biquad_cascade_df1_q31( sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn = *pIn++; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df2T_f32.c b/Source/FilteringFunctions/arm_biquad_cascade_df2T_f32.c index 92fca883..c5a81d45 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df2T_f32.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df2T_f32.c @@ -171,19 +171,19 @@ uint32_t blockSize) b2 = pCoeffs[2]; a1 = pCoeffs[3]; /* Apply loop unrolling and compute 16 output values simultaneously. */ - sample = blockSize >> 4u; + sample = blockSize >> 4U; a2 = pCoeffs[4]; /*Reading the state values */ d1 = pState[0]; d2 = pState[1]; - pCoeffs += 5u; + pCoeffs += 5U; /* First part of the processing with loop unrolling. Compute 16 outputs at a time. ** a second loop below computes the remaining 1 to 15 samples. */ - while (sample > 0u) { + while (sample > 0U) { /* y[n] = b0 * x[n] + d1 */ /* d1 = b1 * x[n] + a1 * y[n] + d2 */ @@ -366,7 +366,7 @@ uint32_t blockSize) } sample = blockSize & 0xFu; - while (sample > 0u) { + while (sample > 0U) { Xn1 = *pIn; acc1 = b0 * Xn1 + d1; @@ -392,12 +392,12 @@ uint32_t blockSize) /* decrement the loop counter */ stage--; - pState += 2u; + pState += 2U; /*Reset the output working pointer */ pOut = pDst; - } while (stage > 0u); + } while (stage > 0U); #elif defined(ARM_MATH_CM0_FAMILY) @@ -419,7 +419,7 @@ uint32_t blockSize) sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn1 = *pIn++; @@ -454,7 +454,7 @@ uint32_t blockSize) /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); #else @@ -480,11 +480,11 @@ uint32_t blockSize) d2 = pState[1]; /* Apply loop unrolling and compute 4 output values simultaneously. */ - sample = blockSize >> 2u; + sample = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (sample > 0u) { + while (sample > 0U) { /* y[n] = b0 * x[n] + d1 */ /* d1 = b1 * x[n] + a1 * y[n] + d2 */ @@ -546,8 +546,8 @@ uint32_t blockSize) sample--; } - sample = blockSize & 0x3u; - while (sample > 0u) { + sample = blockSize & 0x3U; + while (sample > 0U) { Xn1 = *pIn++; p0 = b0 * Xn1; @@ -578,7 +578,7 @@ uint32_t blockSize) /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); #endif diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df2T_f64.c b/Source/FilteringFunctions/arm_biquad_cascade_df2T_f64.c index 2a265250..aad9fbb5 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df2T_f64.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df2T_f64.c @@ -171,19 +171,19 @@ uint32_t blockSize) b2 = pCoeffs[2]; a1 = pCoeffs[3]; /* Apply loop unrolling and compute 16 output values simultaneously. */ - sample = blockSize >> 4u; + sample = blockSize >> 4U; a2 = pCoeffs[4]; /*Reading the state values */ d1 = pState[0]; d2 = pState[1]; - pCoeffs += 5u; + pCoeffs += 5U; /* First part of the processing with loop unrolling. Compute 16 outputs at a time. ** a second loop below computes the remaining 1 to 15 samples. */ - while (sample > 0u) { + while (sample > 0U) { /* y[n] = b0 * x[n] + d1 */ /* d1 = b1 * x[n] + a1 * y[n] + d2 */ @@ -366,7 +366,7 @@ uint32_t blockSize) } sample = blockSize & 0xFu; - while (sample > 0u) { + while (sample > 0U) { Xn1 = *pIn; acc1 = b0 * Xn1 + d1; @@ -392,12 +392,12 @@ uint32_t blockSize) /* decrement the loop counter */ stage--; - pState += 2u; + pState += 2U; /*Reset the output working pointer */ pOut = pDst; - } while (stage > 0u); + } while (stage > 0U); #elif defined(ARM_MATH_CM0_FAMILY) @@ -419,7 +419,7 @@ uint32_t blockSize) sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn1 = *pIn++; @@ -454,7 +454,7 @@ uint32_t blockSize) /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); #else @@ -480,11 +480,11 @@ uint32_t blockSize) d2 = pState[1]; /* Apply loop unrolling and compute 4 output values simultaneously. */ - sample = blockSize >> 2u; + sample = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (sample > 0u) { + while (sample > 0U) { /* y[n] = b0 * x[n] + d1 */ /* d1 = b1 * x[n] + a1 * y[n] + d2 */ @@ -546,8 +546,8 @@ uint32_t blockSize) sample--; } - sample = blockSize & 0x3u; - while (sample > 0u) { + sample = blockSize & 0x3U; + while (sample > 0U) { Xn1 = *pIn++; p0 = b0 * Xn1; @@ -578,7 +578,7 @@ uint32_t blockSize) /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); #endif diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f32.c b/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f32.c index 310771f6..18017997 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f32.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f32.c @@ -78,7 +78,7 @@ void arm_biquad_cascade_df2T_init_f32( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always 2 * numStages */ - memset(pState, 0, (2u * (uint32_t) numStages) * sizeof(float32_t)); + memset(pState, 0, (2U * (uint32_t) numStages) * sizeof(float32_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f64.c b/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f64.c index 545ebcef..3d0a5081 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f64.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f64.c @@ -78,7 +78,7 @@ void arm_biquad_cascade_df2T_init_f64( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always 2 * numStages */ - memset(pState, 0, (2u * (uint32_t) numStages) * sizeof(float64_t)); + memset(pState, 0, (2U * (uint32_t) numStages) * sizeof(float64_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f32.c b/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f32.c index e4c31bed..b7e93591 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f32.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f32.c @@ -171,7 +171,7 @@ uint32_t blockSize) b2 = pCoeffs[2]; a1 = pCoeffs[3]; /* Apply loop unrolling and compute 8 output values simultaneously. */ - sample = blockSize >> 3u; + sample = blockSize >> 3U; a2 = pCoeffs[4]; /*Reading the state values */ @@ -180,11 +180,11 @@ uint32_t blockSize) d1b = pState[2]; d2b = pState[3]; - pCoeffs += 5u; + pCoeffs += 5U; /* First part of the processing with loop unrolling. Compute 8 outputs at a time. ** a second loop below computes the remaining 1 to 7 samples. */ - while (sample > 0u) { + while (sample > 0U) { /* y[n] = b0 * x[n] + d1 */ /* d1 = b1 * x[n] + a1 * y[n] + d2 */ @@ -367,8 +367,8 @@ uint32_t blockSize) d2b += a2 * acc8b; } - sample = blockSize & 0x7u; - while (sample > 0u) { + sample = blockSize & 0x7U; + while (sample > 0U) { /* Read the input */ Xn1a = *pIn++; //Channel a Xn1b = *pIn++; //Channel b @@ -405,11 +405,11 @@ uint32_t blockSize) /* decrement the loop counter */ stage--; - pState += 4u; + pState += 4U; /*Reset the output working pointer */ pOut = pDst; - } while (stage > 0u); + } while (stage > 0U); #elif defined(ARM_MATH_CM0_FAMILY) @@ -433,7 +433,7 @@ uint32_t blockSize) sample = blockSize; - while (sample > 0u) + while (sample > 0U) { /* Read the input */ Xn1a = *pIn++; //Channel a @@ -475,7 +475,7 @@ uint32_t blockSize) /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); #else @@ -503,11 +503,11 @@ uint32_t blockSize) d2b = pState[3]; /* Apply loop unrolling and compute 4 output values simultaneously. */ - sample = blockSize >> 2u; + sample = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (sample > 0u) { + while (sample > 0U) { /* y[n] = b0 * x[n] + d1 */ /* d1 = b1 * x[n] + a1 * y[n] + d2 */ @@ -613,8 +613,8 @@ uint32_t blockSize) sample--; } - sample = blockSize & 0x3u; - while (sample > 0u) { + sample = blockSize & 0x3U; + while (sample > 0U) { Xn1a = *pIn++; Xn1b = *pIn++; @@ -658,7 +658,7 @@ uint32_t blockSize) /* decrement the loop counter */ stage--; - } while (stage > 0u); + } while (stage > 0U); #endif diff --git a/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_init_f32.c b/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_init_f32.c index 1dc128e7..4940ec99 100644 --- a/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_init_f32.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_init_f32.c @@ -78,7 +78,7 @@ void arm_biquad_cascade_stereo_df2T_init_f32( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always 4 * numStages */ - memset(pState, 0, (4u * (uint32_t) numStages) * sizeof(float32_t)); + memset(pState, 0, (4U * (uint32_t) numStages) * sizeof(float32_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_conv_f32.c b/Source/FilteringFunctions/arm_conv_f32.c index 4112ea34..9ce5bf02 100644 --- a/Source/FilteringFunctions/arm_conv_f32.c +++ b/Source/FilteringFunctions/arm_conv_f32.c @@ -168,8 +168,8 @@ void arm_conv_f32( /* The algorithm is implemented in three stages. The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -184,7 +184,7 @@ void arm_conv_f32( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; @@ -198,17 +198,17 @@ void arm_conv_f32( * ----------------------*/ /* The first stage starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 1] */ sum += *px++ * *py--; @@ -228,9 +228,9 @@ void arm_conv_f32( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += *px++ * *py--; @@ -267,11 +267,11 @@ void arm_conv_f32( px = pIn1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -280,12 +280,12 @@ void arm_conv_f32( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0.0f; @@ -299,7 +299,7 @@ void arm_conv_f32( x2 = *(px++); /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -328,7 +328,7 @@ void arm_conv_f32( c0 = *(py--); /* Read x[4] sample */ - x0 = *(px + 1u); + x0 = *(px + 1U); /* Perform the multiply-accumulate */ /* acc0 += x[1] * y[srcBLen - 2] */ @@ -344,7 +344,7 @@ void arm_conv_f32( c0 = *(py--); /* Read x[5] sample */ - x1 = *(px + 2u); + x1 = *(px + 2U); /* Perform the multiply-accumulates */ /* acc0 += x[2] * y[srcBLen - 3] */ @@ -360,8 +360,8 @@ void arm_conv_f32( c0 = *(py--); /* Read x[6] sample */ - x2 = *(px + 3u); - px += 4u; + x2 = *(px + 3U); + px += 4U; /* Perform the multiply-accumulates */ /* acc0 += x[3] * y[srcBLen - 4] */ @@ -378,9 +378,9 @@ void arm_conv_f32( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Read y[srcBLen - 5] sample */ c0 = *(py--); @@ -414,7 +414,7 @@ void arm_conv_f32( *pOut++ = acc3; /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -428,19 +428,19 @@ void arm_conv_f32( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += *px++ * *py--; @@ -454,9 +454,9 @@ void arm_conv_f32( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += *px++ * *py--; @@ -485,7 +485,7 @@ void arm_conv_f32( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; @@ -493,7 +493,7 @@ void arm_conv_f32( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += *px++ * *py--; @@ -533,28 +533,28 @@ void arm_conv_f32( The blockSize3 variable holds the number of MAC operations performed */ /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* ------------------- * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = blockSize3 >> 2u; + k = blockSize3 >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 1] * y[srcBLen - 1] */ sum += *px++ * *py--; @@ -574,9 +574,9 @@ void arm_conv_f32( /* If the blockSize3 is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = blockSize3 % 0x4u; + k = blockSize3 % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ @@ -607,13 +607,13 @@ void arm_conv_f32( uint32_t i, j; /* loop counters */ /* Loop to calculate convolution for output length number of times */ - for (i = 0u; i < ((srcALen + srcBLen) - 1u); i++) + for (i = 0U; i < ((srcALen + srcBLen) - 1U); i++) { /* Initialize sum with zero to carry out MAC operations */ sum = 0.0f; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) diff --git a/Source/FilteringFunctions/arm_conv_fast_opt_q15.c b/Source/FilteringFunctions/arm_conv_fast_opt_q15.c index 0a213af8..c6e05b8d 100644 --- a/Source/FilteringFunctions/arm_conv_fast_opt_q15.c +++ b/Source/FilteringFunctions/arm_conv_fast_opt_q15.c @@ -127,13 +127,13 @@ void arm_conv_fast_opt_q15( px = pIn2; /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ /* Copy smaller length input sequence in reverse order into second scratch buffer */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr2-- = *px++; @@ -147,9 +147,9 @@ void arm_conv_fast_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr2-- = *px++; @@ -162,11 +162,11 @@ void arm_conv_fast_opt_q15( pScr1 = pScratch1; /* Assuming scratch1 buffer is aligned by 32-bit */ - /* Fill (srcBLen - 1u) zeros in scratch1 buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch1 buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy bigger length sequence(srcALen) samples in scratch1 buffer */ @@ -181,11 +181,11 @@ void arm_conv_fast_opt_q15( #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcALen >> 2u; + k = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = *pIn1++; @@ -199,9 +199,9 @@ void arm_conv_fast_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcALen % 0x4u; + k = srcALen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = *pIn1++; @@ -215,20 +215,20 @@ void arm_conv_fast_opt_q15( #ifndef UNALIGNED_SUPPORT_DISABLE - /* Fill (srcBLen - 1u) zeros at end of scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros at end of scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = (srcBLen - 1u) >> 2u; + k = (srcBLen - 1U) >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = 0; @@ -242,9 +242,9 @@ void arm_conv_fast_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = (srcBLen - 1u) % 0x4u; + k = (srcBLen - 1U) % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = 0; @@ -266,7 +266,7 @@ void arm_conv_fast_opt_q15( ** a second loop below process for the remaining 1 to 3 samples. */ /* Actual convolution process starts here */ - blkCnt = (srcALen + srcBLen - 1u) >> 2; + blkCnt = (srcALen + srcBLen - 1U) >> 2; while (blkCnt > 0) { @@ -285,16 +285,16 @@ void arm_conv_fast_opt_q15( /* Read next two samples from scratch1 buffer */ x2 = *__SIMD32(pScr1)++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE /* Read four samples from smaller buffer */ y1 = _SIMD32_OFFSET(pIn2); - y2 = _SIMD32_OFFSET(pIn2 + 2u); + y2 = _SIMD32_OFFSET(pIn2 + 2U); /* multiply and accumlate */ acc0 = __SMLAD(x1, y1, acc0); @@ -327,7 +327,7 @@ void arm_conv_fast_opt_q15( acc3 = __SMLADX(x3, y1, acc3); acc1 = __SMLADX(x3, y2, acc1); - x2 = _SIMD32_OFFSET(pScr1 + 2u); + x2 = _SIMD32_OFFSET(pScr1 + 2U); #ifndef ARM_MATH_BIG_ENDIAN x3 = __PKHBT(x2, x1, 0); @@ -412,8 +412,8 @@ void arm_conv_fast_opt_q15( #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */ /* update scratch pointers */ - pIn2 += 4u; - pScr1 += 4u; + pIn2 += 4U; + pScr1 += 4U; /* Decrement the loop counter */ @@ -421,12 +421,12 @@ void arm_conv_fast_opt_q15( } /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -435,7 +435,7 @@ void arm_conv_fast_opt_q15( acc2 += (*pScr1++ * *pIn2); acc3 += (*pScr1++ * *pIn2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -470,12 +470,12 @@ void arm_conv_fast_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } - blkCnt = (srcALen + srcBLen - 1u) & 0x3; + blkCnt = (srcALen + srcBLen - 1U) & 0x3; /* Calculate convolution for remaining samples of Bigger length sequence */ while (blkCnt > 0) @@ -486,9 +486,9 @@ void arm_conv_fast_opt_q15( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { acc0 += (*pScr1++ * *pIn2++); @@ -498,10 +498,10 @@ void arm_conv_fast_opt_q15( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -520,7 +520,7 @@ void arm_conv_fast_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } diff --git a/Source/FilteringFunctions/arm_conv_fast_q15.c b/Source/FilteringFunctions/arm_conv_fast_q15.c index 2c5d253f..9625ae50 100644 --- a/Source/FilteringFunctions/arm_conv_fast_q15.c +++ b/Source/FilteringFunctions/arm_conv_fast_q15.c @@ -116,8 +116,8 @@ void arm_conv_fast_q15( /* The algorithm is implemented in three stages. The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -132,7 +132,7 @@ void arm_conv_fast_q15( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; @@ -150,7 +150,7 @@ void arm_conv_fast_q15( /* Second part of this stage computes the MAC operations greater than or equal to 4 */ /* The first part of the stage starts here */ - while ((count < 4u) && (blockSize1 > 0u)) + while ((count < 4U) && (blockSize1 > 0U)) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -159,7 +159,7 @@ void arm_conv_fast_q15( * inputA samples and inputB samples */ k = count; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLAD(*px++, *py--, sum); @@ -188,17 +188,17 @@ void arm_conv_fast_q15( * y[srcBLen] and y[srcBLen-1] coefficients, py is decremented by 1 */ py = py - 1; - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0], x[1] are multiplied with y[srcBLen - 1], y[srcBLen - 2] respectively */ @@ -212,13 +212,13 @@ void arm_conv_fast_q15( /* For the next MAC operations, the pointer py is used without SIMD * So, py is incremented by 1 */ - py = py + 1u; + py = py + 1U; /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLAD(*px++, *py--, sum); @@ -231,7 +231,7 @@ void arm_conv_fast_q15( *pOut++ = (q15_t) (sum >> 15); /* Update the inputA and inputB pointers for next MAC calculation */ - py = pIn2 + (count - 1u); + py = pIn2 + (count - 1U); px = pIn1; /* Increment the MAC count */ @@ -255,11 +255,11 @@ void arm_conv_fast_q15( px = pIn1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is the index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* -------------------- @@ -269,14 +269,14 @@ void arm_conv_fast_q15( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { - py = py - 1u; + py = py - 1U; /* Set all accumulators to zero */ acc0 = 0; @@ -289,11 +289,11 @@ void arm_conv_fast_q15( x0 = *__SIMD32(px); /* read x[1], x[2] samples */ x1 = _SIMD32_OFFSET(px+1); - px+= 2u; + px+= 2U; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -335,7 +335,7 @@ void arm_conv_fast_q15( /* Read x[5], x[6] */ x1 = _SIMD32_OFFSET(px+3); - px += 4u; + px += 4U; /* acc2 += x[4] * y[srcBLen - 3] + x[5] * y[srcBLen - 4] */ acc2 = __SMLADX(x0, c0, acc2); @@ -350,16 +350,16 @@ void arm_conv_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - if (k == 1u) + if (k == 1U) { /* Read y[srcBLen - 5] */ c0 = *(py+1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else @@ -378,7 +378,7 @@ void arm_conv_fast_q15( acc3 = __SMLADX(x3, c0, acc3); } - if (k == 2u) + if (k == 2U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ c0 = _SIMD32_OFFSET(py); @@ -388,7 +388,7 @@ void arm_conv_fast_q15( /* Read x[9] */ x2 = _SIMD32_OFFSET(px+1); - px += 2u; + px += 2U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x0, c0, acc0); @@ -397,7 +397,7 @@ void arm_conv_fast_q15( acc3 = __SMLADX(x2, c0, acc3); } - if (k == 3u) + if (k == 3U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ c0 = _SIMD32_OFFSET(py); @@ -418,7 +418,7 @@ void arm_conv_fast_q15( c0 = *(py-1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else c0 = c0 & 0x0000FFFF; @@ -426,7 +426,7 @@ void arm_conv_fast_q15( /* Read x[10] */ x3 = _SIMD32_OFFSET(px+2); - px += 3u; + px += 3U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x1, c0, acc0); @@ -449,7 +449,7 @@ void arm_conv_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -461,19 +461,19 @@ void arm_conv_fast_q15( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -487,9 +487,9 @@ void arm_conv_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -518,7 +518,7 @@ void arm_conv_fast_q15( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -526,7 +526,7 @@ void arm_conv_fast_q15( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q31_t) * px++ * *py--); @@ -566,12 +566,12 @@ void arm_conv_fast_q15( The blockSize3 variable holds the number of MAC operations performed */ /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); - pIn2 = pSrc2 - 1u; + pSrc2 = pIn2 + (srcBLen - 1U); + pIn2 = pSrc2 - 1U; py = pIn2; /* ------------------- @@ -583,19 +583,19 @@ void arm_conv_fast_q15( /* Second part of this stage computes the MAC operations less than or equal to 4 */ /* The first part of the stage starts here */ - j = blockSize3 >> 2u; + j = blockSize3 >> 2U; - while ((j > 0u) && (blockSize3 > 0u)) + while ((j > 0U) && (blockSize3 > 0U)) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = blockSize3 >> 2u; + k = blockSize3 >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[srcALen - srcBLen + 1], x[srcALen - srcBLen + 2] are multiplied * with y[srcBLen - 1], y[srcBLen - 2] respectively */ @@ -610,13 +610,13 @@ void arm_conv_fast_q15( /* For the next MAC operations, the pointer py is used without SIMD * So, py is incremented by 1 */ - py = py + 1u; + py = py + 1U; /* If the blockSize3 is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = blockSize3 % 0x4u; + k = blockSize3 % 0x4U; - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 5] * y[srcBLen - 5] */ sum = __SMLAD(*px++, *py--, sum); @@ -641,9 +641,9 @@ void arm_conv_fast_q15( /* The second part of the stage starts here */ /* SIMD is not used for the next MAC operations, * so pointer py is updated to read only one sample at a time */ - py = py + 1u; + py = py + 1U; - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -651,7 +651,7 @@ void arm_conv_fast_q15( /* Apply loop unrolling and compute 4 MACs simultaneously. */ k = blockSize3; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ @@ -720,8 +720,8 @@ void arm_conv_fast_q15( /* The algorithm is implemented in three stages. The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -736,7 +736,7 @@ void arm_conv_fast_q15( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; @@ -754,7 +754,7 @@ void arm_conv_fast_q15( /* Second part of this stage computes the MAC operations greater than or equal to 4 */ /* The first part of the stage starts here */ - while ((count < 4u) && (blockSize1 > 0u)) + while ((count < 4U) && (blockSize1 > 0U)) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -763,7 +763,7 @@ void arm_conv_fast_q15( * inputA samples and inputB samples */ k = count; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -792,19 +792,19 @@ void arm_conv_fast_q15( * y[srcBLen] and y[srcBLen-1] coefficients, py is decremented by 1 */ py = py - 1; - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ py++; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -818,9 +818,9 @@ void arm_conv_fast_q15( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -833,7 +833,7 @@ void arm_conv_fast_q15( *pOut++ = (q15_t) (sum >> 15); /* Update the inputA and inputB pointers for next MAC calculation */ - py = pIn2 + (count - 1u); + py = pIn2 + (count - 1U); px = pIn1; /* Increment the MAC count */ @@ -857,11 +857,11 @@ void arm_conv_fast_q15( px = pIn1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is the index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* -------------------- @@ -871,14 +871,14 @@ void arm_conv_fast_q15( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { - py = py - 1u; + py = py - 1U; /* Set all accumulators to zero */ acc0 = 0; @@ -905,7 +905,7 @@ void arm_conv_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -995,7 +995,7 @@ void arm_conv_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 4u; + px += 4U; /* acc2 += x[4] * y[srcBLen - 3] + x[5] * y[srcBLen - 4] */ acc2 = __SMLADX(x0, c0, acc2); @@ -1010,16 +1010,16 @@ void arm_conv_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - if (k == 1u) + if (k == 1U) { /* Read y[srcBLen - 5] */ c0 = *(py+1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else @@ -1050,7 +1050,7 @@ void arm_conv_fast_q15( acc3 = __SMLADX(x3, c0, acc3); } - if (k == 2u) + if (k == 2U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ a = *py; @@ -1083,7 +1083,7 @@ void arm_conv_fast_q15( x2 = __PKHBT(a, b, 16); #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 2u; + px += 2U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x0, c0, acc0); @@ -1092,7 +1092,7 @@ void arm_conv_fast_q15( acc3 = __SMLADX(x2, c0, acc3); } - if (k == 3u) + if (k == 3U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ a = *py; @@ -1136,7 +1136,7 @@ void arm_conv_fast_q15( c0 = *(py-1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else c0 = c0 & 0x0000FFFF; @@ -1156,7 +1156,7 @@ void arm_conv_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 3u; + px += 3U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x1, c0, acc0); @@ -1172,7 +1172,7 @@ void arm_conv_fast_q15( *pOut++ = (q15_t)(acc3 >> 15); /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -1184,19 +1184,19 @@ void arm_conv_fast_q15( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -1210,9 +1210,9 @@ void arm_conv_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -1241,7 +1241,7 @@ void arm_conv_fast_q15( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -1249,7 +1249,7 @@ void arm_conv_fast_q15( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q31_t) * px++ * *py--); @@ -1289,12 +1289,12 @@ void arm_conv_fast_q15( The blockSize3 variable holds the number of MAC operations performed */ /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); - pIn2 = pSrc2 - 1u; + pSrc2 = pIn2 + (srcBLen - 1U); + pIn2 = pSrc2 - 1U; py = pIn2; /* ------------------- @@ -1306,21 +1306,21 @@ void arm_conv_fast_q15( /* Second part of this stage computes the MAC operations less than or equal to 4 */ /* The first part of the stage starts here */ - j = blockSize3 >> 2u; + j = blockSize3 >> 2U; - while ((j > 0u) && (blockSize3 > 0u)) + while ((j > 0U) && (blockSize3 > 0U)) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = blockSize3 >> 2u; + k = blockSize3 >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ py++; - while (k > 0u) + while (k > 0U) { sum += ((q31_t) * px++ * *py--); sum += ((q31_t) * px++ * *py--); @@ -1332,9 +1332,9 @@ void arm_conv_fast_q15( /* If the blockSize3 is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = blockSize3 % 0x4u; + k = blockSize3 % 0x4U; - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 5] * y[srcBLen - 5] */ sum += ((q31_t) * px++ * *py--); @@ -1359,9 +1359,9 @@ void arm_conv_fast_q15( /* The second part of the stage starts here */ /* SIMD is not used for the next MAC operations, * so pointer py is updated to read only one sample at a time */ - py = py + 1u; + py = py + 1U; - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -1369,7 +1369,7 @@ void arm_conv_fast_q15( /* Apply loop unrolling and compute 4 MACs simultaneously. */ k = blockSize3; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ diff --git a/Source/FilteringFunctions/arm_conv_fast_q31.c b/Source/FilteringFunctions/arm_conv_fast_q31.c index 6c4920b7..ce3e3347 100644 --- a/Source/FilteringFunctions/arm_conv_fast_q31.c +++ b/Source/FilteringFunctions/arm_conv_fast_q31.c @@ -117,8 +117,8 @@ void arm_conv_fast_q31( /* The algorithm is implemented in three stages. The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -133,7 +133,7 @@ void arm_conv_fast_q31( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; @@ -147,17 +147,17 @@ void arm_conv_fast_q31( * ----------------------*/ /* The first stage starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 1] */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -181,9 +181,9 @@ void arm_conv_fast_q31( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -221,11 +221,11 @@ void arm_conv_fast_q31( px = pIn1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -234,12 +234,12 @@ void arm_conv_fast_q31( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -253,7 +253,7 @@ void arm_conv_fast_q31( x2 = *(px++); /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -331,9 +331,9 @@ void arm_conv_fast_q31( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Read y[srcBLen - 5] sample */ c0 = *(py--); @@ -367,7 +367,7 @@ void arm_conv_fast_q31( *pOut++ = (q31_t) (acc3 << 1); /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -379,19 +379,19 @@ void arm_conv_fast_q31( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -409,9 +409,9 @@ void arm_conv_fast_q31( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -441,7 +441,7 @@ void arm_conv_fast_q31( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -449,7 +449,7 @@ void arm_conv_fast_q31( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -490,28 +490,28 @@ void arm_conv_fast_q31( The blockSize3 variable holds the number of MAC operations performed */ /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* ------------------- * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = blockSize3 >> 2u; + k = blockSize3 >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 1] * y[srcBLen - 1] */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -535,9 +535,9 @@ void arm_conv_fast_q31( /* If the blockSize3 is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = blockSize3 % 0x4u; + k = blockSize3 % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum = (q31_t) ((((q63_t) sum << 32) + diff --git a/Source/FilteringFunctions/arm_conv_opt_q15.c b/Source/FilteringFunctions/arm_conv_opt_q15.c index 5036b5b0..1b203995 100644 --- a/Source/FilteringFunctions/arm_conv_opt_q15.c +++ b/Source/FilteringFunctions/arm_conv_opt_q15.c @@ -130,12 +130,12 @@ void arm_conv_opt_q15( px = pIn2; /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ /* Copy smaller length input sequence in reverse order into second scratch buffer */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr2-- = *px++; @@ -149,9 +149,9 @@ void arm_conv_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr2-- = *px++; @@ -164,11 +164,11 @@ void arm_conv_opt_q15( pScr1 = pScratch1; /* Assuming scratch1 buffer is aligned by 32-bit */ - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy bigger length sequence(srcALen) samples in scratch1 buffer */ @@ -183,11 +183,11 @@ void arm_conv_opt_q15( #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcALen >> 2u; + k = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = *pIn1++; @@ -201,9 +201,9 @@ void arm_conv_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcALen % 0x4u; + k = srcALen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = *pIn1++; @@ -217,20 +217,20 @@ void arm_conv_opt_q15( #ifndef UNALIGNED_SUPPORT_DISABLE - /* Fill (srcBLen - 1u) zeros at end of scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros at end of scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = (srcBLen - 1u) >> 2u; + k = (srcBLen - 1U) >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = 0; @@ -244,9 +244,9 @@ void arm_conv_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = (srcBLen - 1u) % 0x4u; + k = (srcBLen - 1U) % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = 0; @@ -268,7 +268,7 @@ void arm_conv_opt_q15( ** a second loop below process for the remaining 1 to 3 samples. */ /* Actual convolution process starts here */ - blkCnt = (srcALen + srcBLen - 1u) >> 2; + blkCnt = (srcALen + srcBLen - 1U) >> 2; while (blkCnt > 0) { @@ -287,16 +287,16 @@ void arm_conv_opt_q15( /* Read next two samples from scratch1 buffer */ x2 = *__SIMD32(pScr1)++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE /* Read four samples from smaller buffer */ y1 = _SIMD32_OFFSET(pIn2); - y2 = _SIMD32_OFFSET(pIn2 + 2u); + y2 = _SIMD32_OFFSET(pIn2 + 2U); /* multiply and accumlate */ acc0 = __SMLALD(x1, y1, acc0); @@ -329,7 +329,7 @@ void arm_conv_opt_q15( acc3 = __SMLALDX(x3, y1, acc3); acc1 = __SMLALDX(x3, y2, acc1); - x2 = _SIMD32_OFFSET(pScr1 + 2u); + x2 = _SIMD32_OFFSET(pScr1 + 2U); #ifndef ARM_MATH_BIG_ENDIAN x3 = __PKHBT(x2, x1, 0); @@ -413,8 +413,8 @@ void arm_conv_opt_q15( #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */ - pIn2 += 4u; - pScr1 += 4u; + pIn2 += 4U; + pScr1 += 4U; /* Decrement the loop counter */ @@ -422,12 +422,12 @@ void arm_conv_opt_q15( } /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -436,7 +436,7 @@ void arm_conv_opt_q15( acc2 += (*pScr1++ * *pIn2); acc3 += (*pScr1++ * *pIn2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -469,12 +469,12 @@ void arm_conv_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } - blkCnt = (srcALen + srcBLen - 1u) & 0x3; + blkCnt = (srcALen + srcBLen - 1U) & 0x3; /* Calculate convolution for remaining samples of Bigger length sequence */ while (blkCnt > 0) @@ -485,9 +485,9 @@ void arm_conv_opt_q15( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read next two samples from scratch1 buffer */ @@ -498,10 +498,10 @@ void arm_conv_opt_q15( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -521,7 +521,7 @@ void arm_conv_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } diff --git a/Source/FilteringFunctions/arm_conv_opt_q7.c b/Source/FilteringFunctions/arm_conv_opt_q7.c index 3d0d7058..24d378b0 100644 --- a/Source/FilteringFunctions/arm_conv_opt_q7.c +++ b/Source/FilteringFunctions/arm_conv_opt_q7.c @@ -117,11 +117,11 @@ void arm_conv_opt_q7( px = pIn2 + srcBLen - 1; /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ x4 = (q15_t) * px--; @@ -139,9 +139,9 @@ void arm_conv_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ x4 = (q15_t) * px--; @@ -154,19 +154,19 @@ void arm_conv_opt_q7( /* Initialze temporary scratch pointer */ pScr1 = pScratch1; - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy (srcALen) samples in scratch buffer */ /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcALen >> 2u; + k = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ x4 = (q15_t) * pIn1++; @@ -184,9 +184,9 @@ void arm_conv_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcALen % 0x4u; + k = srcALen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ x4 = (q15_t) * pIn1++; @@ -198,20 +198,20 @@ void arm_conv_opt_q7( #ifndef UNALIGNED_SUPPORT_DISABLE - /* Fill (srcBLen - 1u) zeros at end of scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros at end of scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = (srcBLen - 1u) >> 2u; + k = (srcBLen - 1U) >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = 0; @@ -225,9 +225,9 @@ void arm_conv_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = (srcBLen - 1u) % 0x4u; + k = (srcBLen - 1U) % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = 0; @@ -247,7 +247,7 @@ void arm_conv_opt_q7( pScr2 = py; /* Actual convolution process starts here */ - blkCnt = (srcALen + srcBLen - 1u) >> 2; + blkCnt = (srcALen + srcBLen - 1U) >> 2; while (blkCnt > 0) { @@ -266,9 +266,9 @@ void arm_conv_opt_q7( /* Read next two samples from scratch1 buffer */ x2 = *__SIMD32(pScr1)++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read four samples from smaller buffer */ @@ -301,7 +301,7 @@ void arm_conv_opt_q7( acc3 = __SMLADX(x3, y1, acc3); /* Read four samples from smaller buffer */ - y1 = _SIMD32_OFFSET(pScr2 + 2u); + y1 = _SIMD32_OFFSET(pScr2 + 2U); acc0 = __SMLAD(x2, y1, acc0); @@ -319,7 +319,7 @@ void arm_conv_opt_q7( acc3 = __SMLADX(x3, y1, acc3); - pScr2 += 4u; + pScr2 += 4U; /* Decrement the loop counter */ @@ -329,13 +329,13 @@ void arm_conv_opt_q7( /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -344,7 +344,7 @@ void arm_conv_opt_q7( acc2 += (*pScr1++ * *pScr2); acc3 += (*pScr1++ * *pScr2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -353,22 +353,22 @@ void arm_conv_opt_q7( blkCnt--; /* Store the result in the accumulator in the destination buffer. */ - out0 = (q7_t) (__SSAT(acc0 >> 7u, 8)); - out1 = (q7_t) (__SSAT(acc1 >> 7u, 8)); - out2 = (q7_t) (__SSAT(acc2 >> 7u, 8)); - out3 = (q7_t) (__SSAT(acc3 >> 7u, 8)); + out0 = (q7_t) (__SSAT(acc0 >> 7U, 8)); + out1 = (q7_t) (__SSAT(acc1 >> 7U, 8)); + out2 = (q7_t) (__SSAT(acc2 >> 7U, 8)); + out3 = (q7_t) (__SSAT(acc3 >> 7U, 8)); *__SIMD32(pOut)++ = __PACKq7(out0, out1, out2, out3); /* Initialization of inputB pointer */ pScr2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } - blkCnt = (srcALen + srcBLen - 1u) & 0x3; + blkCnt = (srcALen + srcBLen - 1U) & 0x3; /* Calculate convolution for remaining samples of Bigger length sequence */ while (blkCnt > 0) @@ -379,9 +379,9 @@ void arm_conv_opt_q7( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { acc0 += (*pScr1++ * *pScr2++); acc0 += (*pScr1++ * *pScr2++); @@ -390,10 +390,10 @@ void arm_conv_opt_q7( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -406,12 +406,12 @@ void arm_conv_opt_q7( blkCnt--; /* Store the result in the accumulator in the destination buffer. */ - *pOut++ = (q7_t) (__SSAT(acc0 >> 7u, 8)); + *pOut++ = (q7_t) (__SSAT(acc0 >> 7U, 8)); /* Initialization of inputB pointer */ pScr2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } diff --git a/Source/FilteringFunctions/arm_conv_partial_f32.c b/Source/FilteringFunctions/arm_conv_partial_f32.c index efd6b1bc..60140ff5 100644 --- a/Source/FilteringFunctions/arm_conv_partial_f32.c +++ b/Source/FilteringFunctions/arm_conv_partial_f32.c @@ -103,13 +103,13 @@ arm_status arm_conv_partial_f32( float32_t *pSrc1, *pSrc2; /* Intermediate pointers */ float32_t sum, acc0, acc1, acc2, acc3; /* Accumulator */ float32_t x0, x1, x2, x3, c0; /* Temporary variables to hold state and coefficient values */ - uint32_t j, k, count = 0u, blkCnt, check; + uint32_t j, k, count = 0U, blkCnt, check; int32_t blockSize1, blockSize2, blockSize3; /* loop counters */ arm_status status; /* status of Partial convolution */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -148,7 +148,7 @@ arm_status arm_conv_partial_f32( blockSize3 = ((int32_t)check > (int32_t)srcALen) ? (int32_t)check - (int32_t)srcALen : 0; blockSize3 = ((int32_t)firstIndex > (int32_t)srcALen - 1) ? blockSize3 - (int32_t)firstIndex + (int32_t)srcALen : blockSize3; blockSize1 = ((int32_t) srcBLen - 1) - (int32_t) firstIndex; - blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1u)) ? blockSize1 : + blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1U)) ? blockSize1 : (int32_t) numPoints) : 0; blockSize2 = ((int32_t) check - blockSize3) - (blockSize1 + (int32_t) firstIndex); @@ -181,7 +181,7 @@ arm_status arm_conv_partial_f32( The count variable holds the number of MAC operations performed. Since the partial convolution starts from from firstIndex Number of Macs to be performed is firstIndex + 1 */ - count = 1u + firstIndex; + count = 1U + firstIndex; /* Working pointer of inputA */ px = pIn1; @@ -201,11 +201,11 @@ arm_status arm_conv_partial_f32( sum = 0.0f; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 1] */ sum += *px++ * *py--; @@ -225,9 +225,9 @@ arm_status arm_conv_partial_f32( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += *px++ * *py--; @@ -271,11 +271,11 @@ arm_status arm_conv_partial_f32( } /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -284,12 +284,12 @@ arm_status arm_conv_partial_f32( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = ((uint32_t) blockSize2 >> 2u); + blkCnt = ((uint32_t) blockSize2 >> 2U); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0.0f; @@ -303,7 +303,7 @@ arm_status arm_conv_partial_f32( x2 = *(px++); /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -381,9 +381,9 @@ arm_status arm_conv_partial_f32( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Read y[srcBLen - 5] sample */ c0 = *(py--); @@ -417,7 +417,7 @@ arm_status arm_conv_partial_f32( *pOut++ = acc3; /* Increment the pointer pIn1 index, count by 1 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -429,19 +429,19 @@ arm_status arm_conv_partial_f32( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = (uint32_t) blockSize2 % 0x4u; + blkCnt = (uint32_t) blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += *px++ * *py--; @@ -455,9 +455,9 @@ arm_status arm_conv_partial_f32( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += *px++ * *py--; @@ -486,7 +486,7 @@ arm_status arm_conv_partial_f32( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = (uint32_t) blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; @@ -494,7 +494,7 @@ arm_status arm_conv_partial_f32( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += *px++ * *py--; @@ -532,14 +532,14 @@ arm_status arm_conv_partial_f32( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; while (blockSize3 > 0) @@ -548,11 +548,11 @@ arm_status arm_conv_partial_f32( sum = 0.0f; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 1] * y[srcBLen - 1] */ sum += *px++ * *py--; @@ -572,9 +572,9 @@ arm_status arm_conv_partial_f32( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ @@ -617,7 +617,7 @@ arm_status arm_conv_partial_f32( arm_status status; /* status of Partial convolution */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -631,7 +631,7 @@ arm_status arm_conv_partial_f32( sum = 0.0f; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations for inputs */ if ((((i - j) < srcBLen) && (j < srcALen))) diff --git a/Source/FilteringFunctions/arm_conv_partial_fast_opt_q15.c b/Source/FilteringFunctions/arm_conv_partial_fast_opt_q15.c index c6e40295..cf2d711a 100644 --- a/Source/FilteringFunctions/arm_conv_partial_fast_opt_q15.c +++ b/Source/FilteringFunctions/arm_conv_partial_fast_opt_q15.c @@ -88,7 +88,7 @@ arm_status arm_conv_partial_fast_opt_q15( uint32_t tapCnt; /* loop count */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -131,13 +131,13 @@ arm_status arm_conv_partial_fast_opt_q15( px = pIn2; /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ /* Copy smaller length input sequence in reverse order into second scratch buffer */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr2-- = *px++; @@ -151,9 +151,9 @@ arm_status arm_conv_partial_fast_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr2-- = *px++; @@ -166,11 +166,11 @@ arm_status arm_conv_partial_fast_opt_q15( pScr1 = pScratch1; /* Assuming scratch1 buffer is aligned by 32-bit */ - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy bigger length sequence(srcALen) samples in scratch1 buffer */ @@ -180,11 +180,11 @@ arm_status arm_conv_partial_fast_opt_q15( /* Update pointers */ pScr1 += srcALen; - /* Fill (srcBLen - 1u) zeros at end of scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros at end of scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Initialization of pIn2 pointer */ pIn2 = py; @@ -216,14 +216,14 @@ arm_status arm_conv_partial_fast_opt_q15( /* Read next two samples from scratch1 buffer */ x2 = *__SIMD32(pScr1)++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read four samples from smaller buffer */ y1 = _SIMD32_OFFSET(pIn2); - y2 = _SIMD32_OFFSET(pIn2 + 2u); + y2 = _SIMD32_OFFSET(pIn2 + 2U); /* multiply and accumlate */ acc0 = __SMLAD(x1, y1, acc0); @@ -257,7 +257,7 @@ arm_status arm_conv_partial_fast_opt_q15( acc3 = __SMLADX(x3, y1, acc3); acc1 = __SMLADX(x3, y2, acc1); - x2 = _SIMD32_OFFSET(pScr1 + 2u); + x2 = _SIMD32_OFFSET(pScr1 + 2U); #ifndef ARM_MATH_BIG_ENDIAN x3 = __PKHBT(x2, x1, 0); @@ -268,8 +268,8 @@ arm_status arm_conv_partial_fast_opt_q15( acc3 = __SMLADX(x3, y2, acc3); /* update scratch pointers */ - pIn2 += 4u; - pScr1 += 4u; + pIn2 += 4U; + pScr1 += 4U; /* Decrement the loop counter */ @@ -277,12 +277,12 @@ arm_status arm_conv_partial_fast_opt_q15( } /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -291,7 +291,7 @@ arm_status arm_conv_partial_fast_opt_q15( acc2 += (*pScr1++ * *pIn2); acc3 += (*pScr1++ * *pIn2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -321,7 +321,7 @@ arm_status arm_conv_partial_fast_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } @@ -337,9 +337,9 @@ arm_status arm_conv_partial_fast_opt_q15( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read next two samples from scratch1 buffer */ @@ -354,10 +354,10 @@ arm_status arm_conv_partial_fast_opt_q15( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -376,7 +376,7 @@ arm_status arm_conv_partial_fast_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } /* set status as ARM_MATH_SUCCESS */ @@ -416,7 +416,7 @@ arm_status arm_conv_partial_fast_opt_q15( /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -459,11 +459,11 @@ arm_status arm_conv_partial_fast_opt_q15( px = pIn2; /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr2-- = *px++; @@ -477,9 +477,9 @@ arm_status arm_conv_partial_fast_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr2-- = *px++; @@ -491,21 +491,21 @@ arm_status arm_conv_partial_fast_opt_q15( /* Initialze temporary scratch pointer */ pScr1 = pScratch1; - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy bigger length sequence(srcALen) samples in scratch1 buffer */ /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcALen >> 2u; + k = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = *pIn1++; @@ -519,9 +519,9 @@ arm_status arm_conv_partial_fast_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcALen % 0x4u; + k = srcALen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = *pIn1++; @@ -532,11 +532,11 @@ arm_status arm_conv_partial_fast_opt_q15( /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = (srcBLen - 1u) >> 2u; + k = (srcBLen - 1U) >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = 0; @@ -550,9 +550,9 @@ arm_status arm_conv_partial_fast_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = (srcBLen - 1u) % 0x4u; + k = (srcBLen - 1U) % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = 0; @@ -591,14 +591,14 @@ arm_status arm_conv_partial_fast_opt_q15( x20 = *pScr1++; x21 = *pScr1++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read two samples from smaller buffer */ y10 = *pIn2; - y11 = *(pIn2 + 1u); + y11 = *(pIn2 + 1U); /* multiply and accumlate */ acc0 += (q31_t) x10 *y10; @@ -612,15 +612,15 @@ arm_status arm_conv_partial_fast_opt_q15( /* Read next two samples from scratch1 buffer */ x10 = *pScr1; - x11 = *(pScr1 + 1u); + x11 = *(pScr1 + 1U); /* multiply and accumlate */ acc3 += (q31_t) x21 *y10; acc3 += (q31_t) x10 *y11; /* Read next two samples from scratch2 buffer */ - y10 = *(pIn2 + 2u); - y11 = *(pIn2 + 3u); + y10 = *(pIn2 + 2U); + y11 = *(pIn2 + 3U); /* multiply and accumlate */ acc0 += (q31_t) x20 *y10; @@ -639,20 +639,20 @@ arm_status arm_conv_partial_fast_opt_q15( acc3 += (q31_t) x20 *y11; /* update scratch pointers */ - pIn2 += 4u; - pScr1 += 4u; + pIn2 += 4U; + pScr1 += 4U; /* Decrement the loop counter */ tapCnt--; } /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ acc0 += (*pScr1++ * *pIn2); @@ -660,7 +660,7 @@ arm_status arm_conv_partial_fast_opt_q15( acc2 += (*pScr1++ * *pIn2); acc3 += (*pScr1++ * *pIn2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -678,7 +678,7 @@ arm_status arm_conv_partial_fast_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } @@ -694,9 +694,9 @@ arm_status arm_conv_partial_fast_opt_q15( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read next two samples from scratch1 buffer */ @@ -715,10 +715,10 @@ arm_status arm_conv_partial_fast_opt_q15( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -736,7 +736,7 @@ arm_status arm_conv_partial_fast_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } diff --git a/Source/FilteringFunctions/arm_conv_partial_fast_q15.c b/Source/FilteringFunctions/arm_conv_partial_fast_q15.c index 8f201b1c..3ef651b3 100644 --- a/Source/FilteringFunctions/arm_conv_partial_fast_q15.c +++ b/Source/FilteringFunctions/arm_conv_partial_fast_q15.c @@ -76,7 +76,7 @@ arm_status arm_conv_partial_fast_q15( arm_status status; /* status of Partial convolution */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -115,7 +115,7 @@ arm_status arm_conv_partial_fast_q15( blockSize3 = ((int32_t)check > (int32_t)srcALen) ? (int32_t)check - (int32_t)srcALen : 0; blockSize3 = ((int32_t)firstIndex > (int32_t)srcALen - 1) ? blockSize3 - (int32_t)firstIndex + (int32_t)srcALen : blockSize3; blockSize1 = (((int32_t) srcBLen - 1) - (int32_t) firstIndex); - blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1u)) ? blockSize1 : + blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1U)) ? blockSize1 : (int32_t) numPoints) : 0; blockSize2 = (int32_t) check - ((blockSize3 + blockSize1) + (int32_t) firstIndex); @@ -148,7 +148,7 @@ arm_status arm_conv_partial_fast_q15( The count variable holds the number of MAC operations performed. Since the partial convolution starts from firstIndex Number of Macs to be performed is firstIndex + 1 */ - count = 1u + firstIndex; + count = 1U + firstIndex; /* Working pointer of inputA */ px = pIn1; @@ -166,7 +166,7 @@ arm_status arm_conv_partial_fast_q15( /* Second part of this stage computes the MAC operations greater than or equal to 4 */ /* The first part of the stage starts here */ - while ((count < 4u) && (blockSize1 > 0)) + while ((count < 4U) && (blockSize1 > 0)) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -175,7 +175,7 @@ arm_status arm_conv_partial_fast_q15( * inputA samples and inputB samples */ k = count; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLAD(*px++, *py--, sum); @@ -210,11 +210,11 @@ arm_status arm_conv_partial_fast_q15( sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0], x[1] are multiplied with y[srcBLen - 1], y[srcBLen - 2] respectively */ @@ -228,13 +228,13 @@ arm_status arm_conv_partial_fast_q15( /* For the next MAC operations, the pointer py is used without SIMD * So, py is incremented by 1 */ - py = py + 1u; + py = py + 1U; /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLAD(*px++, *py--, sum); @@ -247,7 +247,7 @@ arm_status arm_conv_partial_fast_q15( *pOut++ = (q15_t) (sum >> 15); /* Update the inputA and inputB pointers for next MAC calculation */ - py = ++pSrc2 - 1u; + py = ++pSrc2 - 1U; px = pIn1; /* Increment the MAC count */ @@ -278,11 +278,11 @@ arm_status arm_conv_partial_fast_q15( } /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is the index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* -------------------- @@ -292,14 +292,14 @@ arm_status arm_conv_partial_fast_q15( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = ((uint32_t) blockSize2 >> 2u); + blkCnt = ((uint32_t) blockSize2 >> 2U); - while (blkCnt > 0u) + while (blkCnt > 0U) { - py = py - 1u; + py = py - 1U; /* Set all accumulators to zero */ acc0 = 0; @@ -312,11 +312,11 @@ arm_status arm_conv_partial_fast_q15( x0 = *__SIMD32(px); /* read x[1], x[2] samples */ x1 = _SIMD32_OFFSET(px+1); - px+= 2u; + px+= 2U; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -358,7 +358,7 @@ arm_status arm_conv_partial_fast_q15( /* Read x[5], x[6] */ x1 = _SIMD32_OFFSET(px+3); - px += 4u; + px += 4U; /* acc2 += x[4] * y[srcBLen - 3] + x[5] * y[srcBLen - 4] */ acc2 = __SMLADX(x0, c0, acc2); @@ -373,15 +373,15 @@ arm_status arm_conv_partial_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - if (k == 1u) + if (k == 1U) { /* Read y[srcBLen - 5] */ c0 = *(py+1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else @@ -400,7 +400,7 @@ arm_status arm_conv_partial_fast_q15( acc3 = __SMLADX(x3, c0, acc3); } - if (k == 2u) + if (k == 2U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ c0 = _SIMD32_OFFSET(py); @@ -410,7 +410,7 @@ arm_status arm_conv_partial_fast_q15( /* Read x[9] */ x2 = _SIMD32_OFFSET(px+1); - px += 2u; + px += 2U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x0, c0, acc0); @@ -419,7 +419,7 @@ arm_status arm_conv_partial_fast_q15( acc3 = __SMLADX(x2, c0, acc3); } - if (k == 3u) + if (k == 3U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ c0 = _SIMD32_OFFSET(py); @@ -439,7 +439,7 @@ arm_status arm_conv_partial_fast_q15( c0 = *(py-1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else c0 = c0 & 0x0000FFFF; @@ -447,7 +447,7 @@ arm_status arm_conv_partial_fast_q15( /* Read x[10] */ x3 = _SIMD32_OFFSET(px+2); - px += 3u; + px += 3U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x1, c0, acc0); @@ -470,7 +470,7 @@ arm_status arm_conv_partial_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -482,19 +482,19 @@ arm_status arm_conv_partial_fast_q15( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = (uint32_t) blockSize2 % 0x4u; + blkCnt = (uint32_t) blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -508,9 +508,9 @@ arm_status arm_conv_partial_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -539,7 +539,7 @@ arm_status arm_conv_partial_fast_q15( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = (uint32_t) blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -547,7 +547,7 @@ arm_status arm_conv_partial_fast_q15( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q31_t) * px++ * *py--); @@ -585,15 +585,15 @@ arm_status arm_conv_partial_fast_q15( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); - pIn2 = pSrc2 - 1u; + pSrc2 = pIn2 + (srcBLen - 1U); + pIn2 = pSrc2 - 1U; py = pIn2; /* ------------------- @@ -605,19 +605,19 @@ arm_status arm_conv_partial_fast_q15( /* Second part of this stage computes the MAC operations less than or equal to 4 */ /* The first part of the stage starts here */ - j = count >> 2u; + j = count >> 2U; - while ((j > 0u) && (blockSize3 > 0)) + while ((j > 0U) && (blockSize3 > 0)) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[srcALen - srcBLen + 1], x[srcALen - srcBLen + 2] are multiplied * with y[srcBLen - 1], y[srcBLen - 2] respectively */ @@ -632,13 +632,13 @@ arm_status arm_conv_partial_fast_q15( /* For the next MAC operations, the pointer py is used without SIMD * So, py is incremented by 1 */ - py = py + 1u; + py = py + 1U; /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 5] * y[srcBLen - 5] */ sum = __SMLAD(*px++, *py--, sum); @@ -666,7 +666,7 @@ arm_status arm_conv_partial_fast_q15( /* The second part of the stage starts here */ /* SIMD is not used for the next MAC operations, * so pointer py is updated to read only one sample at a time */ - py = py + 1u; + py = py + 1U; while (blockSize3 > 0) { @@ -676,7 +676,7 @@ arm_status arm_conv_partial_fast_q15( /* Apply loop unrolling and compute 4 MACs simultaneously. */ k = count; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ @@ -723,7 +723,7 @@ arm_status arm_conv_partial_fast_q15( q15_t a, b; /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -762,7 +762,7 @@ arm_status arm_conv_partial_fast_q15( blockSize3 = ((int32_t)check > (int32_t)srcALen) ? (int32_t)check - (int32_t)srcALen : 0; blockSize3 = ((int32_t)firstIndex > (int32_t)srcALen - 1) ? blockSize3 - (int32_t)firstIndex + (int32_t)srcALen : blockSize3; blockSize1 = ((int32_t) srcBLen - 1) - (int32_t) firstIndex; - blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1u)) ? blockSize1 : + blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1U)) ? blockSize1 : (int32_t) numPoints) : 0; blockSize2 = ((int32_t) check - blockSize3) - (blockSize1 + (int32_t) firstIndex); @@ -795,7 +795,7 @@ arm_status arm_conv_partial_fast_q15( The count variable holds the number of MAC operations performed. Since the partial convolution starts from firstIndex Number of Macs to be performed is firstIndex + 1 */ - count = 1u + firstIndex; + count = 1U + firstIndex; /* Working pointer of inputA */ px = pIn1; @@ -813,7 +813,7 @@ arm_status arm_conv_partial_fast_q15( /* Second part of this stage computes the MAC operations greater than or equal to 4 */ /* The first part of the stage starts here */ - while ((count < 4u) && (blockSize1 > 0)) + while ((count < 4U) && (blockSize1 > 0)) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -822,7 +822,7 @@ arm_status arm_conv_partial_fast_q15( * inputA samples and inputB samples */ k = count; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -857,13 +857,13 @@ arm_status arm_conv_partial_fast_q15( sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ py++; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -877,9 +877,9 @@ arm_status arm_conv_partial_fast_q15( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -892,7 +892,7 @@ arm_status arm_conv_partial_fast_q15( *pOut++ = (q15_t) (sum >> 15); /* Update the inputA and inputB pointers for next MAC calculation */ - py = ++pSrc2 - 1u; + py = ++pSrc2 - 1U; px = pIn1; /* Increment the MAC count */ @@ -923,11 +923,11 @@ arm_status arm_conv_partial_fast_q15( } /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is the index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* -------------------- @@ -937,14 +937,14 @@ arm_status arm_conv_partial_fast_q15( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = ((uint32_t) blockSize2 >> 2u); + blkCnt = ((uint32_t) blockSize2 >> 2U); - while (blkCnt > 0u) + while (blkCnt > 0U) { - py = py - 1u; + py = py - 1U; /* Set all accumulators to zero */ acc0 = 0; @@ -971,7 +971,7 @@ arm_status arm_conv_partial_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -1061,7 +1061,7 @@ arm_status arm_conv_partial_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 4u; + px += 4U; /* acc2 += x[4] * y[srcBLen - 3] + x[5] * y[srcBLen - 4] */ acc2 = __SMLADX(x0, c0, acc2); @@ -1076,16 +1076,16 @@ arm_status arm_conv_partial_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - if (k == 1u) + if (k == 1U) { /* Read y[srcBLen - 5] */ c0 = *(py+1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else @@ -1116,7 +1116,7 @@ arm_status arm_conv_partial_fast_q15( acc3 = __SMLADX(x3, c0, acc3); } - if (k == 2u) + if (k == 2U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ a = *py; @@ -1149,7 +1149,7 @@ arm_status arm_conv_partial_fast_q15( x2 = __PKHBT(a, b, 16); #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 2u; + px += 2U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x0, c0, acc0); @@ -1158,7 +1158,7 @@ arm_status arm_conv_partial_fast_q15( acc3 = __SMLADX(x2, c0, acc3); } - if (k == 3u) + if (k == 3U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ a = *py; @@ -1202,7 +1202,7 @@ arm_status arm_conv_partial_fast_q15( c0 = *(py-1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else c0 = c0 & 0x0000FFFF; @@ -1222,7 +1222,7 @@ arm_status arm_conv_partial_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 3u; + px += 3U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x1, c0, acc0); @@ -1238,7 +1238,7 @@ arm_status arm_conv_partial_fast_q15( *pOut++ = (q15_t)(acc3 >> 15); /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -1250,19 +1250,19 @@ arm_status arm_conv_partial_fast_q15( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = (uint32_t) blockSize2 % 0x4u; + blkCnt = (uint32_t) blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -1276,9 +1276,9 @@ arm_status arm_conv_partial_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -1307,7 +1307,7 @@ arm_status arm_conv_partial_fast_q15( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = (uint32_t) blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -1315,7 +1315,7 @@ arm_status arm_conv_partial_fast_q15( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q31_t) * px++ * *py--); @@ -1353,15 +1353,15 @@ arm_status arm_conv_partial_fast_q15( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); - pIn2 = pSrc2 - 1u; + pSrc2 = pIn2 + (srcBLen - 1U); + pIn2 = pSrc2 - 1U; py = pIn2; /* ------------------- @@ -1373,21 +1373,21 @@ arm_status arm_conv_partial_fast_q15( /* Second part of this stage computes the MAC operations less than or equal to 4 */ /* The first part of the stage starts here */ - j = count >> 2u; + j = count >> 2U; - while ((j > 0u) && (blockSize3 > 0)) + while ((j > 0U) && (blockSize3 > 0)) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ py++; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -1401,9 +1401,9 @@ arm_status arm_conv_partial_fast_q15( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -1431,7 +1431,7 @@ arm_status arm_conv_partial_fast_q15( /* The second part of the stage starts here */ /* SIMD is not used for the next MAC operations, * so pointer py is updated to read only one sample at a time */ - py = py + 1u; + py = py + 1U; while (blockSize3 > 0) { @@ -1441,7 +1441,7 @@ arm_status arm_conv_partial_fast_q15( /* Apply loop unrolling and compute 4 MACs simultaneously. */ k = count; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ diff --git a/Source/FilteringFunctions/arm_conv_partial_fast_q31.c b/Source/FilteringFunctions/arm_conv_partial_fast_q31.c index 9a4cfebb..1d9438b6 100644 --- a/Source/FilteringFunctions/arm_conv_partial_fast_q31.c +++ b/Source/FilteringFunctions/arm_conv_partial_fast_q31.c @@ -75,7 +75,7 @@ arm_status arm_conv_partial_fast_q31( /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -114,7 +114,7 @@ arm_status arm_conv_partial_fast_q31( blockSize3 = ((int32_t)check > (int32_t)srcALen) ? (int32_t)check - (int32_t)srcALen : 0; blockSize3 = ((int32_t)firstIndex > (int32_t)srcALen - 1) ? blockSize3 - (int32_t)firstIndex + (int32_t)srcALen : blockSize3; blockSize1 = (((int32_t) srcBLen - 1) - (int32_t) firstIndex); - blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1u)) ? blockSize1 : + blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1U)) ? blockSize1 : (int32_t) numPoints) : 0; blockSize2 = (int32_t) check - ((blockSize3 + blockSize1) + (int32_t) firstIndex); @@ -147,7 +147,7 @@ arm_status arm_conv_partial_fast_q31( The count variable holds the number of MAC operations performed. Since the partial convolution starts from firstIndex Number of Macs to be performed is firstIndex + 1 */ - count = 1u + firstIndex; + count = 1U + firstIndex; /* Working pointer of inputA */ px = pIn1; @@ -167,11 +167,11 @@ arm_status arm_conv_partial_fast_q31( sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 1] */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -195,9 +195,9 @@ arm_status arm_conv_partial_fast_q31( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -242,11 +242,11 @@ arm_status arm_conv_partial_fast_q31( } /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -255,12 +255,12 @@ arm_status arm_conv_partial_fast_q31( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2 */ - blkCnt = ((uint32_t) blockSize2 >> 2u); + blkCnt = ((uint32_t) blockSize2 >> 2U); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -274,7 +274,7 @@ arm_status arm_conv_partial_fast_q31( x2 = *(px++); /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -352,9 +352,9 @@ arm_status arm_conv_partial_fast_q31( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Read y[srcBLen - 5] sample */ c0 = *(py--); @@ -388,7 +388,7 @@ arm_status arm_conv_partial_fast_q31( *pOut++ = (q31_t) (acc3 << 1); /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -400,19 +400,19 @@ arm_status arm_conv_partial_fast_q31( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = (uint32_t) blockSize2 % 0x4u; + blkCnt = (uint32_t) blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -430,9 +430,9 @@ arm_status arm_conv_partial_fast_q31( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -462,7 +462,7 @@ arm_status arm_conv_partial_fast_q31( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = (uint32_t) blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -470,7 +470,7 @@ arm_status arm_conv_partial_fast_q31( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -509,14 +509,14 @@ arm_status arm_conv_partial_fast_q31( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* ------------------- @@ -529,11 +529,11 @@ arm_status arm_conv_partial_fast_q31( sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 1] * y[srcBLen - 1] */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -557,9 +557,9 @@ arm_status arm_conv_partial_fast_q31( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ diff --git a/Source/FilteringFunctions/arm_conv_partial_opt_q15.c b/Source/FilteringFunctions/arm_conv_partial_opt_q15.c index bb88ad04..44e368eb 100644 --- a/Source/FilteringFunctions/arm_conv_partial_opt_q15.c +++ b/Source/FilteringFunctions/arm_conv_partial_opt_q15.c @@ -88,7 +88,7 @@ arm_status arm_conv_partial_opt_q15( uint32_t tapCnt; /* loop count */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -131,11 +131,11 @@ arm_status arm_conv_partial_opt_q15( px = pIn2; /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr2-- = *px++; @@ -149,9 +149,9 @@ arm_status arm_conv_partial_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr2-- = *px++; @@ -163,11 +163,11 @@ arm_status arm_conv_partial_opt_q15( /* Initialze temporary scratch pointer */ pScr1 = pScratch1; - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy bigger length sequence(srcALen) samples in scratch1 buffer */ @@ -177,11 +177,11 @@ arm_status arm_conv_partial_opt_q15( /* Update pointers */ pScr1 += srcALen; - /* Fill (srcBLen - 1u) zeros at end of scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros at end of scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Initialization of pIn2 pointer */ pIn2 = py; @@ -210,14 +210,14 @@ arm_status arm_conv_partial_opt_q15( /* Read next two samples from scratch1 buffer */ x2 = *__SIMD32(pScr1)++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read four samples from smaller buffer */ y1 = _SIMD32_OFFSET(pIn2); - y2 = _SIMD32_OFFSET(pIn2 + 2u); + y2 = _SIMD32_OFFSET(pIn2 + 2U); /* multiply and accumlate */ acc0 = __SMLALD(x1, y1, acc0); @@ -250,7 +250,7 @@ arm_status arm_conv_partial_opt_q15( acc3 = __SMLALDX(x3, y1, acc3); acc1 = __SMLALDX(x3, y2, acc1); - x2 = _SIMD32_OFFSET(pScr1 + 2u); + x2 = _SIMD32_OFFSET(pScr1 + 2U); #ifndef ARM_MATH_BIG_ENDIAN x3 = __PKHBT(x2, x1, 0); @@ -261,8 +261,8 @@ arm_status arm_conv_partial_opt_q15( acc3 = __SMLALDX(x3, y2, acc3); /* update scratch pointers */ - pIn2 += 4u; - pScr1 += 4u; + pIn2 += 4U; + pScr1 += 4U; /* Decrement the loop counter */ @@ -270,12 +270,12 @@ arm_status arm_conv_partial_opt_q15( } /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ acc0 += (*pScr1++ * *pIn2); @@ -283,7 +283,7 @@ arm_status arm_conv_partial_opt_q15( acc2 += (*pScr1++ * *pIn2); acc3 += (*pScr1++ * *pIn2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -313,7 +313,7 @@ arm_status arm_conv_partial_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } @@ -329,9 +329,9 @@ arm_status arm_conv_partial_opt_q15( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read next two samples from scratch1 buffer */ @@ -346,10 +346,10 @@ arm_status arm_conv_partial_opt_q15( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -367,7 +367,7 @@ arm_status arm_conv_partial_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } @@ -410,7 +410,7 @@ arm_status arm_conv_partial_opt_q15( /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -453,11 +453,11 @@ arm_status arm_conv_partial_opt_q15( px = pIn2; /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr2-- = *px++; @@ -471,9 +471,9 @@ arm_status arm_conv_partial_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr2-- = *px++; @@ -485,21 +485,21 @@ arm_status arm_conv_partial_opt_q15( /* Initialze temporary scratch pointer */ pScr1 = pScratch1; - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy bigger length sequence(srcALen) samples in scratch1 buffer */ /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcALen >> 2u; + k = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = *pIn1++; @@ -513,9 +513,9 @@ arm_status arm_conv_partial_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcALen % 0x4u; + k = srcALen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = *pIn1++; @@ -526,11 +526,11 @@ arm_status arm_conv_partial_opt_q15( /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = (srcBLen - 1u) >> 2u; + k = (srcBLen - 1U) >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = 0; @@ -544,9 +544,9 @@ arm_status arm_conv_partial_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = (srcBLen - 1u) % 0x4u; + k = (srcBLen - 1U) % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = 0; @@ -585,14 +585,14 @@ arm_status arm_conv_partial_opt_q15( x20 = *pScr1++; x21 = *pScr1++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read two samples from smaller buffer */ y10 = *pIn2; - y11 = *(pIn2 + 1u); + y11 = *(pIn2 + 1U); /* multiply and accumlate */ acc0 += (q63_t) x10 *y10; @@ -606,15 +606,15 @@ arm_status arm_conv_partial_opt_q15( /* Read next two samples from scratch1 buffer */ x10 = *pScr1; - x11 = *(pScr1 + 1u); + x11 = *(pScr1 + 1U); /* multiply and accumlate */ acc3 += (q63_t) x21 *y10; acc3 += (q63_t) x10 *y11; /* Read next two samples from scratch2 buffer */ - y10 = *(pIn2 + 2u); - y11 = *(pIn2 + 3u); + y10 = *(pIn2 + 2U); + y11 = *(pIn2 + 3U); /* multiply and accumlate */ acc0 += (q63_t) x20 *y10; @@ -633,20 +633,20 @@ arm_status arm_conv_partial_opt_q15( acc3 += (q63_t) x20 *y11; /* update scratch pointers */ - pIn2 += 4u; - pScr1 += 4u; + pIn2 += 4U; + pScr1 += 4U; /* Decrement the loop counter */ tapCnt--; } /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ acc0 += (*pScr1++ * *pIn2); @@ -654,7 +654,7 @@ arm_status arm_conv_partial_opt_q15( acc2 += (*pScr1++ * *pIn2); acc3 += (*pScr1++ * *pIn2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -673,7 +673,7 @@ arm_status arm_conv_partial_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } @@ -689,9 +689,9 @@ arm_status arm_conv_partial_opt_q15( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read next two samples from scratch1 buffer */ @@ -710,10 +710,10 @@ arm_status arm_conv_partial_opt_q15( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -732,7 +732,7 @@ arm_status arm_conv_partial_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } diff --git a/Source/FilteringFunctions/arm_conv_partial_opt_q7.c b/Source/FilteringFunctions/arm_conv_partial_opt_q7.c index 3505b2f5..00dbef1a 100644 --- a/Source/FilteringFunctions/arm_conv_partial_opt_q7.c +++ b/Source/FilteringFunctions/arm_conv_partial_opt_q7.c @@ -86,7 +86,7 @@ arm_status arm_conv_partial_opt_q7( q7_t out0, out1, out2, out3; /* temporary variables */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -126,11 +126,11 @@ arm_status arm_conv_partial_opt_q7( px = pIn2 + srcBLen - 1; /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ x4 = (q15_t) * px--; @@ -148,9 +148,9 @@ arm_status arm_conv_partial_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ x4 = (q15_t) * px--; @@ -163,19 +163,19 @@ arm_status arm_conv_partial_opt_q7( /* Initialze temporary scratch pointer */ pScr1 = pScratch1; - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy (srcALen) samples in scratch buffer */ /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcALen >> 2u; + k = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ x4 = (q15_t) * pIn1++; @@ -193,9 +193,9 @@ arm_status arm_conv_partial_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcALen % 0x4u; + k = srcALen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ x4 = (q15_t) * pIn1++; @@ -205,11 +205,11 @@ arm_status arm_conv_partial_opt_q7( k--; } - /* Fill (srcBLen - 1u) zeros at end of scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros at end of scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Temporary pointer for scratch2 */ @@ -245,9 +245,9 @@ arm_status arm_conv_partial_opt_q7( /* Read next two samples from scratch1 buffer */ x2 = *__SIMD32(pScr1)++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read four samples from smaller buffer */ @@ -280,7 +280,7 @@ arm_status arm_conv_partial_opt_q7( acc3 = __SMLADX(x3, y1, acc3); /* Read four samples from smaller buffer */ - y1 = _SIMD32_OFFSET(pScr2 + 2u); + y1 = _SIMD32_OFFSET(pScr2 + 2U); acc0 = __SMLAD(x2, y1, acc0); @@ -298,7 +298,7 @@ arm_status arm_conv_partial_opt_q7( acc3 = __SMLADX(x3, y1, acc3); - pScr2 += 4u; + pScr2 += 4U; /* Decrement the loop counter */ @@ -308,13 +308,13 @@ arm_status arm_conv_partial_opt_q7( /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -323,7 +323,7 @@ arm_status arm_conv_partial_opt_q7( acc2 += (*pScr1++ * *pScr2); acc3 += (*pScr1++ * *pScr2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -332,17 +332,17 @@ arm_status arm_conv_partial_opt_q7( blkCnt--; /* Store the result in the accumulator in the destination buffer. */ - out0 = (q7_t) (__SSAT(acc0 >> 7u, 8)); - out1 = (q7_t) (__SSAT(acc1 >> 7u, 8)); - out2 = (q7_t) (__SSAT(acc2 >> 7u, 8)); - out3 = (q7_t) (__SSAT(acc3 >> 7u, 8)); + out0 = (q7_t) (__SSAT(acc0 >> 7U, 8)); + out1 = (q7_t) (__SSAT(acc1 >> 7U, 8)); + out2 = (q7_t) (__SSAT(acc2 >> 7U, 8)); + out3 = (q7_t) (__SSAT(acc3 >> 7U, 8)); *__SIMD32(pOut)++ = __PACKq7(out0, out1, out2, out3); /* Initialization of inputB pointer */ pScr2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } @@ -357,9 +357,9 @@ arm_status arm_conv_partial_opt_q7( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read next two samples from scratch1 buffer */ @@ -374,10 +374,10 @@ arm_status arm_conv_partial_opt_q7( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -390,12 +390,12 @@ arm_status arm_conv_partial_opt_q7( blkCnt--; /* Store the result in the accumulator in the destination buffer. */ - *pOut++ = (q7_t) (__SSAT(acc0 >> 7u, 8)); + *pOut++ = (q7_t) (__SSAT(acc0 >> 7U, 8)); /* Initialization of inputB pointer */ pScr2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } @@ -436,7 +436,7 @@ arm_status arm_conv_partial_opt_q7( q15_t y10, y11; /* Temporary input variables */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -476,11 +476,11 @@ arm_status arm_conv_partial_opt_q7( px = pIn2 + srcBLen - 1; /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ x4 = (q15_t) * px--; @@ -498,9 +498,9 @@ arm_status arm_conv_partial_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ x4 = (q15_t) * px--; @@ -513,19 +513,19 @@ arm_status arm_conv_partial_opt_q7( /* Initialze temporary scratch pointer */ pScr1 = pScratch1; - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy (srcALen) samples in scratch buffer */ /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = srcALen >> 2u; + k = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ x4 = (q15_t) * pIn1++; @@ -543,9 +543,9 @@ arm_status arm_conv_partial_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcALen % 0x4u; + k = srcALen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ x4 = (q15_t) * pIn1++; @@ -556,11 +556,11 @@ arm_status arm_conv_partial_opt_q7( } /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = (srcBLen - 1u) >> 2u; + k = (srcBLen - 1U) >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = 0; @@ -574,9 +574,9 @@ arm_status arm_conv_partial_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = (srcBLen - 1u) % 0x4u; + k = (srcBLen - 1U) % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = 0; @@ -621,14 +621,14 @@ arm_status arm_conv_partial_opt_q7( x20 = *pScr1++; x21 = *pScr1++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read four samples from smaller buffer */ y10 = *pScr2; - y11 = *(pScr2 + 1u); + y11 = *(pScr2 + 1U); /* multiply and accumlate */ acc0 += (q31_t) x10 *y10; @@ -642,15 +642,15 @@ arm_status arm_conv_partial_opt_q7( /* Read next two samples from scratch1 buffer */ x10 = *pScr1; - x11 = *(pScr1 + 1u); + x11 = *(pScr1 + 1U); /* multiply and accumlate */ acc3 += (q31_t) x21 *y10; acc3 += (q31_t) x10 *y11; /* Read next two samples from scratch2 buffer */ - y10 = *(pScr2 + 2u); - y11 = *(pScr2 + 3u); + y10 = *(pScr2 + 2U); + y11 = *(pScr2 + 3U); /* multiply and accumlate */ acc0 += (q31_t) x20 *y10; @@ -670,8 +670,8 @@ arm_status arm_conv_partial_opt_q7( /* update scratch pointers */ - pScr1 += 4u; - pScr2 += 4u; + pScr1 += 4U; + pScr2 += 4U; /* Decrement the loop counter */ tapCnt--; @@ -680,13 +680,13 @@ arm_status arm_conv_partial_opt_q7( /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -695,7 +695,7 @@ arm_status arm_conv_partial_opt_q7( acc2 += (*pScr1++ * *pScr2); acc3 += (*pScr1++ * *pScr2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -704,15 +704,15 @@ arm_status arm_conv_partial_opt_q7( blkCnt--; /* Store the result in the accumulator in the destination buffer. */ - *pOut++ = (q7_t) (__SSAT(acc0 >> 7u, 8)); - *pOut++ = (q7_t) (__SSAT(acc1 >> 7u, 8)); - *pOut++ = (q7_t) (__SSAT(acc2 >> 7u, 8)); - *pOut++ = (q7_t) (__SSAT(acc3 >> 7u, 8)); + *pOut++ = (q7_t) (__SSAT(acc0 >> 7U, 8)); + *pOut++ = (q7_t) (__SSAT(acc1 >> 7U, 8)); + *pOut++ = (q7_t) (__SSAT(acc2 >> 7U, 8)); + *pOut++ = (q7_t) (__SSAT(acc3 >> 7U, 8)); /* Initialization of inputB pointer */ pScr2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } @@ -727,9 +727,9 @@ arm_status arm_conv_partial_opt_q7( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read next two samples from scratch1 buffer */ @@ -748,10 +748,10 @@ arm_status arm_conv_partial_opt_q7( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -764,12 +764,12 @@ arm_status arm_conv_partial_opt_q7( blkCnt--; /* Store the result in the accumulator in the destination buffer. */ - *pOut++ = (q7_t) (__SSAT(acc0 >> 7u, 8)); + *pOut++ = (q7_t) (__SSAT(acc0 >> 7U, 8)); /* Initialization of inputB pointer */ pScr2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } diff --git a/Source/FilteringFunctions/arm_conv_partial_q15.c b/Source/FilteringFunctions/arm_conv_partial_q15.c index 4f39fe8a..7b43c597 100644 --- a/Source/FilteringFunctions/arm_conv_partial_q15.c +++ b/Source/FilteringFunctions/arm_conv_partial_q15.c @@ -83,7 +83,7 @@ arm_status arm_conv_partial_q15( arm_status status; /* status of Partial convolution */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -122,7 +122,7 @@ arm_status arm_conv_partial_q15( blockSize3 = ((int32_t)check > (int32_t)srcALen) ? (int32_t)check - (int32_t)srcALen : 0; blockSize3 = ((int32_t)firstIndex > (int32_t)srcALen - 1) ? blockSize3 - (int32_t)firstIndex + (int32_t)srcALen : blockSize3; blockSize1 = (((int32_t) srcBLen - 1) - (int32_t) firstIndex); - blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1u)) ? blockSize1 : + blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1U)) ? blockSize1 : (int32_t) numPoints) : 0; blockSize2 = (int32_t) check - ((blockSize3 + blockSize1) + (int32_t) firstIndex); @@ -155,7 +155,7 @@ arm_status arm_conv_partial_q15( The count variable holds the number of MAC operations performed. Since the partial convolution starts from firstIndex Number of Macs to be performed is firstIndex + 1 */ - count = 1u + firstIndex; + count = 1U + firstIndex; /* Working pointer of inputA */ px = pIn1; @@ -173,7 +173,7 @@ arm_status arm_conv_partial_q15( /* Second part of this stage computes the MAC operations greater than or equal to 4 */ /* The first part of the stage starts here */ - while ((count < 4u) && (blockSize1 > 0)) + while ((count < 4U) && (blockSize1 > 0)) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -182,7 +182,7 @@ arm_status arm_conv_partial_q15( * inputA samples and inputB samples */ k = count; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLALD(*px++, *py--, sum); @@ -217,11 +217,11 @@ arm_status arm_conv_partial_q15( sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0], x[1] are multiplied with y[srcBLen - 1], y[srcBLen - 2] respectively */ @@ -235,13 +235,13 @@ arm_status arm_conv_partial_q15( /* For the next MAC operations, the pointer py is used without SIMD * So, py is incremented by 1 */ - py = py + 1u; + py = py + 1U; /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLALD(*px++, *py--, sum); @@ -254,7 +254,7 @@ arm_status arm_conv_partial_q15( *pOut++ = (q15_t) (__SSAT((sum >> 15), 16)); /* Update the inputA and inputB pointers for next MAC calculation */ - py = ++pSrc2 - 1u; + py = ++pSrc2 - 1U; px = pIn1; /* Increment the MAC count */ @@ -285,11 +285,11 @@ arm_status arm_conv_partial_q15( } /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is the index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* -------------------- @@ -299,14 +299,14 @@ arm_status arm_conv_partial_q15( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { - py = py - 1u; + py = py - 1U; /* Set all accumulators to zero */ acc0 = 0; @@ -319,11 +319,11 @@ arm_status arm_conv_partial_q15( x0 = *__SIMD32(px); /* read x[1], x[2] samples */ x1 = _SIMD32_OFFSET(px+1); - px+= 2u; + px+= 2U; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -365,7 +365,7 @@ arm_status arm_conv_partial_q15( /* Read x[5], x[6] */ x1 = _SIMD32_OFFSET(px+3); - px += 4u; + px += 4U; /* acc2 += x[4] * y[srcBLen - 3] + x[5] * y[srcBLen - 4] */ acc2 = __SMLALDX(x0, c0, acc2); @@ -380,16 +380,16 @@ arm_status arm_conv_partial_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - if (k == 1u) + if (k == 1U) { /* Read y[srcBLen - 5] */ c0 = *(py+1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else @@ -408,7 +408,7 @@ arm_status arm_conv_partial_q15( acc3 = __SMLALDX(x3, c0, acc3); } - if (k == 2u) + if (k == 2U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ c0 = _SIMD32_OFFSET(py); @@ -418,7 +418,7 @@ arm_status arm_conv_partial_q15( /* Read x[9] */ x2 = _SIMD32_OFFSET(px+1); - px += 2u; + px += 2U; /* Perform the multiply-accumulates */ acc0 = __SMLALDX(x0, c0, acc0); @@ -427,7 +427,7 @@ arm_status arm_conv_partial_q15( acc3 = __SMLALDX(x2, c0, acc3); } - if (k == 3u) + if (k == 3U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ c0 = _SIMD32_OFFSET(py); @@ -448,7 +448,7 @@ arm_status arm_conv_partial_q15( #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else c0 = c0 & 0x0000FFFF; @@ -456,7 +456,7 @@ arm_status arm_conv_partial_q15( /* Read x[10] */ x3 = _SIMD32_OFFSET(px+2); - px += 3u; + px += 3U; /* Perform the multiply-accumulates */ acc0 = __SMLALDX(x1, c0, acc0); @@ -485,7 +485,7 @@ arm_status arm_conv_partial_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -497,19 +497,19 @@ arm_status arm_conv_partial_q15( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = (uint32_t) blockSize2 % 0x4u; + blkCnt = (uint32_t) blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += (q63_t) ((q31_t) * px++ * *py--); @@ -523,9 +523,9 @@ arm_status arm_conv_partial_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += (q63_t) ((q31_t) * px++ * *py--); @@ -554,7 +554,7 @@ arm_status arm_conv_partial_q15( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = (uint32_t) blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -562,7 +562,7 @@ arm_status arm_conv_partial_q15( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) ((q31_t) * px++ * *py--); @@ -600,15 +600,15 @@ arm_status arm_conv_partial_q15( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); - pIn2 = pSrc2 - 1u; + pSrc2 = pIn2 + (srcBLen - 1U); + pIn2 = pSrc2 - 1U; py = pIn2; /* ------------------- @@ -620,19 +620,19 @@ arm_status arm_conv_partial_q15( /* Second part of this stage computes the MAC operations less than or equal to 4 */ /* The first part of the stage starts here */ - j = count >> 2u; + j = count >> 2U; - while ((j > 0u) && (blockSize3 > 0)) + while ((j > 0U) && (blockSize3 > 0)) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[srcALen - srcBLen + 1], x[srcALen - srcBLen + 2] are multiplied * with y[srcBLen - 1], y[srcBLen - 2] respectively */ @@ -647,13 +647,13 @@ arm_status arm_conv_partial_q15( /* For the next MAC operations, the pointer py is used without SIMD * So, py is incremented by 1 */ - py = py + 1u; + py = py + 1U; /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 5] * y[srcBLen - 5] */ sum = __SMLALD(*px++, *py--, sum); @@ -681,7 +681,7 @@ arm_status arm_conv_partial_q15( /* The second part of the stage starts here */ /* SIMD is not used for the next MAC operations, * so pointer py is updated to read only one sample at a time */ - py = py + 1u; + py = py + 1U; while (blockSize3 > 0) { @@ -691,7 +691,7 @@ arm_status arm_conv_partial_q15( /* Apply loop unrolling and compute 4 MACs simultaneously. */ k = count; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ @@ -733,7 +733,7 @@ arm_status arm_conv_partial_q15( arm_status status; /* status of Partial convolution */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -758,7 +758,7 @@ arm_status arm_conv_partial_q15( } /* Store the output in the destination buffer */ - pDst[i] = (q15_t) __SSAT((sum >> 15u), 16u); + pDst[i] = (q15_t) __SSAT((sum >> 15U), 16U); } /* set status as ARM_SUCCESS as there are no argument errors */ status = ARM_MATH_SUCCESS; diff --git a/Source/FilteringFunctions/arm_conv_partial_q31.c b/Source/FilteringFunctions/arm_conv_partial_q31.c index 161ab2d6..e6770ab4 100644 --- a/Source/FilteringFunctions/arm_conv_partial_q31.c +++ b/Source/FilteringFunctions/arm_conv_partial_q31.c @@ -80,7 +80,7 @@ arm_status arm_conv_partial_q31( /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -119,7 +119,7 @@ arm_status arm_conv_partial_q31( blockSize3 = ((int32_t)check > (int32_t)srcALen) ? (int32_t)check - (int32_t)srcALen : 0; blockSize3 = ((int32_t)firstIndex > (int32_t)srcALen - 1) ? blockSize3 - (int32_t)firstIndex + (int32_t)srcALen : blockSize3; blockSize1 = (((int32_t) srcBLen - 1) - (int32_t) firstIndex); - blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1u)) ? blockSize1 : + blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1U)) ? blockSize1 : (int32_t) numPoints) : 0; blockSize2 = (int32_t) check - ((blockSize3 + blockSize1) + (int32_t) firstIndex); @@ -152,7 +152,7 @@ arm_status arm_conv_partial_q31( The count variable holds the number of MAC operations performed. Since the partial convolution starts from firstIndex Number of Macs to be performed is firstIndex + 1 */ - count = 1u + firstIndex; + count = 1U + firstIndex; /* Working pointer of inputA */ px = pIn1; @@ -172,11 +172,11 @@ arm_status arm_conv_partial_q31( sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 1] */ sum += (q63_t) * px++ * (*py--); @@ -193,9 +193,9 @@ arm_status arm_conv_partial_q31( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py--); @@ -239,11 +239,11 @@ arm_status arm_conv_partial_q31( } /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -252,12 +252,12 @@ arm_status arm_conv_partial_q31( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blkCnt */ blkCnt = blockSize2 / 3; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -290,10 +290,10 @@ arm_status arm_conv_partial_q31( acc2 += (q63_t) x2 *c0; /* Read y[srcBLen - 2] sample */ - c0 = *(py - 1u); + c0 = *(py - 1U); /* Read x[3] sample */ - x0 = *(px + 1u); + x0 = *(px + 1U); /* Perform the multiply-accumulate */ /* acc0 += x[1] * y[srcBLen - 2] */ @@ -304,10 +304,10 @@ arm_status arm_conv_partial_q31( acc2 += (q63_t) x0 *c0; /* Read y[srcBLen - 3] sample */ - c0 = *(py - 2u); + c0 = *(py - 2U); /* Read x[4] sample */ - x1 = *(px + 2u); + x1 = *(px + 2U); /* Perform the multiply-accumulates */ /* acc0 += x[2] * y[srcBLen - 3] */ @@ -318,9 +318,9 @@ arm_status arm_conv_partial_q31( acc2 += (q63_t) x1 *c0; - px += 3u; + px += 3U; - py -= 3u; + py -= 3U; } while (--k); @@ -328,7 +328,7 @@ arm_status arm_conv_partial_q31( ** No loop unrolling is used. */ k = srcBLen - (3 * (srcBLen / 3)); - while (k > 0u) + while (k > 0U) { /* Read y[srcBLen - 5] sample */ c0 = *(py--); @@ -358,7 +358,7 @@ arm_status arm_conv_partial_q31( *pOut++ = (q31_t) (acc2 >> 31); /* Increment the pointer pIn1 index, count by 3 */ - count += 3u; + count += 3U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -372,17 +372,17 @@ arm_status arm_conv_partial_q31( ** No loop unrolling is used. */ blkCnt = blockSize2 - 3 * (blockSize2 / 3); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += (q63_t) * px++ * (*py--); @@ -396,9 +396,9 @@ arm_status arm_conv_partial_q31( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py--); @@ -427,7 +427,7 @@ arm_status arm_conv_partial_q31( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = (uint32_t) blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -435,7 +435,7 @@ arm_status arm_conv_partial_q31( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py--); @@ -473,14 +473,14 @@ arm_status arm_conv_partial_q31( /* In this stage the MAC operations are decreased by 1 for every iteration. The blockSize3 variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* ------------------- @@ -493,11 +493,11 @@ arm_status arm_conv_partial_q31( sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { sum += (q63_t) * px++ * (*py--); sum += (q63_t) * px++ * (*py--); @@ -510,9 +510,9 @@ arm_status arm_conv_partial_q31( /* If the blockSize3 is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py--); @@ -554,7 +554,7 @@ arm_status arm_conv_partial_q31( arm_status status; /* status of Partial convolution */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -579,7 +579,7 @@ arm_status arm_conv_partial_q31( } /* Store the output in the destination buffer */ - pDst[i] = (q31_t) (sum >> 31u); + pDst[i] = (q31_t) (sum >> 31U); } /* set status as ARM_SUCCESS as there are no argument errors */ status = ARM_MATH_SUCCESS; diff --git a/Source/FilteringFunctions/arm_conv_partial_q7.c b/Source/FilteringFunctions/arm_conv_partial_q7.c index b4186884..8f19e216 100644 --- a/Source/FilteringFunctions/arm_conv_partial_q7.c +++ b/Source/FilteringFunctions/arm_conv_partial_q7.c @@ -84,7 +84,7 @@ arm_status arm_conv_partial_q7( /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_MATH_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -123,7 +123,7 @@ arm_status arm_conv_partial_q7( blockSize3 = ((int32_t)check > (int32_t)srcALen) ? (int32_t)check - (int32_t)srcALen : 0; blockSize3 = ((int32_t)firstIndex > (int32_t)srcALen - 1) ? blockSize3 - (int32_t)firstIndex + (int32_t)srcALen : blockSize3; blockSize1 = (((int32_t) srcBLen - 1) - (int32_t) firstIndex); - blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1u)) ? blockSize1 : + blockSize1 = (blockSize1 > 0) ? ((check > (srcBLen - 1U)) ? blockSize1 : (int32_t) numPoints) : 0; blockSize2 = (int32_t) check - ((blockSize3 + blockSize1) + (int32_t) firstIndex); @@ -156,7 +156,7 @@ arm_status arm_conv_partial_q7( The count variable holds the number of MAC operations performed. Since the partial convolution starts from from firstIndex Number of Macs to be performed is firstIndex + 1 */ - count = 1u + firstIndex; + count = 1U + firstIndex; /* Working pointer of inputA */ px = pIn1; @@ -176,11 +176,11 @@ arm_status arm_conv_partial_q7( sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] , x[1] */ in1 = (q15_t) * px++; @@ -216,9 +216,9 @@ arm_status arm_conv_partial_q7( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -262,11 +262,11 @@ arm_status arm_conv_partial_q7( } /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -275,12 +275,12 @@ arm_status arm_conv_partial_q7( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = ((uint32_t) blockSize2 >> 2u); + blkCnt = ((uint32_t) blockSize2 >> 2U); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -294,7 +294,7 @@ arm_status arm_conv_partial_q7( x2 = *(px++); /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -410,9 +410,9 @@ arm_status arm_conv_partial_q7( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Read y[srcBLen - 5] sample */ c0 = *(py--); @@ -446,7 +446,7 @@ arm_status arm_conv_partial_q7( *pOut++ = (q7_t) (__SSAT(acc3 >> 7, 8)); /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -459,19 +459,19 @@ arm_status arm_conv_partial_q7( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = (uint32_t) blockSize2 % 0x4u; + blkCnt = (uint32_t) blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Reading two inputs of SrcA buffer and packing */ @@ -506,9 +506,9 @@ arm_status arm_conv_partial_q7( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py--); @@ -537,7 +537,7 @@ arm_status arm_conv_partial_q7( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = (uint32_t) blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -545,7 +545,7 @@ arm_status arm_conv_partial_q7( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q31_t) * px++ * *py--); @@ -583,14 +583,14 @@ arm_status arm_conv_partial_q7( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* ------------------- @@ -603,11 +603,11 @@ arm_status arm_conv_partial_q7( sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Reading two inputs, x[srcALen - srcBLen + 1] and x[srcALen - srcBLen + 2] of SrcA buffer and packing */ in1 = (q15_t) * px++; @@ -643,9 +643,9 @@ arm_status arm_conv_partial_q7( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ @@ -688,7 +688,7 @@ arm_status arm_conv_partial_q7( arm_status status; /* status of Partial convolution */ /* Check for range of output samples to be calculated */ - if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1u)))) + if ((firstIndex + numPoints) > ((srcALen + (srcBLen - 1U)))) { /* Set status as ARM_ARGUMENT_ERROR */ status = ARM_MATH_ARGUMENT_ERROR; @@ -713,7 +713,7 @@ arm_status arm_conv_partial_q7( } /* Store the output in the destination buffer */ - pDst[i] = (q7_t) __SSAT((sum >> 7u), 8u); + pDst[i] = (q7_t) __SSAT((sum >> 7U), 8U); } /* set status as ARM_SUCCESS as there are no argument errors */ status = ARM_MATH_SUCCESS; diff --git a/Source/FilteringFunctions/arm_conv_q15.c b/Source/FilteringFunctions/arm_conv_q15.c index a95c29d8..29513fd8 100644 --- a/Source/FilteringFunctions/arm_conv_q15.c +++ b/Source/FilteringFunctions/arm_conv_q15.c @@ -122,8 +122,8 @@ void arm_conv_q15( /* The algorithm is implemented in three stages. The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); /* -------------------------- * Initializations of stage1 @@ -137,7 +137,7 @@ void arm_conv_q15( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; @@ -155,7 +155,7 @@ void arm_conv_q15( /* Second part of this stage computes the MAC operations greater than or equal to 4 */ /* The first part of the stage starts here */ - while ((count < 4u) && (blockSize1 > 0u)) + while ((count < 4U) && (blockSize1 > 0U)) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -164,7 +164,7 @@ void arm_conv_q15( * inputA samples and inputB samples */ k = count; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLALD(*px++, *py--, sum); @@ -193,17 +193,17 @@ void arm_conv_q15( * y[srcBLen] and y[srcBLen-1] coefficients, py is decremented by 1 */ py = py - 1; - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0], x[1] are multiplied with y[srcBLen - 1], y[srcBLen - 2] respectively */ @@ -217,13 +217,13 @@ void arm_conv_q15( /* For the next MAC operations, the pointer py is used without SIMD * So, py is incremented by 1 */ - py = py + 1u; + py = py + 1U; /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLALD(*px++, *py--, sum); @@ -236,7 +236,7 @@ void arm_conv_q15( *pOut++ = (q15_t) (__SSAT((sum >> 15), 16)); /* Update the inputA and inputB pointers for next MAC calculation */ - py = pIn2 + (count - 1u); + py = pIn2 + (count - 1U); px = pIn1; /* Increment the MAC count */ @@ -260,11 +260,11 @@ void arm_conv_q15( px = pIn1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is the index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* -------------------- @@ -274,14 +274,14 @@ void arm_conv_q15( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { - py = py - 1u; + py = py - 1U; /* Set all accumulators to zero */ acc0 = 0; @@ -294,11 +294,11 @@ void arm_conv_q15( x0 = *__SIMD32(px); /* read x[1], x[2] samples */ x1 = _SIMD32_OFFSET(px+1); - px+= 2u; + px+= 2U; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -340,7 +340,7 @@ void arm_conv_q15( /* Read x[5], x[6] */ x1 = _SIMD32_OFFSET(px+3); - px += 4u; + px += 4U; /* acc2 += x[4] * y[srcBLen - 3] + x[5] * y[srcBLen - 4] */ acc2 = __SMLALDX(x0, c0, acc2); @@ -355,16 +355,16 @@ void arm_conv_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - if (k == 1u) + if (k == 1U) { /* Read y[srcBLen - 5] */ c0 = *(py+1); #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else @@ -382,7 +382,7 @@ void arm_conv_q15( acc3 = __SMLALDX(x3, c0, acc3); } - if (k == 2u) + if (k == 2U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ c0 = _SIMD32_OFFSET(py); @@ -392,7 +392,7 @@ void arm_conv_q15( /* Read x[9] */ x2 = _SIMD32_OFFSET(px+1); - px += 2u; + px += 2U; /* Perform the multiply-accumulates */ acc0 = __SMLALDX(x0, c0, acc0); @@ -401,7 +401,7 @@ void arm_conv_q15( acc3 = __SMLALDX(x2, c0, acc3); } - if (k == 3u) + if (k == 3U) { /* Read y[srcBLen - 5], y[srcBLen - 6] */ c0 = _SIMD32_OFFSET(py); @@ -422,14 +422,14 @@ void arm_conv_q15( #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else c0 = c0 & 0x0000FFFF; #endif /* #ifdef ARM_MATH_BIG_ENDIAN */ /* Read x[10] */ x3 = _SIMD32_OFFSET(px+2); - px += 3u; + px += 3U; /* Perform the multiply-accumulates */ acc0 = __SMLALDX(x1, c0, acc0); @@ -458,7 +458,7 @@ void arm_conv_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -470,19 +470,19 @@ void arm_conv_q15( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += (q63_t) ((q31_t) * px++ * *py--); @@ -496,9 +496,9 @@ void arm_conv_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += (q63_t) ((q31_t) * px++ * *py--); @@ -527,7 +527,7 @@ void arm_conv_q15( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -535,7 +535,7 @@ void arm_conv_q15( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) ((q31_t) * px++ * *py--); @@ -574,15 +574,15 @@ void arm_conv_q15( /* In this stage the MAC operations are decreased by 1 for every iteration. The blockSize3 variable holds the number of MAC operations performed */ - blockSize3 = srcBLen - 1u; + blockSize3 = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); - pIn2 = pSrc2 - 1u; + pSrc2 = pIn2 + (srcBLen - 1U); + pIn2 = pSrc2 - 1U; py = pIn2; /* ------------------- @@ -594,19 +594,19 @@ void arm_conv_q15( /* Second part of this stage computes the MAC operations less than or equal to 4 */ /* The first part of the stage starts here */ - j = blockSize3 >> 2u; + j = blockSize3 >> 2U; - while ((j > 0u) && (blockSize3 > 0u)) + while ((j > 0U) && (blockSize3 > 0U)) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = blockSize3 >> 2u; + k = blockSize3 >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[srcALen - srcBLen + 1], x[srcALen - srcBLen + 2] are multiplied * with y[srcBLen - 1], y[srcBLen - 2] respectively */ @@ -621,13 +621,13 @@ void arm_conv_q15( /* For the next MAC operations, the pointer py is used without SIMD * So, py is incremented by 1 */ - py = py + 1u; + py = py + 1U; /* If the blockSize3 is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = blockSize3 % 0x4u; + k = blockSize3 % 0x4U; - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 5] * y[srcBLen - 5] */ sum = __SMLALD(*px++, *py--, sum); @@ -652,9 +652,9 @@ void arm_conv_q15( /* The second part of the stage starts here */ /* SIMD is not used for the next MAC operations, * so pointer py is updated to read only one sample at a time */ - py = py + 1u; + py = py + 1U; - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -662,7 +662,7 @@ void arm_conv_q15( /* Apply loop unrolling and compute 4 MACs simultaneously. */ k = blockSize3; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen-1] * y[srcBLen-1] */ @@ -710,7 +710,7 @@ void arm_conv_q15( } /* Store the output in the destination buffer */ - pDst[i] = (q15_t) __SSAT((sum >> 15u), 16u); + pDst[i] = (q15_t) __SSAT((sum >> 15U), 16U); } #endif /* #if (defined(ARM_MATH_CM7) || defined(ARM_MATH_CM4) || defined(ARM_MATH_CM3)) && !defined(UNALIGNED_SUPPORT_DISABLE) */ diff --git a/Source/FilteringFunctions/arm_conv_q31.c b/Source/FilteringFunctions/arm_conv_q31.c index e902d9ba..78e50f09 100644 --- a/Source/FilteringFunctions/arm_conv_q31.c +++ b/Source/FilteringFunctions/arm_conv_q31.c @@ -123,8 +123,8 @@ void arm_conv_q31( /* The algorithm is implemented in three stages. The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -139,7 +139,7 @@ void arm_conv_q31( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; @@ -153,17 +153,17 @@ void arm_conv_q31( * ----------------------*/ /* The first stage starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 1] */ sum += (q63_t) * px++ * (*py--); @@ -180,9 +180,9 @@ void arm_conv_q31( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py--); @@ -219,11 +219,11 @@ void arm_conv_q31( px = pIn1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -232,12 +232,12 @@ void arm_conv_q31( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll by 3 */ blkCnt = blockSize2 / 3; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -270,10 +270,10 @@ void arm_conv_q31( acc2 += ((q63_t) x2 * c0); /* Read y[srcBLen - 2] sample */ - c0 = *(py - 1u); + c0 = *(py - 1U); /* Read x[4] sample */ - x0 = *(px + 1u); + x0 = *(px + 1U); /* Perform the multiply-accumulate */ /* acc0 += x[1] * y[srcBLen - 2] */ @@ -284,10 +284,10 @@ void arm_conv_q31( acc2 += ((q63_t) x0 * c0); /* Read y[srcBLen - 3] sample */ - c0 = *(py - 2u); + c0 = *(py - 2U); /* Read x[5] sample */ - x1 = *(px + 2u); + x1 = *(px + 2U); /* Perform the multiply-accumulates */ /* acc0 += x[2] * y[srcBLen - 3] */ @@ -298,8 +298,8 @@ void arm_conv_q31( acc2 += ((q63_t) x1 * c0); /* update scratch pointers */ - px += 3u; - py -= 3u; + px += 3U; + py -= 3U; } while (--k); @@ -307,7 +307,7 @@ void arm_conv_q31( ** No loop unrolling is used. */ k = srcBLen - (3 * (srcBLen / 3)); - while (k > 0u) + while (k > 0U) { /* Read y[srcBLen - 5] sample */ c0 = *(py--); @@ -337,7 +337,7 @@ void arm_conv_q31( *pOut++ = (q31_t) (acc2 >> 31); /* Increment the pointer pIn1 index, count by 3 */ - count += 3u; + count += 3U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -351,17 +351,17 @@ void arm_conv_q31( ** No loop unrolling is used. */ blkCnt = blockSize2 - 3 * (blockSize2 / 3); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += (q63_t) * px++ * (*py--); @@ -375,9 +375,9 @@ void arm_conv_q31( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py--); @@ -406,7 +406,7 @@ void arm_conv_q31( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -414,7 +414,7 @@ void arm_conv_q31( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py--); @@ -454,28 +454,28 @@ void arm_conv_q31( The blockSize3 variable holds the number of MAC operations performed */ /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* ------------------- * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = blockSize3 >> 2u; + k = blockSize3 >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* sum += x[srcALen - srcBLen + 1] * y[srcBLen - 1] */ sum += (q63_t) * px++ * (*py--); @@ -492,9 +492,9 @@ void arm_conv_q31( /* If the blockSize3 is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = blockSize3 % 0x4u; + k = blockSize3 % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py--); @@ -541,7 +541,7 @@ void arm_conv_q31( } /* Store the output in the destination buffer */ - pDst[i] = (q31_t) (sum >> 31u); + pDst[i] = (q31_t) (sum >> 31U); } #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/FilteringFunctions/arm_conv_q7.c b/Source/FilteringFunctions/arm_conv_q7.c index 8e7805ee..9e5a79b5 100644 --- a/Source/FilteringFunctions/arm_conv_q7.c +++ b/Source/FilteringFunctions/arm_conv_q7.c @@ -122,8 +122,8 @@ void arm_conv_q7( /* The algorithm is implemented in three stages. The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = (srcALen - srcBLen) + 1u; + blockSize1 = srcBLen - 1U; + blockSize2 = (srcALen - srcBLen) + 1U; blockSize3 = blockSize1; /* -------------------------- @@ -138,7 +138,7 @@ void arm_conv_q7( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; @@ -152,27 +152,27 @@ void arm_conv_q7( * ----------------------*/ /* The first stage starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] , x[1] */ in1 = (q15_t) * px++; in2 = (q15_t) * px++; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* y[srcBLen - 1] , y[srcBLen - 2] */ in1 = (q15_t) * py--; in2 = (q15_t) * py--; - input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* x[0] * y[srcBLen - 1] */ /* x[1] * y[srcBLen - 2] */ @@ -181,12 +181,12 @@ void arm_conv_q7( /* x[2] , x[3] */ in1 = (q15_t) * px++; in2 = (q15_t) * px++; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* y[srcBLen - 3] , y[srcBLen - 4] */ in1 = (q15_t) * py--; in2 = (q15_t) * py--; - input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* x[2] * y[srcBLen - 3] */ /* x[3] * y[srcBLen - 4] */ @@ -198,9 +198,9 @@ void arm_conv_q7( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q15_t) * px++ * *py--); @@ -210,7 +210,7 @@ void arm_conv_q7( } /* Store the result in the accumulator in the destination buffer. */ - *pOut++ = (q7_t) (__SSAT(sum >> 7u, 8)); + *pOut++ = (q7_t) (__SSAT(sum >> 7U, 8)); /* Update the inputA and inputB pointers for next MAC calculation */ py = pIn2 + count; @@ -237,11 +237,11 @@ void arm_conv_q7( px = pIn1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -250,12 +250,12 @@ void arm_conv_q7( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -269,7 +269,7 @@ void arm_conv_q7( x2 = *(px++); /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -287,13 +287,13 @@ void arm_conv_q7( in1 = (q15_t) x0; in2 = (q15_t) x1; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* y[srcBLen - 1] and y[srcBLen - 2] are packed */ in1 = (q15_t) c0; in2 = (q15_t) c1; - input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* acc0 += x[0] * y[srcBLen - 1] + x[1] * y[srcBLen - 2] */ acc0 = __SMLAD(input1, input2, acc0); @@ -302,7 +302,7 @@ void arm_conv_q7( in1 = (q15_t) x1; in2 = (q15_t) x2; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* acc1 += x[1] * y[srcBLen - 1] + x[2] * y[srcBLen - 2] */ acc1 = __SMLAD(input1, input2, acc1); @@ -311,7 +311,7 @@ void arm_conv_q7( in1 = (q15_t) x2; in2 = (q15_t) x3; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* acc2 += x[2] * y[srcBLen - 1] + x[3] * y[srcBLen - 2] */ acc2 = __SMLAD(input1, input2, acc2); @@ -323,7 +323,7 @@ void arm_conv_q7( in1 = (q15_t) x3; in2 = (q15_t) x0; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* acc3 += x[3] * y[srcBLen - 1] + x[4] * y[srcBLen - 2] */ acc3 = __SMLAD(input1, input2, acc3); @@ -340,13 +340,13 @@ void arm_conv_q7( in1 = (q15_t) x2; in2 = (q15_t) x3; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* y[srcBLen - 3] and y[srcBLen - 4] are packed */ in1 = (q15_t) c0; in2 = (q15_t) c1; - input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* acc0 += x[2] * y[srcBLen - 3] + x[3] * y[srcBLen - 4] */ acc0 = __SMLAD(input1, input2, acc0); @@ -355,7 +355,7 @@ void arm_conv_q7( in1 = (q15_t) x3; in2 = (q15_t) x0; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* acc1 += x[3] * y[srcBLen - 3] + x[4] * y[srcBLen - 4] */ acc1 = __SMLAD(input1, input2, acc1); @@ -364,7 +364,7 @@ void arm_conv_q7( in1 = (q15_t) x0; in2 = (q15_t) x1; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* acc2 += x[4] * y[srcBLen - 3] + x[5] * y[srcBLen - 4] */ acc2 = __SMLAD(input1, input2, acc2); @@ -376,7 +376,7 @@ void arm_conv_q7( in1 = (q15_t) x1; in2 = (q15_t) x2; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* acc3 += x[5] * y[srcBLen - 3] + x[6] * y[srcBLen - 4] */ acc3 = __SMLAD(input1, input2, acc3); @@ -385,9 +385,9 @@ void arm_conv_q7( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Read y[srcBLen - 5] sample */ c0 = *(py--); @@ -416,13 +416,13 @@ void arm_conv_q7( /* Store the result in the accumulator in the destination buffer. */ - *pOut++ = (q7_t) (__SSAT(acc0 >> 7u, 8)); - *pOut++ = (q7_t) (__SSAT(acc1 >> 7u, 8)); - *pOut++ = (q7_t) (__SSAT(acc2 >> 7u, 8)); - *pOut++ = (q7_t) (__SSAT(acc3 >> 7u, 8)); + *pOut++ = (q7_t) (__SSAT(acc0 >> 7U, 8)); + *pOut++ = (q7_t) (__SSAT(acc1 >> 7U, 8)); + *pOut++ = (q7_t) (__SSAT(acc2 >> 7U, 8)); + *pOut++ = (q7_t) (__SSAT(acc3 >> 7U, 8)); /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -434,30 +434,30 @@ void arm_conv_q7( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Reading two inputs of SrcA buffer and packing */ in1 = (q15_t) * px++; in2 = (q15_t) * px++; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* Reading two inputs of SrcB buffer and packing */ in1 = (q15_t) * py--; in2 = (q15_t) * py--; - input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* Perform the multiply-accumulates */ sum = __SMLAD(input1, input2, sum); @@ -465,12 +465,12 @@ void arm_conv_q7( /* Reading two inputs of SrcA buffer and packing */ in1 = (q15_t) * px++; in2 = (q15_t) * px++; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* Reading two inputs of SrcB buffer and packing */ in1 = (q15_t) * py--; in2 = (q15_t) * py--; - input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* Perform the multiply-accumulates */ sum = __SMLAD(input1, input2, sum); @@ -481,9 +481,9 @@ void arm_conv_q7( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q15_t) * px++ * *py--); @@ -493,7 +493,7 @@ void arm_conv_q7( } /* Store the result in the accumulator in the destination buffer. */ - *pOut++ = (q7_t) (__SSAT(sum >> 7u, 8)); + *pOut++ = (q7_t) (__SSAT(sum >> 7U, 8)); /* Increment the pointer pIn1 index, count by 1 */ count++; @@ -512,7 +512,7 @@ void arm_conv_q7( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -520,7 +520,7 @@ void arm_conv_q7( /* srcBLen number of MACS should be performed */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q15_t) * px++ * *py--); @@ -530,7 +530,7 @@ void arm_conv_q7( } /* Store the result in the accumulator in the destination buffer. */ - *pOut++ = (q7_t) (__SSAT(sum >> 7u, 8)); + *pOut++ = (q7_t) (__SSAT(sum >> 7U, 8)); /* Increment the MAC count */ count++; @@ -560,38 +560,38 @@ void arm_conv_q7( The blockSize3 variable holds the number of MAC operations performed */ /* Working pointer of inputA */ - pSrc1 = pIn1 + (srcALen - (srcBLen - 1u)); + pSrc1 = pIn1 + (srcALen - (srcBLen - 1U)); px = pSrc1; /* Working pointer of inputB */ - pSrc2 = pIn2 + (srcBLen - 1u); + pSrc2 = pIn2 + (srcBLen - 1U); py = pSrc2; /* ------------------- * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = blockSize3 >> 2u; + k = blockSize3 >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Reading two inputs, x[srcALen - srcBLen + 1] and x[srcALen - srcBLen + 2] of SrcA buffer and packing */ in1 = (q15_t) * px++; in2 = (q15_t) * px++; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* Reading two inputs, y[srcBLen - 1] and y[srcBLen - 2] of SrcB buffer and packing */ in1 = (q15_t) * py--; in2 = (q15_t) * py--; - input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* sum += x[srcALen - srcBLen + 1] * y[srcBLen - 1] */ /* sum += x[srcALen - srcBLen + 2] * y[srcBLen - 2] */ @@ -600,12 +600,12 @@ void arm_conv_q7( /* Reading two inputs, x[srcALen - srcBLen + 3] and x[srcALen - srcBLen + 4] of SrcA buffer and packing */ in1 = (q15_t) * px++; in2 = (q15_t) * px++; - input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input1 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* Reading two inputs, y[srcBLen - 3] and y[srcBLen - 4] of SrcB buffer and packing */ in1 = (q15_t) * py--; in2 = (q15_t) * py--; - input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16u); + input2 = ((q31_t) in1 & 0x0000FFFF) | ((q31_t) in2 << 16U); /* sum += x[srcALen - srcBLen + 3] * y[srcBLen - 3] */ /* sum += x[srcALen - srcBLen + 4] * y[srcBLen - 4] */ @@ -617,9 +617,9 @@ void arm_conv_q7( /* If the blockSize3 is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = blockSize3 % 0x4u; + k = blockSize3 % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q15_t) * px++ * *py--); @@ -629,7 +629,7 @@ void arm_conv_q7( } /* Store the result in the accumulator in the destination buffer. */ - *pOut++ = (q7_t) (__SSAT(sum >> 7u, 8)); + *pOut++ = (q7_t) (__SSAT(sum >> 7U, 8)); /* Update the inputA and inputB pointers for next MAC calculation */ px = ++pSrc1; @@ -666,7 +666,7 @@ void arm_conv_q7( } /* Store the output in the destination buffer */ - pDst[i] = (q7_t) __SSAT((sum >> 7u), 8u); + pDst[i] = (q7_t) __SSAT((sum >> 7U), 8U); } #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/FilteringFunctions/arm_correlate_f32.c b/Source/FilteringFunctions/arm_correlate_f32.c index 32099d1a..12031f18 100644 --- a/Source/FilteringFunctions/arm_correlate_f32.c +++ b/Source/FilteringFunctions/arm_correlate_f32.c @@ -122,7 +122,7 @@ void arm_correlate_f32( float32_t *pSrc1; /* Intermediate pointers */ float32_t sum, acc0, acc1, acc2, acc3; /* Accumulators */ float32_t x0, x1, x2, x3, c0; /* temporary variables for holding input and coefficient values */ - uint32_t j, k = 0u, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counters */ + uint32_t j, k = 0U, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counters */ int32_t inc = 1; /* Destination address modifier */ @@ -148,18 +148,18 @@ void arm_correlate_f32( pIn2 = pSrcB; /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding has to be done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; - //while (j > 0u) + //while (j > 0U) //{ // /* Zero is stored in the destination buffer */ // *pOut++ = 0.0f; @@ -184,7 +184,7 @@ void arm_correlate_f32( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -200,8 +200,8 @@ void arm_correlate_f32( * for every iteration.*/ /* The algorithm is implemented in three stages. * The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -216,13 +216,13 @@ void arm_correlate_f32( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; /* Working pointer of inputB */ - pSrc1 = pIn2 + (srcBLen - 1u); + pSrc1 = pIn2 + (srcBLen - 1U); py = pSrc1; /* ------------------------ @@ -230,17 +230,17 @@ void arm_correlate_f32( * ----------------------*/ /* The first stage starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 4] */ sum += *px++ * *py++; @@ -257,9 +257,9 @@ void arm_correlate_f32( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ /* x[0] * y[srcBLen - 1] */ @@ -302,7 +302,7 @@ void arm_correlate_f32( py = pIn2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -311,12 +311,12 @@ void arm_correlate_f32( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4, to loop unroll the srcBLen loop */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0.0f; @@ -330,7 +330,7 @@ void arm_correlate_f32( x2 = *(px++); /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -405,9 +405,9 @@ void arm_correlate_f32( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Read y[4] sample */ c0 = *(py++); @@ -449,7 +449,7 @@ void arm_correlate_f32( pOut += inc; /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -461,19 +461,19 @@ void arm_correlate_f32( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += *px++ * *py++; @@ -487,9 +487,9 @@ void arm_correlate_f32( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += *px++ * *py++; @@ -520,7 +520,7 @@ void arm_correlate_f32( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; @@ -528,7 +528,7 @@ void arm_correlate_f32( /* Loop over srcBLen */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += *px++ * *py++; @@ -567,10 +567,10 @@ void arm_correlate_f32( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = pIn1 + (srcALen - (srcBLen - 1u)); + pSrc1 = pIn1 + (srcALen - (srcBLen - 1U)); px = pSrc1; /* Working pointer of inputB */ @@ -580,17 +580,17 @@ void arm_correlate_f32( * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0.0f; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen - srcBLen + 4] * y[3] */ @@ -608,9 +608,9 @@ void arm_correlate_f32( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += *px++ * *py++; @@ -640,11 +640,11 @@ void arm_correlate_f32( /* Run the below code for Cortex-M0 */ float32_t *pIn1 = pSrcA; /* inputA pointer */ - float32_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + float32_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ float32_t sum; /* Accumulator */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* The algorithm implementation is based on the lengths of the inputs. */ /* srcB is always made to slide across srcA. */ @@ -663,7 +663,7 @@ void arm_correlate_f32( * using convolution but with the shorter signal time shifted. */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -680,7 +680,7 @@ void arm_correlate_f32( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -696,13 +696,13 @@ void arm_correlate_f32( } /* Loop to calculate convolution for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0.0f; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) diff --git a/Source/FilteringFunctions/arm_correlate_fast_opt_q15.c b/Source/FilteringFunctions/arm_correlate_fast_opt_q15.c index 578a0763..a1b0dbd8 100644 --- a/Source/FilteringFunctions/arm_correlate_fast_opt_q15.c +++ b/Source/FilteringFunctions/arm_correlate_fast_opt_q15.c @@ -116,13 +116,13 @@ void arm_correlate_fast_opt_q15( pIn2 = (pSrcB); /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding is done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; @@ -143,7 +143,7 @@ void arm_correlate_fast_opt_q15( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -152,11 +152,11 @@ void arm_correlate_fast_opt_q15( pScr = pScratch; - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr += (srcBLen - 1u); + pScr += (srcBLen - 1U); #ifndef UNALIGNED_SUPPORT_DISABLE @@ -169,11 +169,11 @@ void arm_correlate_fast_opt_q15( #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - j = srcALen >> 2u; + j = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (j > 0u) + while (j > 0U) { /* copy second buffer in reversal manner */ *pScr++ = *pIn1++; @@ -187,9 +187,9 @@ void arm_correlate_fast_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - j = srcALen % 0x4u; + j = srcALen % 0x4U; - while (j > 0u) + while (j > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr++ = *pIn1++; @@ -202,20 +202,20 @@ void arm_correlate_fast_opt_q15( #ifndef UNALIGNED_SUPPORT_DISABLE - /* Fill (srcBLen - 1u) zeros at end of scratch buffer */ - arm_fill_q15(0, pScr, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros at end of scratch buffer */ + arm_fill_q15(0, pScr, (srcBLen - 1U)); /* Update pointer */ - pScr += (srcBLen - 1u); + pScr += (srcBLen - 1U); #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - j = (srcBLen - 1u) >> 2u; + j = (srcBLen - 1U) >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (j > 0u) + while (j > 0U) { /* copy second buffer in reversal manner */ *pScr++ = 0; @@ -229,9 +229,9 @@ void arm_correlate_fast_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - j = (srcBLen - 1u) % 0x4u; + j = (srcBLen - 1U) % 0x4U; - while (j > 0u) + while (j > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr++ = 0; @@ -247,7 +247,7 @@ void arm_correlate_fast_opt_q15( /* Actual correlation process starts here */ - blkCnt = (srcALen + srcBLen - 1u) >> 2; + blkCnt = (srcALen + srcBLen - 1U) >> 2; while (blkCnt > 0) { @@ -266,16 +266,16 @@ void arm_correlate_fast_opt_q15( /* Read next four samples from scratch1 buffer */ x2 = *__SIMD32(pScr)++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE /* Read four samples from smaller buffer */ y1 = _SIMD32_OFFSET(pIn2); - y2 = _SIMD32_OFFSET(pIn2 + 2u); + y2 = _SIMD32_OFFSET(pIn2 + 2U); acc0 = __SMLAD(x1, y1, acc0); @@ -305,7 +305,7 @@ void arm_correlate_fast_opt_q15( acc1 = __SMLADX(x3, y2, acc1); - x2 = _SIMD32_OFFSET(pScr + 2u); + x2 = _SIMD32_OFFSET(pScr + 2U); #ifndef ARM_MATH_BIG_ENDIAN x3 = __PKHBT(x2, x1, 0); @@ -388,9 +388,9 @@ void arm_correlate_fast_opt_q15( #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */ - pIn2 += 4u; + pIn2 += 4U; - pScr += 4u; + pScr += 4U; /* Decrement the loop counter */ @@ -400,13 +400,13 @@ void arm_correlate_fast_opt_q15( /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr -= 4u; + pScr -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -415,7 +415,7 @@ void arm_correlate_fast_opt_q15( acc2 += (*pScr++ * *pIn2); acc3 += (*pScr++ * *pIn2++); - pScr -= 3u; + pScr -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -425,25 +425,25 @@ void arm_correlate_fast_opt_q15( /* Store the results in the accumulators in the destination buffer. */ - *pOut = (__SSAT(acc0 >> 15u, 16)); + *pOut = (__SSAT(acc0 >> 15U, 16)); pOut += inc; - *pOut = (__SSAT(acc1 >> 15u, 16)); + *pOut = (__SSAT(acc1 >> 15U, 16)); pOut += inc; - *pOut = (__SSAT(acc2 >> 15u, 16)); + *pOut = (__SSAT(acc2 >> 15U, 16)); pOut += inc; - *pOut = (__SSAT(acc3 >> 15u, 16)); + *pOut = (__SSAT(acc3 >> 15U, 16)); pOut += inc; /* Initialization of inputB pointer */ pIn2 = py; - pScratch += 4u; + pScratch += 4U; } - blkCnt = (srcALen + srcBLen - 1u) & 0x3; + blkCnt = (srcALen + srcBLen - 1U) & 0x3; /* Calculate correlation for remaining samples of Bigger length sequence */ while (blkCnt > 0) @@ -454,9 +454,9 @@ void arm_correlate_fast_opt_q15( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { acc0 += (*pScr++ * *pIn2++); @@ -466,10 +466,10 @@ void arm_correlate_fast_opt_q15( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -490,7 +490,7 @@ void arm_correlate_fast_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch += 1u; + pScratch += 1U; } } diff --git a/Source/FilteringFunctions/arm_correlate_fast_q15.c b/Source/FilteringFunctions/arm_correlate_fast_q15.c index 0f21473f..383949d4 100644 --- a/Source/FilteringFunctions/arm_correlate_fast_q15.c +++ b/Source/FilteringFunctions/arm_correlate_fast_q15.c @@ -79,7 +79,7 @@ void arm_correlate_fast_q15( q15_t *py; /* Intermediate inputB pointer */ q15_t *pSrc1; /* Intermediate pointers */ q31_t x0, x1, x2, x3, c0; /* temporary variables for holding input and coefficient values */ - uint32_t j, k = 0u, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ + uint32_t j, k = 0U, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ int32_t inc = 1; /* Destination address modifier */ @@ -105,13 +105,13 @@ void arm_correlate_fast_q15( pIn2 = (pSrcB); /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding is done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; @@ -132,7 +132,7 @@ void arm_correlate_fast_q15( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -148,8 +148,8 @@ void arm_correlate_fast_q15( * for every iteration.*/ /* The algorithm is implemented in three stages. * The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -164,13 +164,13 @@ void arm_correlate_fast_q15( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; /* Working pointer of inputB */ - pSrc1 = pIn2 + (srcBLen - 1u); + pSrc1 = pIn2 + (srcBLen - 1U); py = pSrc1; /* ------------------------ @@ -178,7 +178,7 @@ void arm_correlate_fast_q15( * ----------------------*/ /* The first loop starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -188,7 +188,7 @@ void arm_correlate_fast_q15( /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 4] , x[1] * y[srcBLen - 3] */ sum = __SMLAD(*__SIMD32(px)++, *__SIMD32(py)++, sum); @@ -201,9 +201,9 @@ void arm_correlate_fast_q15( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0] * y[srcBLen - 1] */ @@ -246,7 +246,7 @@ void arm_correlate_fast_q15( py = pIn2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -255,12 +255,12 @@ void arm_correlate_fast_q15( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4, to loop unroll the srcBLen loop */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -272,10 +272,10 @@ void arm_correlate_fast_q15( x0 = *__SIMD32(px); /* read x[1], x[2] samples */ x1 = _SIMD32_OFFSET(px + 1); - px += 2u; + px += 2U; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -317,7 +317,7 @@ void arm_correlate_fast_q15( /* Read x[5], x[6] */ x1 = _SIMD32_OFFSET(px + 3); - px += 4u; + px += 4U; /* acc2 += x[4] * y[2] + x[5] * y[3] */ acc2 = __SMLAD(x0, c0, acc2); @@ -332,15 +332,15 @@ void arm_correlate_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - if (k == 1u) + if (k == 1U) { /* Read y[4] */ c0 = *py; #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else @@ -359,7 +359,7 @@ void arm_correlate_fast_q15( acc3 = __SMLADX(x3, c0, acc3); } - if (k == 2u) + if (k == 2U) { /* Read y[4], y[5] */ c0 = *__SIMD32(py); @@ -369,7 +369,7 @@ void arm_correlate_fast_q15( /* Read x[9] */ x2 = _SIMD32_OFFSET(px + 1); - px += 2u; + px += 2U; /* Perform the multiply-accumulates */ acc0 = __SMLAD(x0, c0, acc0); @@ -378,7 +378,7 @@ void arm_correlate_fast_q15( acc3 = __SMLAD(x2, c0, acc3); } - if (k == 3u) + if (k == 3U) { /* Read y[4], y[5] */ c0 = *__SIMD32(py)++; @@ -399,7 +399,7 @@ void arm_correlate_fast_q15( /* Read y[6] */ #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else c0 = c0 & 0x0000FFFF; @@ -407,7 +407,7 @@ void arm_correlate_fast_q15( /* Read x[10] */ x3 = _SIMD32_OFFSET(px + 2); - px += 3u; + px += 3U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x1, c0, acc0); @@ -431,7 +431,7 @@ void arm_correlate_fast_q15( pOut += inc; /* Increment the pointer pIn1 index, count by 1 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -444,19 +444,19 @@ void arm_correlate_fast_q15( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py++); @@ -470,9 +470,9 @@ void arm_correlate_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py++); @@ -503,7 +503,7 @@ void arm_correlate_fast_q15( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -511,7 +511,7 @@ void arm_correlate_fast_q15( /* Loop over srcBLen */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q31_t) * px++ * *py++); @@ -550,10 +550,10 @@ void arm_correlate_fast_q15( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ @@ -563,17 +563,17 @@ void arm_correlate_fast_q15( * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen - srcBLen + 4] * y[3] , sum += x[srcALen - srcBLen + 3] * y[2] */ @@ -587,9 +587,9 @@ void arm_correlate_fast_q15( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLAD(*px++, *py++, sum); @@ -624,7 +624,7 @@ void arm_correlate_fast_q15( q15_t *py; /* Intermediate inputB pointer */ q15_t *pSrc1; /* Intermediate pointers */ q31_t x0, x1, x2, x3, c0; /* temporary variables for holding input and coefficient values */ - uint32_t j, k = 0u, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ + uint32_t j, k = 0U, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ int32_t inc = 1; /* Destination address modifier */ q15_t a, b; @@ -651,13 +651,13 @@ void arm_correlate_fast_q15( pIn2 = (pSrcB); /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding is done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; @@ -678,7 +678,7 @@ void arm_correlate_fast_q15( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -694,8 +694,8 @@ void arm_correlate_fast_q15( * for every iteration.*/ /* The algorithm is implemented in three stages. * The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -710,13 +710,13 @@ void arm_correlate_fast_q15( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; /* Working pointer of inputB */ - pSrc1 = pIn2 + (srcBLen - 1u); + pSrc1 = pIn2 + (srcBLen - 1U); py = pSrc1; /* ------------------------ @@ -724,7 +724,7 @@ void arm_correlate_fast_q15( * ----------------------*/ /* The first loop starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -734,7 +734,7 @@ void arm_correlate_fast_q15( /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 4] , x[1] * y[srcBLen - 3] */ sum += ((q31_t) * px++ * *py++); @@ -748,9 +748,9 @@ void arm_correlate_fast_q15( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0] * y[srcBLen - 1] */ @@ -793,7 +793,7 @@ void arm_correlate_fast_q15( py = pIn2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -802,12 +802,12 @@ void arm_correlate_fast_q15( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4, to loop unroll the srcBLen loop */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -833,10 +833,10 @@ void arm_correlate_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 2u; + px += 2U; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -891,7 +891,7 @@ void arm_correlate_fast_q15( a = *(py + 2); b = *(py + 3); - py += 4u; + py += 4U; #ifndef ARM_MATH_BIG_ENDIAN @@ -927,7 +927,7 @@ void arm_correlate_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 4u; + px += 4U; /* acc2 += x[4] * y[2] + x[5] * y[3] */ acc2 = __SMLAD(x0, c0, acc2); @@ -942,15 +942,15 @@ void arm_correlate_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - if (k == 1u) + if (k == 1U) { /* Read y[4] */ c0 = *py; #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else @@ -983,7 +983,7 @@ void arm_correlate_fast_q15( acc3 = __SMLADX(x3, c0, acc3); } - if (k == 2u) + if (k == 2U) { /* Read y[4], y[5] */ a = *py; @@ -1017,7 +1017,7 @@ void arm_correlate_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 2u; + px += 2U; /* Perform the multiply-accumulates */ acc0 = __SMLAD(x0, c0, acc0); @@ -1026,7 +1026,7 @@ void arm_correlate_fast_q15( acc3 = __SMLAD(x2, c0, acc3); } - if (k == 3u) + if (k == 3U) { /* Read y[4], y[5] */ a = *py; @@ -1042,7 +1042,7 @@ void arm_correlate_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - py += 2u; + py += 2U; /* Read x[7], x[8], x[9] */ a = *px; @@ -1072,7 +1072,7 @@ void arm_correlate_fast_q15( /* Read y[6] */ #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else c0 = c0 & 0x0000FFFF; @@ -1091,7 +1091,7 @@ void arm_correlate_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ - px += 3u; + px += 3U; /* Perform the multiply-accumulates */ acc0 = __SMLADX(x1, c0, acc0); @@ -1115,7 +1115,7 @@ void arm_correlate_fast_q15( pOut += inc; /* Increment the pointer pIn1 index, count by 1 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -1128,19 +1128,19 @@ void arm_correlate_fast_q15( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py++); @@ -1154,9 +1154,9 @@ void arm_correlate_fast_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py++); @@ -1187,7 +1187,7 @@ void arm_correlate_fast_q15( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -1195,7 +1195,7 @@ void arm_correlate_fast_q15( /* Loop over srcBLen */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q31_t) * px++ * *py++); @@ -1234,10 +1234,10 @@ void arm_correlate_fast_q15( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ @@ -1247,17 +1247,17 @@ void arm_correlate_fast_q15( * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py++); @@ -1271,9 +1271,9 @@ void arm_correlate_fast_q15( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q31_t) * px++ * *py++); diff --git a/Source/FilteringFunctions/arm_correlate_fast_q31.c b/Source/FilteringFunctions/arm_correlate_fast_q31.c index b0b8b8f8..4a006aa8 100644 --- a/Source/FilteringFunctions/arm_correlate_fast_q31.c +++ b/Source/FilteringFunctions/arm_correlate_fast_q31.c @@ -81,7 +81,7 @@ void arm_correlate_fast_q31( q31_t *pSrc1; /* Intermediate pointers */ q31_t sum, acc0, acc1, acc2, acc3; /* Accumulators */ q31_t x0, x1, x2, x3, c0; /* temporary variables for holding input and coefficient values */ - uint32_t j, k = 0u, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ + uint32_t j, k = 0U, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ int32_t inc = 1; /* Destination address modifier */ @@ -97,13 +97,13 @@ void arm_correlate_fast_q31( pIn2 = (pSrcB); /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding is done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; @@ -124,7 +124,7 @@ void arm_correlate_fast_q31( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -140,8 +140,8 @@ void arm_correlate_fast_q31( * for every iteration.*/ /* The algorithm is implemented in three stages. * The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -156,13 +156,13 @@ void arm_correlate_fast_q31( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; /* Working pointer of inputB */ - pSrc1 = pIn2 + (srcBLen - 1u); + pSrc1 = pIn2 + (srcBLen - 1U); py = pSrc1; /* ------------------------ @@ -170,7 +170,7 @@ void arm_correlate_fast_q31( * ----------------------*/ /* The first stage starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -180,7 +180,7 @@ void arm_correlate_fast_q31( /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 4] */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -201,9 +201,9 @@ void arm_correlate_fast_q31( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0] * y[srcBLen - 1] */ @@ -247,7 +247,7 @@ void arm_correlate_fast_q31( py = pIn2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -256,12 +256,12 @@ void arm_correlate_fast_q31( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -275,7 +275,7 @@ void arm_correlate_fast_q31( x2 = *(px++); /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -350,9 +350,9 @@ void arm_correlate_fast_q31( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Read y[4] sample */ c0 = *(py++); @@ -394,7 +394,7 @@ void arm_correlate_fast_q31( pOut += inc; /* Increment the pointer pIn1 index, count by 4 */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -407,19 +407,19 @@ void arm_correlate_fast_q31( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -437,9 +437,9 @@ void arm_correlate_fast_q31( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -472,7 +472,7 @@ void arm_correlate_fast_q31( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -480,7 +480,7 @@ void arm_correlate_fast_q31( /* Loop over srcBLen */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum = (q31_t) ((((q63_t) sum << 32) + @@ -520,10 +520,10 @@ void arm_correlate_fast_q31( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = ((pIn1 + srcALen) - srcBLen) + 1u; + pSrc1 = ((pIn1 + srcALen) - srcBLen) + 1U; px = pSrc1; /* Working pointer of inputB */ @@ -533,17 +533,17 @@ void arm_correlate_fast_q31( * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen - srcBLen + 4] * y[3] */ @@ -565,9 +565,9 @@ void arm_correlate_fast_q31( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = (q31_t) ((((q63_t) sum << 32) + diff --git a/Source/FilteringFunctions/arm_correlate_opt_q15.c b/Source/FilteringFunctions/arm_correlate_opt_q15.c index bced1cc7..1eda7197 100644 --- a/Source/FilteringFunctions/arm_correlate_opt_q15.c +++ b/Source/FilteringFunctions/arm_correlate_opt_q15.c @@ -115,13 +115,13 @@ void arm_correlate_opt_q15( pIn2 = (pSrcB); /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding is done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; @@ -142,7 +142,7 @@ void arm_correlate_opt_q15( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -151,11 +151,11 @@ void arm_correlate_opt_q15( pScr = pScratch; - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr += (srcBLen - 1u); + pScr += (srcBLen - 1U); #ifndef UNALIGNED_SUPPORT_DISABLE @@ -169,11 +169,11 @@ void arm_correlate_opt_q15( #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - j = srcALen >> 2u; + j = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (j > 0u) + while (j > 0U) { /* copy second buffer in reversal manner */ *pScr++ = *pIn1++; @@ -187,9 +187,9 @@ void arm_correlate_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - j = srcALen % 0x4u; + j = srcALen % 0x4U; - while (j > 0u) + while (j > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr++ = *pIn1++; @@ -202,20 +202,20 @@ void arm_correlate_opt_q15( #ifndef UNALIGNED_SUPPORT_DISABLE - /* Fill (srcBLen - 1u) zeros at end of scratch buffer */ - arm_fill_q15(0, pScr, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros at end of scratch buffer */ + arm_fill_q15(0, pScr, (srcBLen - 1U)); /* Update pointer */ - pScr += (srcBLen - 1u); + pScr += (srcBLen - 1U); #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - j = (srcBLen - 1u) >> 2u; + j = (srcBLen - 1U) >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (j > 0u) + while (j > 0U) { /* copy second buffer in reversal manner */ *pScr++ = 0; @@ -229,9 +229,9 @@ void arm_correlate_opt_q15( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - j = (srcBLen - 1u) % 0x4u; + j = (srcBLen - 1U) % 0x4U; - while (j > 0u) + while (j > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr++ = 0; @@ -247,7 +247,7 @@ void arm_correlate_opt_q15( /* Actual correlation process starts here */ - blkCnt = (srcALen + srcBLen - 1u) >> 2; + blkCnt = (srcALen + srcBLen - 1U) >> 2; while (blkCnt > 0) { @@ -266,16 +266,16 @@ void arm_correlate_opt_q15( /* Read next four samples from scratch1 buffer */ x2 = *__SIMD32(pScr)++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE /* Read four samples from smaller buffer */ y1 = _SIMD32_OFFSET(pIn2); - y2 = _SIMD32_OFFSET(pIn2 + 2u); + y2 = _SIMD32_OFFSET(pIn2 + 2U); acc0 = __SMLALD(x1, y1, acc0); @@ -305,7 +305,7 @@ void arm_correlate_opt_q15( acc1 = __SMLALDX(x3, y2, acc1); - x2 = _SIMD32_OFFSET(pScr + 2u); + x2 = _SIMD32_OFFSET(pScr + 2U); #ifndef ARM_MATH_BIG_ENDIAN x3 = __PKHBT(x2, x1, 0); @@ -389,9 +389,9 @@ void arm_correlate_opt_q15( #endif /* #ifndef UNALIGNED_SUPPORT_DISABLE */ - pIn2 += 4u; + pIn2 += 4U; - pScr += 4u; + pScr += 4U; /* Decrement the loop counter */ @@ -401,13 +401,13 @@ void arm_correlate_opt_q15( /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr -= 4u; + pScr -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -416,7 +416,7 @@ void arm_correlate_opt_q15( acc2 += (*pScr++ * *pIn2); acc3 += (*pScr++ * *pIn2++); - pScr -= 3u; + pScr -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -426,24 +426,24 @@ void arm_correlate_opt_q15( /* Store the results in the accumulators in the destination buffer. */ - *pOut = (__SSAT(acc0 >> 15u, 16)); + *pOut = (__SSAT(acc0 >> 15U, 16)); pOut += inc; - *pOut = (__SSAT(acc1 >> 15u, 16)); + *pOut = (__SSAT(acc1 >> 15U, 16)); pOut += inc; - *pOut = (__SSAT(acc2 >> 15u, 16)); + *pOut = (__SSAT(acc2 >> 15U, 16)); pOut += inc; - *pOut = (__SSAT(acc3 >> 15u, 16)); + *pOut = (__SSAT(acc3 >> 15U, 16)); pOut += inc; /* Initialization of inputB pointer */ pIn2 = py; - pScratch += 4u; + pScratch += 4U; } - blkCnt = (srcALen + srcBLen - 1u) & 0x3; + blkCnt = (srcALen + srcBLen - 1U) & 0x3; /* Calculate correlation for remaining samples of Bigger length sequence */ while (blkCnt > 0) @@ -454,9 +454,9 @@ void arm_correlate_opt_q15( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { acc0 += (*pScr++ * *pIn2++); @@ -466,10 +466,10 @@ void arm_correlate_opt_q15( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -489,7 +489,7 @@ void arm_correlate_opt_q15( /* Initialization of inputB pointer */ pIn2 = py; - pScratch += 1u; + pScratch += 1U; } diff --git a/Source/FilteringFunctions/arm_correlate_opt_q7.c b/Source/FilteringFunctions/arm_correlate_opt_q7.c index 96749392..d4ff45eb 100644 --- a/Source/FilteringFunctions/arm_correlate_opt_q7.c +++ b/Source/FilteringFunctions/arm_correlate_opt_q7.c @@ -84,7 +84,7 @@ void arm_correlate_opt_q7( q7_t *pIn2; /* inputB pointer */ q15_t *py; /* Intermediate inputB pointer */ q31_t acc0, acc1, acc2, acc3; /* Accumulators */ - uint32_t j, k = 0u, blkCnt; /* loop counter */ + uint32_t j, k = 0U, blkCnt; /* loop counter */ int32_t inc = 1; /* output pointer increment */ uint32_t outBlockSize; /* loop counter */ q15_t x4; /* Temporary input variable */ @@ -113,13 +113,13 @@ void arm_correlate_opt_q7( pIn2 = (pSrcB); /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding is done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; @@ -140,7 +140,7 @@ void arm_correlate_opt_q7( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -149,11 +149,11 @@ void arm_correlate_opt_q7( /* Copy (srcBLen) samples in scratch buffer */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ x4 = (q15_t) * pIn2++; @@ -171,9 +171,9 @@ void arm_correlate_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ x4 = (q15_t) * pIn2++; @@ -183,18 +183,18 @@ void arm_correlate_opt_q7( k--; } - /* Fill (srcBLen - 1u) zeros in scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros in scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update temporary scratch pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); /* Copy (srcALen) samples in scratch buffer */ - k = srcALen >> 2u; + k = srcALen >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ x4 = (q15_t) * pIn1++; @@ -212,9 +212,9 @@ void arm_correlate_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = srcALen % 0x4u; + k = srcALen % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ x4 = (q15_t) * pIn1++; @@ -226,20 +226,20 @@ void arm_correlate_opt_q7( #ifndef UNALIGNED_SUPPORT_DISABLE - /* Fill (srcBLen - 1u) zeros at end of scratch buffer */ - arm_fill_q15(0, pScr1, (srcBLen - 1u)); + /* Fill (srcBLen - 1U) zeros at end of scratch buffer */ + arm_fill_q15(0, pScr1, (srcBLen - 1U)); /* Update pointer */ - pScr1 += (srcBLen - 1u); + pScr1 += (srcBLen - 1U); #else /* Apply loop unrolling and do 4 Copies simultaneously. */ - k = (srcBLen - 1u) >> 2u; + k = (srcBLen - 1U) >> 2U; /* First part of the processing with loop unrolling copies 4 data points at a time. ** a second loop below copies for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner */ *pScr1++ = 0; @@ -253,9 +253,9 @@ void arm_correlate_opt_q7( /* If the count is not a multiple of 4, copy remaining samples here. ** No loop unrolling is used. */ - k = (srcBLen - 1u) % 0x4u; + k = (srcBLen - 1U) % 0x4U; - while (k > 0u) + while (k > 0U) { /* copy second buffer in reversal manner for remaining samples */ *pScr1++ = 0; @@ -273,7 +273,7 @@ void arm_correlate_opt_q7( pScr2 = pScratch2; /* Actual correlation process starts here */ - blkCnt = (srcALen + srcBLen - 1u) >> 2; + blkCnt = (srcALen + srcBLen - 1U) >> 2; while (blkCnt > 0) { @@ -292,9 +292,9 @@ void arm_correlate_opt_q7( /* Read next two samples from scratch1 buffer */ x2 = *__SIMD32(pScr1)++; - tapCnt = (srcBLen) >> 2u; + tapCnt = (srcBLen) >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read four samples from smaller buffer */ @@ -327,7 +327,7 @@ void arm_correlate_opt_q7( acc3 = __SMLADX(x3, y1, acc3); /* Read four samples from smaller buffer */ - y1 = _SIMD32_OFFSET(pScr2 + 2u); + y1 = _SIMD32_OFFSET(pScr2 + 2U); acc0 = __SMLAD(x2, y1, acc0); @@ -345,7 +345,7 @@ void arm_correlate_opt_q7( acc3 = __SMLADX(x3, y1, acc3); - pScr2 += 4u; + pScr2 += 4U; /* Decrement the loop counter */ @@ -355,13 +355,13 @@ void arm_correlate_opt_q7( /* Update scratch pointer for remaining samples of smaller length sequence */ - pScr1 -= 4u; + pScr1 -= 4U; /* apply same above for remaining samples of smaller length sequence */ - tapCnt = (srcBLen) & 3u; + tapCnt = (srcBLen) & 3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -370,7 +370,7 @@ void arm_correlate_opt_q7( acc2 += (*pScr1++ * *pScr2); acc3 += (*pScr1++ * *pScr2++); - pScr1 -= 3u; + pScr1 -= 3U; /* Decrement the loop counter */ tapCnt--; @@ -379,24 +379,24 @@ void arm_correlate_opt_q7( blkCnt--; /* Store the result in the accumulator in the destination buffer. */ - *pOut = (q7_t) (__SSAT(acc0 >> 7u, 8)); + *pOut = (q7_t) (__SSAT(acc0 >> 7U, 8)); pOut += inc; - *pOut = (q7_t) (__SSAT(acc1 >> 7u, 8)); + *pOut = (q7_t) (__SSAT(acc1 >> 7U, 8)); pOut += inc; - *pOut = (q7_t) (__SSAT(acc2 >> 7u, 8)); + *pOut = (q7_t) (__SSAT(acc2 >> 7U, 8)); pOut += inc; - *pOut = (q7_t) (__SSAT(acc3 >> 7u, 8)); + *pOut = (q7_t) (__SSAT(acc3 >> 7U, 8)); pOut += inc; /* Initialization of inputB pointer */ pScr2 = py; - pScratch1 += 4u; + pScratch1 += 4U; } - blkCnt = (srcALen + srcBLen - 1u) & 0x3; + blkCnt = (srcALen + srcBLen - 1U) & 0x3; /* Calculate correlation for remaining samples of Bigger length sequence */ while (blkCnt > 0) @@ -407,9 +407,9 @@ void arm_correlate_opt_q7( /* Clear Accumlators */ acc0 = 0; - tapCnt = (srcBLen) >> 1u; + tapCnt = (srcBLen) >> 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { acc0 += (*pScr1++ * *pScr2++); acc0 += (*pScr1++ * *pScr2++); @@ -418,10 +418,10 @@ void arm_correlate_opt_q7( tapCnt--; } - tapCnt = (srcBLen) & 1u; + tapCnt = (srcBLen) & 1U; /* apply same above for remaining samples of smaller length sequence */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* accumlate the results */ @@ -434,14 +434,14 @@ void arm_correlate_opt_q7( blkCnt--; /* Store the result in the accumulator in the destination buffer. */ - *pOut = (q7_t) (__SSAT(acc0 >> 7u, 8)); + *pOut = (q7_t) (__SSAT(acc0 >> 7U, 8)); pOut += inc; /* Initialization of inputB pointer */ pScr2 = py; - pScratch1 += 1u; + pScratch1 += 1U; } diff --git a/Source/FilteringFunctions/arm_correlate_q15.c b/Source/FilteringFunctions/arm_correlate_q15.c index 1812d379..ce86db40 100644 --- a/Source/FilteringFunctions/arm_correlate_q15.c +++ b/Source/FilteringFunctions/arm_correlate_q15.c @@ -84,7 +84,7 @@ void arm_correlate_q15( q15_t *py; /* Intermediate inputB pointer */ q15_t *pSrc1; /* Intermediate pointers */ q31_t x0, x1, x2, x3, c0; /* temporary variables for holding input and coefficient values */ - uint32_t j, k = 0u, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ + uint32_t j, k = 0U, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ int32_t inc = 1; /* Destination address modifier */ @@ -110,13 +110,13 @@ void arm_correlate_q15( pIn2 = (pSrcB); /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding is done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; @@ -137,7 +137,7 @@ void arm_correlate_q15( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -153,8 +153,8 @@ void arm_correlate_q15( * for every iteration.*/ /* The algorithm is implemented in three stages. * The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -169,13 +169,13 @@ void arm_correlate_q15( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; /* Working pointer of inputB */ - pSrc1 = pIn2 + (srcBLen - 1u); + pSrc1 = pIn2 + (srcBLen - 1U); py = pSrc1; /* ------------------------ @@ -183,7 +183,7 @@ void arm_correlate_q15( * ----------------------*/ /* The first loop starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -193,7 +193,7 @@ void arm_correlate_q15( /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 4] , x[1] * y[srcBLen - 3] */ sum = __SMLALD(*__SIMD32(px)++, *__SIMD32(py)++, sum); @@ -206,9 +206,9 @@ void arm_correlate_q15( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0] * y[srcBLen - 1] */ @@ -251,7 +251,7 @@ void arm_correlate_q15( py = pIn2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -260,12 +260,12 @@ void arm_correlate_q15( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4, to loop unroll the srcBLen loop */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -277,10 +277,10 @@ void arm_correlate_q15( x0 = *__SIMD32(px); /* read x[1], x[2] samples */ x1 = _SIMD32_OFFSET(px + 1); - px += 2u; + px += 2U; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -323,7 +323,7 @@ void arm_correlate_q15( /* Read x[5], x[6] */ x1 = _SIMD32_OFFSET(px + 3); - px += 4u; + px += 4U; /* acc2 += x[4] * y[2] + x[5] * y[3] */ acc2 = __SMLALD(x0, c0, acc2); @@ -335,15 +335,15 @@ void arm_correlate_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - if (k == 1u) + if (k == 1U) { /* Read y[4] */ c0 = *py; #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else @@ -361,7 +361,7 @@ void arm_correlate_q15( acc3 = __SMLALDX(x3, c0, acc3); } - if (k == 2u) + if (k == 2U) { /* Read y[4], y[5] */ c0 = *__SIMD32(py); @@ -371,7 +371,7 @@ void arm_correlate_q15( /* Read x[9] */ x2 = _SIMD32_OFFSET(px + 1); - px += 2u; + px += 2U; /* Perform the multiply-accumulates */ acc0 = __SMLALD(x0, c0, acc0); @@ -380,7 +380,7 @@ void arm_correlate_q15( acc3 = __SMLALD(x2, c0, acc3); } - if (k == 3u) + if (k == 3U) { /* Read y[4], y[5] */ c0 = *__SIMD32(py)++; @@ -402,14 +402,14 @@ void arm_correlate_q15( /* Read y[6] */ #ifdef ARM_MATH_BIG_ENDIAN - c0 = c0 << 16u; + c0 = c0 << 16U; #else c0 = c0 & 0x0000FFFF; #endif /* #ifdef ARM_MATH_BIG_ENDIAN */ /* Read x[10] */ x3 = _SIMD32_OFFSET(px + 2); - px += 3u; + px += 3U; /* Perform the multiply-accumulates */ acc0 = __SMLALDX(x1, c0, acc0); @@ -433,7 +433,7 @@ void arm_correlate_q15( pOut += inc; /* Increment the count by 4 as 4 output values are computed */ - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -445,19 +445,19 @@ void arm_correlate_q15( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q63_t) * px++ * *py++); @@ -471,9 +471,9 @@ void arm_correlate_q15( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q63_t) * px++ * *py++); @@ -504,7 +504,7 @@ void arm_correlate_q15( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -512,7 +512,7 @@ void arm_correlate_q15( /* Loop over srcBLen */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q63_t) * px++ * *py++); @@ -551,10 +551,10 @@ void arm_correlate_q15( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = (pIn1 + srcALen) - (srcBLen - 1u); + pSrc1 = (pIn1 + srcALen) - (srcBLen - 1U); px = pSrc1; /* Working pointer of inputB */ @@ -564,17 +564,17 @@ void arm_correlate_q15( * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen - srcBLen + 4] * y[3] , sum += x[srcALen - srcBLen + 3] * y[2] */ @@ -588,9 +588,9 @@ void arm_correlate_q15( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum = __SMLALD(*px++, *py++, sum); @@ -620,11 +620,11 @@ void arm_correlate_q15( /* Run the below code for Cortex-M0 */ q15_t *pIn1 = pSrcA; /* inputA pointer */ - q15_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + q15_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ q63_t sum; /* Accumulators */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* The algorithm implementation is based on the lengths of the inputs. */ /* srcB is always made to slide across srcA. */ @@ -643,7 +643,7 @@ void arm_correlate_q15( * using convolution but with the shorter signal time shifted. */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -660,7 +660,7 @@ void arm_correlate_q15( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -676,13 +676,13 @@ void arm_correlate_q15( } /* Loop to calculate convolution for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) @@ -693,9 +693,9 @@ void arm_correlate_q15( } /* Store the output in the destination buffer */ if (inv == 1) - *pDst-- = (q15_t) __SSAT((sum >> 15u), 16u); + *pDst-- = (q15_t) __SSAT((sum >> 15U), 16U); else - *pDst++ = (q15_t) __SSAT((sum >> 15u), 16u); + *pDst++ = (q15_t) __SSAT((sum >> 15U), 16U); } #endif /* #if (defined(ARM_MATH_CM7) || defined(ARM_MATH_CM4) || defined(ARM_MATH_CM3)) && !defined(UNALIGNED_SUPPORT_DISABLE) */ diff --git a/Source/FilteringFunctions/arm_correlate_q31.c b/Source/FilteringFunctions/arm_correlate_q31.c index ddf689c9..3d7d3d07 100644 --- a/Source/FilteringFunctions/arm_correlate_q31.c +++ b/Source/FilteringFunctions/arm_correlate_q31.c @@ -83,7 +83,7 @@ void arm_correlate_q31( q31_t *pSrc1; /* Intermediate pointers */ q63_t sum, acc0, acc1, acc2; /* Accumulators */ q31_t x0, x1, x2, c0; /* temporary variables for holding input and coefficient values */ - uint32_t j, k = 0u, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ + uint32_t j, k = 0U, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ int32_t inc = 1; /* Destination address modifier */ @@ -109,13 +109,13 @@ void arm_correlate_q31( pIn2 = (pSrcB); /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding is done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; @@ -136,7 +136,7 @@ void arm_correlate_q31( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -152,8 +152,8 @@ void arm_correlate_q31( * for every iteration.*/ /* The algorithm is implemented in three stages. * The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -168,13 +168,13 @@ void arm_correlate_q31( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; /* Working pointer of inputB */ - pSrc1 = pIn2 + (srcBLen - 1u); + pSrc1 = pIn2 + (srcBLen - 1U); py = pSrc1; /* ------------------------ @@ -182,7 +182,7 @@ void arm_correlate_q31( * ----------------------*/ /* The first stage starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -192,7 +192,7 @@ void arm_correlate_q31( /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] * y[srcBLen - 4] */ sum += (q63_t) * px++ * (*py++); @@ -209,9 +209,9 @@ void arm_correlate_q31( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0] * y[srcBLen - 1] */ @@ -254,7 +254,7 @@ void arm_correlate_q31( py = pIn2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -263,12 +263,12 @@ void arm_correlate_q31( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll by 3 */ blkCnt = blockSize2 / 3; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -301,10 +301,10 @@ void arm_correlate_q31( acc2 += ((q63_t) x2 * c0); /* Read y[1] sample */ - c0 = *(py + 1u); + c0 = *(py + 1U); /* Read x[3] sample */ - x0 = *(px + 1u); + x0 = *(px + 1U); /* Perform the multiply-accumulates */ /* acc0 += x[1] * y[1] */ @@ -315,10 +315,10 @@ void arm_correlate_q31( acc2 += ((q63_t) x0 * c0); /* Read y[2] sample */ - c0 = *(py + 2u); + c0 = *(py + 2U); /* Read x[4] sample */ - x1 = *(px + 2u); + x1 = *(px + 2U); /* Perform the multiply-accumulates */ /* acc0 += x[2] * y[2] */ @@ -329,8 +329,8 @@ void arm_correlate_q31( acc2 += ((q63_t) x1 * c0); /* update scratch pointers */ - px += 3u; - py += 3u; + px += 3U; + py += 3U; } while (--k); @@ -338,7 +338,7 @@ void arm_correlate_q31( ** No loop unrolling is used. */ k = srcBLen - (3 * (srcBLen / 3)); - while (k > 0u) + while (k > 0U) { /* Read y[4] sample */ c0 = *(py++); @@ -374,7 +374,7 @@ void arm_correlate_q31( pOut += inc; /* Increment the pointer pIn1 index, count by 3 */ - count += 3u; + count += 3U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; @@ -389,17 +389,17 @@ void arm_correlate_q31( ** No loop unrolling is used. */ blkCnt = blockSize2 - 3 * (blockSize2 / 3); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += (q63_t) * px++ * (*py++); @@ -413,9 +413,9 @@ void arm_correlate_q31( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py++); @@ -446,7 +446,7 @@ void arm_correlate_q31( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -454,7 +454,7 @@ void arm_correlate_q31( /* Loop over srcBLen */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += (q63_t) * px++ * (*py++); @@ -493,10 +493,10 @@ void arm_correlate_q31( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = pIn1 + (srcALen - (srcBLen - 1u)); + pSrc1 = pIn1 + (srcALen - (srcBLen - 1U)); px = pSrc1; /* Working pointer of inputB */ @@ -506,17 +506,17 @@ void arm_correlate_q31( * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* sum += x[srcALen - srcBLen + 4] * y[3] */ @@ -534,9 +534,9 @@ void arm_correlate_q31( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += (q63_t) * px++ * (*py++); @@ -566,11 +566,11 @@ void arm_correlate_q31( /* Run the below code for Cortex-M0 */ q31_t *pIn1 = pSrcA; /* inputA pointer */ - q31_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + q31_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ q63_t sum; /* Accumulators */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* The algorithm implementation is based on the lengths of the inputs. */ /* srcB is always made to slide across srcA. */ @@ -589,7 +589,7 @@ void arm_correlate_q31( * using correlation but with the shorter signal time shifted. */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -606,7 +606,7 @@ void arm_correlate_q31( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -622,13 +622,13 @@ void arm_correlate_q31( } /* Loop to calculate correlation for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0; /* Loop to perform MAC operations according to correlation equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) @@ -639,9 +639,9 @@ void arm_correlate_q31( } /* Store the output in the destination buffer */ if (inv == 1) - *pDst-- = (q31_t) (sum >> 31u); + *pDst-- = (q31_t) (sum >> 31U); else - *pDst++ = (q31_t) (sum >> 31u); + *pDst++ = (q31_t) (sum >> 31U); } #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/FilteringFunctions/arm_correlate_q7.c b/Source/FilteringFunctions/arm_correlate_q7.c index 1d4deeef..dc5247f2 100644 --- a/Source/FilteringFunctions/arm_correlate_q7.c +++ b/Source/FilteringFunctions/arm_correlate_q7.c @@ -84,7 +84,7 @@ void arm_correlate_q7( q31_t input1, input2; /* temporary variables */ q15_t in1, in2; /* temporary variables */ q7_t x0, x1, x2, x3, c0, c1; /* temporary variables for holding input and coefficient values */ - uint32_t j, k = 0u, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ + uint32_t j, k = 0U, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3; /* loop counter */ int32_t inc = 1; @@ -110,13 +110,13 @@ void arm_correlate_q7( pIn2 = (pSrcB); /* Number of output samples is calculated */ - outBlockSize = (2u * srcALen) - 1u; + outBlockSize = (2U * srcALen) - 1U; /* When srcALen > srcBLen, zero padding is done to srcB * to make their lengths equal. * Instead, (outBlockSize - (srcALen + srcBLen - 1)) * number of output samples are made zero */ - j = outBlockSize - (srcALen + (srcBLen - 1u)); + j = outBlockSize - (srcALen + (srcBLen - 1U)); /* Updating the pointer position to non zero value */ pOut += j; @@ -137,7 +137,7 @@ void arm_correlate_q7( /* CORR(x, y) = Reverse order(CORR(y, x)) */ /* Hence set the destination pointer to point to the last output sample */ - pOut = pDst + ((srcALen + srcBLen) - 2u); + pOut = pDst + ((srcALen + srcBLen) - 2U); /* Destination address modifier is set to -1 */ inc = -1; @@ -153,8 +153,8 @@ void arm_correlate_q7( * for every iteration.*/ /* The algorithm is implemented in three stages. * The loop counters of each stage is initiated here. */ - blockSize1 = srcBLen - 1u; - blockSize2 = srcALen - (srcBLen - 1u); + blockSize1 = srcBLen - 1U; + blockSize2 = srcALen - (srcBLen - 1U); blockSize3 = blockSize1; /* -------------------------- @@ -169,13 +169,13 @@ void arm_correlate_q7( /* In this stage the MAC operations are increased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = 1u; + count = 1U; /* Working pointer of inputA */ px = pIn1; /* Working pointer of inputB */ - pSrc1 = pIn2 + (srcBLen - 1u); + pSrc1 = pIn2 + (srcBLen - 1U); py = pSrc1; /* ------------------------ @@ -183,7 +183,7 @@ void arm_correlate_q7( * ----------------------*/ /* The first stage starts here */ - while (blockSize1 > 0u) + while (blockSize1 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -193,7 +193,7 @@ void arm_correlate_q7( /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[0] , x[1] */ in1 = (q15_t) * px++; @@ -230,9 +230,9 @@ void arm_correlate_q7( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ /* x[0] * y[srcBLen - 1] */ @@ -275,7 +275,7 @@ void arm_correlate_q7( py = pIn2; /* count is index by which the pointer pIn1 to be incremented */ - count = 0u; + count = 0U; /* ------------------- * Stage2 process @@ -284,12 +284,12 @@ void arm_correlate_q7( /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed. * So, to loop unroll over blockSize2, * srcBLen should be greater than or equal to 4 */ - if (srcBLen >= 4u) + if (srcBLen >= 4U) { /* Loop unroll over blockSize2, by 4 */ - blkCnt = blockSize2 >> 2u; + blkCnt = blockSize2 >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Set all accumulators to zero */ acc0 = 0; @@ -303,7 +303,7 @@ void arm_correlate_q7( x2 = *px++; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ @@ -419,9 +419,9 @@ void arm_correlate_q7( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Read y[4] sample */ c0 = *py++; @@ -462,7 +462,7 @@ void arm_correlate_q7( *pOut = (q7_t) (__SSAT(acc3 >> 7, 8)); pOut += inc; - count += 4u; + count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ px = pIn1 + count; py = pIn2; @@ -473,19 +473,19 @@ void arm_correlate_q7( /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize2 % 0x4u; + blkCnt = blockSize2 % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = srcBLen >> 2u; + k = srcBLen >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* Reading two inputs of SrcA buffer and packing */ in1 = (q15_t) * px++; @@ -519,9 +519,9 @@ void arm_correlate_q7( /* If the srcBLen is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = srcBLen % 0x4u; + k = srcBLen % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q15_t) * px++ * *py++); @@ -552,7 +552,7 @@ void arm_correlate_q7( * the blockSize2 loop cannot be unrolled by 4 */ blkCnt = blockSize2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; @@ -560,7 +560,7 @@ void arm_correlate_q7( /* Loop over srcBLen */ k = srcBLen; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulate */ sum += ((q15_t) * px++ * *py++); @@ -600,10 +600,10 @@ void arm_correlate_q7( /* In this stage the MAC operations are decreased by 1 for every iteration. The count variable holds the number of MAC operations performed */ - count = srcBLen - 1u; + count = srcBLen - 1U; /* Working pointer of inputA */ - pSrc1 = pIn1 + (srcALen - (srcBLen - 1u)); + pSrc1 = pIn1 + (srcALen - (srcBLen - 1U)); px = pSrc1; /* Working pointer of inputB */ @@ -613,17 +613,17 @@ void arm_correlate_q7( * Stage3 process * ------------------*/ - while (blockSize3 > 0u) + while (blockSize3 > 0U) { /* Accumulator is made zero for every iteration */ sum = 0; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - k = count >> 2u; + k = count >> 2U; /* First part of the processing with loop unrolling. Compute 4 MACs at a time. ** a second loop below computes MACs for the remaining 1 to 3 samples. */ - while (k > 0u) + while (k > 0U) { /* x[srcALen - srcBLen + 1] , x[srcALen - srcBLen + 2] */ in1 = (q15_t) * px++; @@ -659,9 +659,9 @@ void arm_correlate_q7( /* If the count is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - k = count % 0x4u; + k = count % 0x4U; - while (k > 0u) + while (k > 0U) { /* Perform the multiply-accumulates */ sum += ((q15_t) * px++ * *py++); @@ -691,11 +691,11 @@ void arm_correlate_q7( /* Run the below code for Cortex-M0 */ q7_t *pIn1 = pSrcA; /* inputA pointer */ - q7_t *pIn2 = pSrcB + (srcBLen - 1u); /* inputB pointer */ + q7_t *pIn2 = pSrcB + (srcBLen - 1U); /* inputB pointer */ q31_t sum; /* Accumulator */ - uint32_t i = 0u, j; /* loop counters */ - uint32_t inv = 0u; /* Reverse order flag */ - uint32_t tot = 0u; /* Length */ + uint32_t i = 0U, j; /* loop counters */ + uint32_t inv = 0U; /* Reverse order flag */ + uint32_t tot = 0U; /* Length */ /* The algorithm implementation is based on the lengths of the inputs. */ /* srcB is always made to slide across srcA. */ @@ -714,7 +714,7 @@ void arm_correlate_q7( * using convolution but with the shorter signal time shifted. */ /* Calculate the length of the remaining sequence */ - tot = ((srcALen + srcBLen) - 2u); + tot = ((srcALen + srcBLen) - 2U); if (srcALen > srcBLen) { @@ -731,7 +731,7 @@ void arm_correlate_q7( pIn1 = pSrcB; /* Initialization to the end of inputA pointer */ - pIn2 = pSrcA + (srcALen - 1u); + pIn2 = pSrcA + (srcALen - 1U); /* Initialisation of the pointer after zero padding */ pDst = pDst + tot; @@ -747,13 +747,13 @@ void arm_correlate_q7( } /* Loop to calculate convolution for output length number of times */ - for (i = 0u; i <= tot; i++) + for (i = 0U; i <= tot; i++) { /* Initialize sum with zero to carry on MAC operations */ sum = 0; /* Loop to perform MAC operations according to convolution equation */ - for (j = 0u; j <= i; j++) + for (j = 0U; j <= i; j++) { /* Check the array limitations */ if ((((i - j) < srcBLen) && (j < srcALen))) @@ -764,9 +764,9 @@ void arm_correlate_q7( } /* Store the output in the destination buffer */ if (inv == 1) - *pDst-- = (q7_t) __SSAT((sum >> 7u), 8u); + *pDst-- = (q7_t) __SSAT((sum >> 7U), 8U); else - *pDst++ = (q7_t) __SSAT((sum >> 7u), 8u); + *pDst++ = (q7_t) __SSAT((sum >> 7U), 8U); } #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/FilteringFunctions/arm_fir_decimate_f32.c b/Source/FilteringFunctions/arm_fir_decimate_f32.c index 57eb35b2..160dc2a6 100644 --- a/Source/FilteringFunctions/arm_fir_decimate_f32.c +++ b/Source/FilteringFunctions/arm_fir_decimate_f32.c @@ -152,13 +152,13 @@ void arm_fir_decimate_f32( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ blkCnt = outBlockSize / 4; blkCntN4 = outBlockSize - (4 * blkCnt); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy 4 * decimation factor number of new input samples into the state buffer */ i = 4 * S->M; @@ -190,7 +190,7 @@ void arm_fir_decimate_f32( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the b[numTaps-1] coefficient */ c0 = *(pb++); @@ -260,9 +260,9 @@ void arm_fir_decimate_f32( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -297,7 +297,7 @@ void arm_fir_decimate_f32( blkCnt--; } - while (blkCntN4 > 0u) + while (blkCntN4 > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -322,7 +322,7 @@ void arm_fir_decimate_f32( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the b[numTaps-1] coefficient */ c0 = *(pb++); @@ -365,9 +365,9 @@ void arm_fir_decimate_f32( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -400,10 +400,10 @@ void arm_fir_decimate_f32( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = (numTaps - 1u) >> 2; + i = (numTaps - 1U) >> 2; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -414,10 +414,10 @@ void arm_fir_decimate_f32( i--; } - i = (numTaps - 1u) % 0x04u; + i = (numTaps - 1U) % 0x04U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -431,12 +431,12 @@ void arm_fir_decimate_f32( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ blkCnt = outBlockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -458,7 +458,7 @@ void arm_fir_decimate_f32( tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -492,10 +492,10 @@ void arm_fir_decimate_f32( pStateCurnt = S->pState; /* Copy numTaps number of values */ - i = (numTaps - 1u); + i = (numTaps - 1U); /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_decimate_fast_q15.c b/Source/FilteringFunctions/arm_fir_decimate_fast_q15.c index 2270a3f8..00b27908 100644 --- a/Source/FilteringFunctions/arm_fir_decimate_fast_q15.c +++ b/Source/FilteringFunctions/arm_fir_decimate_fast_q15.c @@ -87,7 +87,7 @@ void arm_fir_decimate_fast_q15( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ @@ -95,7 +95,7 @@ void arm_fir_decimate_fast_q15( blkCntN3 = outBlockSize - (2 * blkCnt); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = 2 * S->M; @@ -124,7 +124,7 @@ void arm_fir_decimate_fast_q15( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the Read b[numTaps-1] and b[numTaps-2] coefficients */ c0 = *__SIMD32(pb)++; @@ -157,9 +157,9 @@ void arm_fir_decimate_fast_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -192,7 +192,7 @@ void arm_fir_decimate_fast_q15( - while (blkCntN3 > 0u) + while (blkCntN3 > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -217,7 +217,7 @@ void arm_fir_decimate_fast_q15( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the Read b[numTaps-1] and b[numTaps-2] coefficients */ c0 = *__SIMD32(pb)++; @@ -242,9 +242,9 @@ void arm_fir_decimate_fast_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -278,10 +278,10 @@ void arm_fir_decimate_fast_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = (numTaps - 1u) >> 2u; + i = (numTaps - 1U) >> 2U; /* copy data */ - while (i > 0u) + while (i > 0U) { *__SIMD32(pStateCurnt)++ = *__SIMD32(pState)++; *__SIMD32(pStateCurnt)++ = *__SIMD32(pState)++; @@ -290,10 +290,10 @@ void arm_fir_decimate_fast_q15( i--; } - i = (numTaps - 1u) % 0x04u; + i = (numTaps - 1U) % 0x04U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -327,14 +327,14 @@ void arm_fir_decimate_fast_q15( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ blkCnt = outBlockSize / 2; blkCntN3 = outBlockSize - (2 * blkCnt); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = 2 * S->M; @@ -363,7 +363,7 @@ void arm_fir_decimate_fast_q15( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the Read b[numTaps-1] coefficients */ c0 = *pb++; @@ -414,9 +414,9 @@ void arm_fir_decimate_fast_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -448,7 +448,7 @@ void arm_fir_decimate_fast_q15( blkCnt--; } - while (blkCntN3 > 0u) + while (blkCntN3 > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -473,7 +473,7 @@ void arm_fir_decimate_fast_q15( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the Read b[numTaps-1] coefficients */ c0 = *pb++; @@ -516,9 +516,9 @@ void arm_fir_decimate_fast_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -552,10 +552,10 @@ void arm_fir_decimate_fast_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = (numTaps - 1u) >> 2u; + i = (numTaps - 1U) >> 2U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -566,10 +566,10 @@ void arm_fir_decimate_fast_q15( i--; } - i = (numTaps - 1u) % 0x04u; + i = (numTaps - 1U) % 0x04U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_decimate_fast_q31.c b/Source/FilteringFunctions/arm_fir_decimate_fast_q31.c index 58f1c04b..3b3d817d 100644 --- a/Source/FilteringFunctions/arm_fir_decimate_fast_q31.c +++ b/Source/FilteringFunctions/arm_fir_decimate_fast_q31.c @@ -83,14 +83,14 @@ void arm_fir_decimate_fast_q31( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ blkCnt = outBlockSize / 2; blkCntN2 = outBlockSize - (2 * blkCnt); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = 2 * S->M; @@ -117,7 +117,7 @@ void arm_fir_decimate_fast_q31( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the b[numTaps-1] coefficient */ c0 = *(pb); @@ -131,34 +131,34 @@ void arm_fir_decimate_fast_q31( acc1 = (q31_t) ((((q63_t) acc1 << 32) + ((q63_t) x1 * c0)) >> 32); /* Read the b[numTaps-2] coefficient */ - c0 = *(pb + 1u); + c0 = *(pb + 1U); /* Read x[n-numTaps-2] for sample 0 sample 1 */ - x0 = *(px0 + 1u); - x1 = *(px1 + 1u); + x0 = *(px0 + 1U); + x1 = *(px1 + 1U); /* Perform the multiply-accumulate */ acc0 = (q31_t) ((((q63_t) acc0 << 32) + ((q63_t) x0 * c0)) >> 32); acc1 = (q31_t) ((((q63_t) acc1 << 32) + ((q63_t) x1 * c0)) >> 32); /* Read the b[numTaps-3] coefficient */ - c0 = *(pb + 2u); + c0 = *(pb + 2U); /* Read x[n-numTaps-3] for sample 0 sample 1 */ - x0 = *(px0 + 2u); - x1 = *(px1 + 2u); - pb += 4u; + x0 = *(px0 + 2U); + x1 = *(px1 + 2U); + pb += 4U; /* Perform the multiply-accumulate */ acc0 = (q31_t) ((((q63_t) acc0 << 32) + ((q63_t) x0 * c0)) >> 32); acc1 = (q31_t) ((((q63_t) acc1 << 32) + ((q63_t) x1 * c0)) >> 32); /* Read the b[numTaps-4] coefficient */ - c0 = *(pb - 1u); + c0 = *(pb - 1U); /* Read x[n-numTaps-4] for sample 0 sample 1 */ - x0 = *(px0 + 3u); - x1 = *(px1 + 3u); + x0 = *(px0 + 3U); + x1 = *(px1 + 3U); /* Perform the multiply-accumulate */ @@ -166,17 +166,17 @@ void arm_fir_decimate_fast_q31( acc1 = (q31_t) ((((q63_t) acc1 << 32) + ((q63_t) x1 * c0)) >> 32); /* update state pointers */ - px0 += 4u; - px1 += 4u; + px0 += 4U; + px1 += 4U; /* Decrement the loop counter */ tapCnt--; } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -205,7 +205,7 @@ void arm_fir_decimate_fast_q31( blkCnt--; } - while (blkCntN2 > 0u) + while (blkCntN2 > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -230,7 +230,7 @@ void arm_fir_decimate_fast_q31( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the b[numTaps-1] coefficient */ c0 = *(pb++); @@ -273,9 +273,9 @@ void arm_fir_decimate_fast_q31( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -308,10 +308,10 @@ void arm_fir_decimate_fast_q31( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = (numTaps - 1u) >> 2u; + i = (numTaps - 1U) >> 2U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -322,10 +322,10 @@ void arm_fir_decimate_fast_q31( i--; } - i = (numTaps - 1u) % 0x04u; + i = (numTaps - 1U) % 0x04U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_decimate_init_f32.c b/Source/FilteringFunctions/arm_fir_decimate_init_f32.c index c1fc0f20..20eb959c 100644 --- a/Source/FilteringFunctions/arm_fir_decimate_init_f32.c +++ b/Source/FilteringFunctions/arm_fir_decimate_init_f32.c @@ -71,7 +71,7 @@ arm_status arm_fir_decimate_init_f32( arm_status status; /* The size of the input block must be a multiple of the decimation factor */ - if ((blockSize % M) != 0u) + if ((blockSize % M) != 0U) { /* Set status as ARM_MATH_LENGTH_ERROR */ status = ARM_MATH_LENGTH_ERROR; @@ -85,7 +85,7 @@ arm_status arm_fir_decimate_init_f32( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always (blockSize + numTaps - 1) */ - memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(float32_t)); + memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(float32_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_fir_decimate_init_q15.c b/Source/FilteringFunctions/arm_fir_decimate_init_q15.c index f920175b..9094de57 100644 --- a/Source/FilteringFunctions/arm_fir_decimate_init_q15.c +++ b/Source/FilteringFunctions/arm_fir_decimate_init_q15.c @@ -73,7 +73,7 @@ arm_status arm_fir_decimate_init_q15( arm_status status; /* The size of the input block must be a multiple of the decimation factor */ - if ((blockSize % M) != 0u) + if ((blockSize % M) != 0U) { /* Set status as ARM_MATH_LENGTH_ERROR */ status = ARM_MATH_LENGTH_ERROR; @@ -87,7 +87,7 @@ arm_status arm_fir_decimate_init_q15( S->pCoeffs = pCoeffs; /* Clear the state buffer. The size of buffer is always (blockSize + numTaps - 1) */ - memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(q15_t)); + memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(q15_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_fir_decimate_init_q31.c b/Source/FilteringFunctions/arm_fir_decimate_init_q31.c index 0490b3fe..a223a8e4 100644 --- a/Source/FilteringFunctions/arm_fir_decimate_init_q31.c +++ b/Source/FilteringFunctions/arm_fir_decimate_init_q31.c @@ -71,7 +71,7 @@ arm_status arm_fir_decimate_init_q31( arm_status status; /* The size of the input block must be a multiple of the decimation factor */ - if ((blockSize % M) != 0u) + if ((blockSize % M) != 0U) { /* Set status as ARM_MATH_LENGTH_ERROR */ status = ARM_MATH_LENGTH_ERROR; diff --git a/Source/FilteringFunctions/arm_fir_decimate_q15.c b/Source/FilteringFunctions/arm_fir_decimate_q15.c index fa472b4b..345aa9cf 100644 --- a/Source/FilteringFunctions/arm_fir_decimate_q15.c +++ b/Source/FilteringFunctions/arm_fir_decimate_q15.c @@ -84,7 +84,7 @@ void arm_fir_decimate_q15( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ @@ -92,7 +92,7 @@ void arm_fir_decimate_q15( blkCntN3 = outBlockSize - (2 * blkCnt); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = 2 * S->M; @@ -121,7 +121,7 @@ void arm_fir_decimate_q15( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the Read b[numTaps-1] and b[numTaps-2] coefficients */ c0 = *__SIMD32(pb)++; @@ -154,9 +154,9 @@ void arm_fir_decimate_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -189,7 +189,7 @@ void arm_fir_decimate_q15( - while (blkCntN3 > 0u) + while (blkCntN3 > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -214,7 +214,7 @@ void arm_fir_decimate_q15( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the Read b[numTaps-1] and b[numTaps-2] coefficients */ c0 = *__SIMD32(pb)++; @@ -239,9 +239,9 @@ void arm_fir_decimate_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -275,10 +275,10 @@ void arm_fir_decimate_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = (numTaps - 1u) >> 2u; + i = (numTaps - 1U) >> 2U; /* copy data */ - while (i > 0u) + while (i > 0U) { *__SIMD32(pStateCurnt)++ = *__SIMD32(pState)++; *__SIMD32(pStateCurnt)++ = *__SIMD32(pState)++; @@ -287,10 +287,10 @@ void arm_fir_decimate_q15( i--; } - i = (numTaps - 1u) % 0x04u; + i = (numTaps - 1U) % 0x04U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -324,14 +324,14 @@ void arm_fir_decimate_q15( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ blkCnt = outBlockSize / 2; blkCntN3 = outBlockSize - (2 * blkCnt); - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = 2 * S->M; @@ -360,7 +360,7 @@ void arm_fir_decimate_q15( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the Read b[numTaps-1] coefficients */ c0 = *pb++; @@ -411,9 +411,9 @@ void arm_fir_decimate_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -444,7 +444,7 @@ void arm_fir_decimate_q15( blkCnt--; } - while (blkCntN3 > 0u) + while (blkCntN3 > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -469,7 +469,7 @@ void arm_fir_decimate_q15( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the Read b[numTaps-1] coefficients */ c0 = *pb++; @@ -512,9 +512,9 @@ void arm_fir_decimate_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -548,10 +548,10 @@ void arm_fir_decimate_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = (numTaps - 1u) >> 2u; + i = (numTaps - 1U) >> 2U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -562,10 +562,10 @@ void arm_fir_decimate_q15( i--; } - i = (numTaps - 1u) % 0x04u; + i = (numTaps - 1U) % 0x04U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -602,12 +602,12 @@ void arm_fir_decimate_q15( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ blkCnt = outBlockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -629,7 +629,7 @@ void arm_fir_decimate_q15( tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -663,10 +663,10 @@ void arm_fir_decimate_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = numTaps - 1u; + i = numTaps - 1U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_decimate_q31.c b/Source/FilteringFunctions/arm_fir_decimate_q31.c index 4e4d4d13..ed674426 100644 --- a/Source/FilteringFunctions/arm_fir_decimate_q31.c +++ b/Source/FilteringFunctions/arm_fir_decimate_q31.c @@ -80,12 +80,12 @@ void arm_fir_decimate_q31( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ blkCnt = outBlockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -110,7 +110,7 @@ void arm_fir_decimate_q31( /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the b[numTaps-1] coefficient */ c0 = *(pb++); @@ -153,9 +153,9 @@ void arm_fir_decimate_q31( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -188,10 +188,10 @@ void arm_fir_decimate_q31( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = (numTaps - 1u) >> 2u; + i = (numTaps - 1U) >> 2U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -202,10 +202,10 @@ void arm_fir_decimate_q31( i--; } - i = (numTaps - 1u) % 0x04u; + i = (numTaps - 1U) % 0x04U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -219,12 +219,12 @@ void arm_fir_decimate_q31( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Total number of output samples to be computed */ blkCnt = outBlockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy decimation factor number of new input samples into the state buffer */ i = S->M; @@ -246,7 +246,7 @@ void arm_fir_decimate_q31( tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *pb++; @@ -279,10 +279,10 @@ void arm_fir_decimate_q31( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = numTaps - 1u; + i = numTaps - 1U; /* copy data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_f32.c b/Source/FilteringFunctions/arm_fir_f32.c index 34c19022..61ec80a1 100644 --- a/Source/FilteringFunctions/arm_fir_f32.c +++ b/Source/FilteringFunctions/arm_fir_f32.c @@ -138,7 +138,7 @@ uint32_t blockSize) /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Apply loop unrolling and compute 8 output values simultaneously. * The variables acc0 ... acc7 hold output values that are being computed: @@ -152,7 +152,7 @@ uint32_t blockSize) /* First part of the processing with loop unrolling. Compute 8 outputs at a time. ** a second loop below computes the remaining 1 to 7 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy four new input samples into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -194,11 +194,11 @@ uint32_t blockSize) x6 = *px++; /* Loop unrolling. Process 8 taps at a time. */ - tapCnt = numTaps >> 3u; + tapCnt = numTaps >> 3U; /* Loop over the number of taps. Unroll by a factor of 8. ** Repeat until we've computed numTaps-8 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the b[numTaps-1] coefficient */ c0 = *(pb++); @@ -345,9 +345,9 @@ uint32_t blockSize) } /* If the filter length is not a multiple of 8, compute the remaining filter taps */ - tapCnt = numTaps % 0x8u; + tapCnt = numTaps % 0x8U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -396,9 +396,9 @@ uint32_t blockSize) /* If the blockSize is not a multiple of 8, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x8u; + blkCnt = blockSize % 0x8U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -420,7 +420,7 @@ uint32_t blockSize) acc0 += *px++ * *pb++; i--; - } while (i > 0u); + } while (i > 0U); /* The result is store in the destination buffer. */ *pDst++ = acc0; @@ -438,10 +438,10 @@ uint32_t blockSize) /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = (numTaps - 1u) >> 2u; + tapCnt = (numTaps - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -453,10 +453,10 @@ uint32_t blockSize) } /* Calculate remaining number of copies */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -486,12 +486,12 @@ uint32_t blockSize) /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Initialize blkCnt with blockSize */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -514,7 +514,7 @@ uint32_t blockSize) acc += *px++ * *pb++; i--; - } while (i > 0u); + } while (i > 0U); /* The result is store in the destination buffer. */ *pDst++ = acc; @@ -533,10 +533,10 @@ uint32_t blockSize) pStateCurnt = S->pState; /* Copy numTaps number of values */ - tapCnt = numTaps - 1u; + tapCnt = numTaps - 1U; /* Copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -568,7 +568,7 @@ uint32_t blockSize) /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Apply loop unrolling and compute 8 output values simultaneously. * The variables acc0 ... acc7 hold output values that are being computed: @@ -582,7 +582,7 @@ uint32_t blockSize) /* First part of the processing with loop unrolling. Compute 8 outputs at a time. ** a second loop below computes the remaining 1 to 7 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy four new input samples into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -624,11 +624,11 @@ uint32_t blockSize) x6 = *px++; /* Loop unrolling. Process 8 taps at a time. */ - tapCnt = numTaps >> 3u; + tapCnt = numTaps >> 3U; /* Loop over the number of taps. Unroll by a factor of 8. ** Repeat until we've computed numTaps-8 coefficients. */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the b[numTaps-1] coefficient */ c0 = *(pb++); @@ -849,9 +849,9 @@ uint32_t blockSize) } /* If the filter length is not a multiple of 8, compute the remaining filter taps */ - tapCnt = numTaps % 0x8u; + tapCnt = numTaps % 0x8U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -909,9 +909,9 @@ uint32_t blockSize) /* If the blockSize is not a multiple of 8, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x8u; + blkCnt = blockSize % 0x8U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -933,7 +933,7 @@ uint32_t blockSize) acc0 += *px++ * *pb++; i--; - } while (i > 0u); + } while (i > 0U); /* The result is store in the destination buffer. */ *pDst++ = acc0; @@ -951,10 +951,10 @@ uint32_t blockSize) /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = (numTaps - 1u) >> 2u; + tapCnt = (numTaps - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -966,10 +966,10 @@ uint32_t blockSize) } /* Calculate remaining number of copies */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_fast_q15.c b/Source/FilteringFunctions/arm_fir_fast_q15.c index f85bebdb..212990c9 100644 --- a/Source/FilteringFunctions/arm_fir_fast_q15.c +++ b/Source/FilteringFunctions/arm_fir_fast_q15.c @@ -76,7 +76,7 @@ void arm_fir_fast_q15( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Apply loop unrolling and compute 4 output values simultaneously. * The variables acc0 ... acc3 hold output values that are being computed: @@ -91,7 +91,7 @@ void arm_fir_fast_q15( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy four new input samples into the state buffer. ** Use 32-bit SIMD to move the 16-bit data. Only requires two copies. */ @@ -164,7 +164,7 @@ void arm_fir_fast_q15( acc0 = __SMLAD(x2, c0, acc0); /* Read state x[n-N-6], x[n-N-7] with offset */ - x2 = _SIMD32_OFFSET(px + 2u); + x2 = _SIMD32_OFFSET(px + 2U); /* acc2 += b[N-2] * x[n-N-4] + b[N-3] * x[n-N-5] */ acc2 = __SMLAD(x0, c0, acc2); @@ -183,7 +183,7 @@ void arm_fir_fast_q15( acc3 = __SMLADX(x1, c0, acc3); /* Update state pointer for next state reading */ - px += 4u; + px += 4U; /* Decrement tap count */ tapCnt--; @@ -192,7 +192,7 @@ void arm_fir_fast_q15( /* If the filter length is not a multiple of 4, compute the remaining filter taps. ** This is always be 2 taps since the filter length is even. */ - if ((numTaps & 0x3u) != 0u) + if ((numTaps & 0x3U) != 0U) { /* Read last two coefficients */ @@ -249,7 +249,7 @@ void arm_fir_fast_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* Advance the state pointer by 4 to process the next group of 4 samples */ - pState = pState + 4u; + pState = pState + 4U; /* Decrement the loop counter */ blkCnt--; @@ -257,8 +257,8 @@ void arm_fir_fast_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; - while (blkCnt > 0u) + blkCnt = blockSize % 0x4U; + while (blkCnt > 0U) { /* Copy two samples into state buffer */ *pStateCurnt++ = *pSrc++; @@ -270,7 +270,7 @@ void arm_fir_fast_q15( px = pState; pb = pCoeffs; - tapCnt = numTaps >> 1u; + tapCnt = numTaps >> 1U; do { @@ -280,14 +280,14 @@ void arm_fir_fast_q15( tapCnt--; } - while (tapCnt > 0u); + while (tapCnt > 0U); /* The result is in 2.30 format. Convert to 1.15 with saturation. ** Then store the output in the destination buffer. */ *pDst++ = (q15_t) (__SSAT((acc0 >> 15), 16)); /* Advance state pointer by 1 for the next sample */ - pState = pState + 1u; + pState = pState + 1U; /* Decrement the loop counter */ blkCnt--; @@ -301,9 +301,9 @@ void arm_fir_fast_q15( pStateCurnt = S->pState; /* Calculation of count for copying integer writes */ - tapCnt = (numTaps - 1u) >> 2; + tapCnt = (numTaps - 1U) >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -315,10 +315,10 @@ void arm_fir_fast_q15( } /* Calculation of count for remaining q15_t data */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* copy remaining data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_fast_q31.c b/Source/FilteringFunctions/arm_fir_fast_q31.c index d2d9dc94..d37e13cb 100644 --- a/Source/FilteringFunctions/arm_fir_fast_q31.c +++ b/Source/FilteringFunctions/arm_fir_fast_q31.c @@ -79,7 +79,7 @@ void arm_fir_fast_q31( /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Apply loop unrolling and compute 4 output values simultaneously. * The variables acc0 ... acc3 hold output values that are being computed: @@ -93,7 +93,7 @@ void arm_fir_fast_q31( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy four new input samples into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -123,7 +123,7 @@ void arm_fir_fast_q31( tapCnt = numTaps >> 2; i = tapCnt; - while (i > 0u) + while (i > 0U) { /* Read the b[numTaps] coefficient */ c0 = *pb; @@ -144,10 +144,10 @@ void arm_fir_fast_q31( multAcc_32x32_keep32_R(acc3, x3, c0); /* Read the b[numTaps-1] coefficient */ - c0 = *(pb + 1u); + c0 = *(pb + 1U); /* Read x[n-numTaps-4] sample */ - x0 = *(px + 1u); + x0 = *(px + 1U); /* Perform the multiply-accumulates */ multAcc_32x32_keep32_R(acc0, x1, c0); @@ -156,10 +156,10 @@ void arm_fir_fast_q31( multAcc_32x32_keep32_R(acc3, x0, c0); /* Read the b[numTaps-2] coefficient */ - c0 = *(pb + 2u); + c0 = *(pb + 2U); /* Read x[n-numTaps-5] sample */ - x1 = *(px + 2u); + x1 = *(px + 2U); /* Perform the multiply-accumulates */ multAcc_32x32_keep32_R(acc0, x2, c0); @@ -168,10 +168,10 @@ void arm_fir_fast_q31( multAcc_32x32_keep32_R(acc3, x1, c0); /* Read the b[numTaps-3] coefficients */ - c0 = *(pb + 3u); + c0 = *(pb + 3U); /* Read x[n-numTaps-6] sample */ - x2 = *(px + 3u); + x2 = *(px + 3U); /* Perform the multiply-accumulates */ multAcc_32x32_keep32_R(acc0, x3, c0); @@ -180,8 +180,8 @@ void arm_fir_fast_q31( multAcc_32x32_keep32_R(acc3, x2, c0); /* update coefficient pointer */ - pb += 4u; - px += 4u; + pb += 4U; + px += 4U; /* Decrement the loop counter */ i--; @@ -189,8 +189,8 @@ void arm_fir_fast_q31( /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - i = numTaps - (tapCnt * 4u); - while (i > 0u) + i = numTaps - (tapCnt * 4U); + while (i > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -230,9 +230,9 @@ void arm_fir_fast_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 4u; + blkCnt = blockSize % 4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -253,7 +253,7 @@ void arm_fir_fast_q31( { multAcc_32x32_keep32_R(acc0, (*px++), (*(pb++))); i--; - } while (i > 0u); + } while (i > 0U); /* The result is in 2.30 format. Convert to 1.31 ** Then store the output in the destination buffer. */ @@ -274,10 +274,10 @@ void arm_fir_fast_q31( pStateCurnt = S->pState; /* Calculate remaining number of copies */ - tapCnt = (numTaps - 1u); + tapCnt = (numTaps - 1U); /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_init_f32.c b/Source/FilteringFunctions/arm_fir_init_f32.c index efb43886..8bcb7365 100644 --- a/Source/FilteringFunctions/arm_fir_init_f32.c +++ b/Source/FilteringFunctions/arm_fir_init_f32.c @@ -72,7 +72,7 @@ void arm_fir_init_f32( S->pCoeffs = pCoeffs; /* Clear state buffer and the size of state buffer is (blockSize + numTaps - 1) */ - memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(float32_t)); + memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(float32_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_fir_init_q15.c b/Source/FilteringFunctions/arm_fir_init_q15.c index e5a8507c..e4d6ef8b 100644 --- a/Source/FilteringFunctions/arm_fir_init_q15.c +++ b/Source/FilteringFunctions/arm_fir_init_q15.c @@ -90,7 +90,7 @@ arm_status arm_fir_init_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* The Number of filter coefficients in the filter must be even and at least 4 */ - if (numTaps & 0x1u) + if (numTaps & 0x1U) { status = ARM_MATH_ARGUMENT_ERROR; } @@ -124,7 +124,7 @@ arm_status arm_fir_init_q15( S->pCoeffs = pCoeffs; /* Clear the state buffer. The size is always (blockSize + numTaps - 1) */ - memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(q15_t)); + memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(q15_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_fir_init_q31.c b/Source/FilteringFunctions/arm_fir_init_q31.c index bd31ea97..3308438b 100644 --- a/Source/FilteringFunctions/arm_fir_init_q31.c +++ b/Source/FilteringFunctions/arm_fir_init_q31.c @@ -72,7 +72,7 @@ void arm_fir_init_q31( S->pCoeffs = pCoeffs; /* Clear state buffer and state array size is (blockSize + numTaps - 1) */ - memset(pState, 0, (blockSize + ((uint32_t) numTaps - 1u)) * sizeof(q31_t)); + memset(pState, 0, (blockSize + ((uint32_t) numTaps - 1U)) * sizeof(q31_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_fir_init_q7.c b/Source/FilteringFunctions/arm_fir_init_q7.c index 7da3da3b..38cc7b40 100644 --- a/Source/FilteringFunctions/arm_fir_init_q7.c +++ b/Source/FilteringFunctions/arm_fir_init_q7.c @@ -70,7 +70,7 @@ void arm_fir_init_q7( S->pCoeffs = pCoeffs; /* Clear the state buffer. The size is always (blockSize + numTaps - 1) */ - memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(q7_t)); + memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(q7_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_fir_interpolate_f32.c b/Source/FilteringFunctions/arm_fir_interpolate_f32.c index 2a3828a0..66cfcf87 100644 --- a/Source/FilteringFunctions/arm_fir_interpolate_f32.c +++ b/Source/FilteringFunctions/arm_fir_interpolate_f32.c @@ -154,14 +154,14 @@ void arm_fir_interpolate_f32( /* S->pState buffer contains previous frame (phaseLen - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (phaseLen - 1u); + pStateCurnt = S->pState + (phaseLen - 1U); /* Initialise blkCnt */ blkCnt = blockSize / 4; blkCntN4 = blockSize - (4 * blkCnt); /* Samples loop unrolled by 4 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -170,12 +170,12 @@ void arm_fir_interpolate_f32( *pStateCurnt++ = *pSrc++; /* Address modifier index of coefficient buffer */ - j = 1u; + j = 1U; /* Loop over the Interpolation factor. */ i = (S->L); - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ acc0 = 0.0f; @@ -191,13 +191,13 @@ void arm_fir_interpolate_f32( /* Loop over the polyPhase length. Unroll by a factor of 4. ** Repeat until we've computed numTaps-(4*S->L) coefficients. */ - tapCnt = phaseLen >> 2u; + tapCnt = phaseLen >> 2U; x0 = *(ptr1++); x1 = *(ptr1++); x2 = *(ptr1++); - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the input sample */ @@ -259,9 +259,9 @@ void arm_fir_interpolate_f32( } /* If the polyPhase length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = phaseLen % 0x4u; + tapCnt = phaseLen % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the input sample */ @@ -316,17 +316,17 @@ void arm_fir_interpolate_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - while (blkCntN4 > 0u) + while (blkCntN4 > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; /* Address modifier index of coefficient buffer */ - j = 1u; + j = 1U; /* Loop over the Interpolation factor. */ i = S->L; - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ sum0 = 0.0f; @@ -339,8 +339,8 @@ void arm_fir_interpolate_f32( /* Loop over the polyPhase length. Unroll by a factor of 4. ** Repeat until we've computed numTaps-(4*S->L) coefficients. */ - tapCnt = phaseLen >> 2u; - while (tapCnt > 0u) + tapCnt = phaseLen >> 2U; + while (tapCnt > 0U) { /* Read the coefficient */ @@ -398,9 +398,9 @@ void arm_fir_interpolate_f32( } /* If the polyPhase length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = phaseLen % 0x4u; + tapCnt = phaseLen % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ sum0 += *(ptr1++) * (*ptr2); @@ -437,10 +437,10 @@ void arm_fir_interpolate_f32( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = (phaseLen - 1u) >> 2u; + tapCnt = (phaseLen - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -451,10 +451,10 @@ void arm_fir_interpolate_f32( tapCnt--; } - tapCnt = (phaseLen - 1u) % 0x04u; + tapCnt = (phaseLen - 1U) % 0x04U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -486,13 +486,13 @@ void arm_fir_interpolate_f32( /* S->pState buffer contains previous frame (phaseLen - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (phaseLen - 1u); + pStateCurnt = S->pState + (phaseLen - 1U); /* Total number of intput samples */ blkCnt = blockSize; /* Loop over the blockSize. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -500,7 +500,7 @@ void arm_fir_interpolate_f32( /* Loop over the Interpolation factor. */ i = S->L; - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ sum = 0.0f; @@ -509,12 +509,12 @@ void arm_fir_interpolate_f32( ptr1 = pState; /* Initialize coefficient pointer */ - ptr2 = pCoeffs + (i - 1u); + ptr2 = pCoeffs + (i - 1U); /* Loop over the polyPhase length */ tapCnt = phaseLen; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ sum += *ptr1++ * *ptr2; @@ -548,9 +548,9 @@ void arm_fir_interpolate_f32( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = phaseLen - 1u; + tapCnt = phaseLen - 1U; - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_interpolate_init_f32.c b/Source/FilteringFunctions/arm_fir_interpolate_init_f32.c index 77dcdaab..05fc3709 100644 --- a/Source/FilteringFunctions/arm_fir_interpolate_init_f32.c +++ b/Source/FilteringFunctions/arm_fir_interpolate_init_f32.c @@ -72,7 +72,7 @@ arm_status arm_fir_interpolate_init_f32( arm_status status; /* The filter length must be a multiple of the interpolation factor */ - if ((numTaps % L) != 0u) + if ((numTaps % L) != 0U) { /* Set status as ARM_MATH_LENGTH_ERROR */ status = ARM_MATH_LENGTH_ERROR; @@ -92,7 +92,7 @@ arm_status arm_fir_interpolate_init_f32( /* Clear state buffer and size of state array is always phaseLength + blockSize - 1 */ memset(pState, 0, (blockSize + - ((uint32_t) S->phaseLength - 1u)) * sizeof(float32_t)); + ((uint32_t) S->phaseLength - 1U)) * sizeof(float32_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_fir_interpolate_init_q15.c b/Source/FilteringFunctions/arm_fir_interpolate_init_q15.c index 17e0c1fc..3b3fb79c 100644 --- a/Source/FilteringFunctions/arm_fir_interpolate_init_q15.c +++ b/Source/FilteringFunctions/arm_fir_interpolate_init_q15.c @@ -72,7 +72,7 @@ arm_status arm_fir_interpolate_init_q15( arm_status status; /* The filter length must be a multiple of the interpolation factor */ - if ((numTaps % L) != 0u) + if ((numTaps % L) != 0U) { /* Set status as ARM_MATH_LENGTH_ERROR */ status = ARM_MATH_LENGTH_ERROR; @@ -91,7 +91,7 @@ arm_status arm_fir_interpolate_init_q15( /* Clear state buffer and size of buffer is always phaseLength + blockSize - 1 */ memset(pState, 0, - (blockSize + ((uint32_t) S->phaseLength - 1u)) * sizeof(q15_t)); + (blockSize + ((uint32_t) S->phaseLength - 1U)) * sizeof(q15_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_fir_interpolate_init_q31.c b/Source/FilteringFunctions/arm_fir_interpolate_init_q31.c index 94e1bd2f..03959c0b 100644 --- a/Source/FilteringFunctions/arm_fir_interpolate_init_q31.c +++ b/Source/FilteringFunctions/arm_fir_interpolate_init_q31.c @@ -73,7 +73,7 @@ arm_status arm_fir_interpolate_init_q31( arm_status status; /* The filter length must be a multiple of the interpolation factor */ - if ((numTaps % L) != 0u) + if ((numTaps % L) != 0U) { /* Set status as ARM_MATH_LENGTH_ERROR */ status = ARM_MATH_LENGTH_ERROR; @@ -92,7 +92,7 @@ arm_status arm_fir_interpolate_init_q31( /* Clear state buffer and size of buffer is always phaseLength + blockSize - 1 */ memset(pState, 0, - (blockSize + ((uint32_t) S->phaseLength - 1u)) * sizeof(q31_t)); + (blockSize + ((uint32_t) S->phaseLength - 1U)) * sizeof(q31_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_fir_interpolate_q15.c b/Source/FilteringFunctions/arm_fir_interpolate_q15.c index 0a87df84..dc0cb4bb 100644 --- a/Source/FilteringFunctions/arm_fir_interpolate_q15.c +++ b/Source/FilteringFunctions/arm_fir_interpolate_q15.c @@ -86,19 +86,19 @@ void arm_fir_interpolate_q15( blkCntN2 = blockSize - (2 * blkCnt); /* Samples loop unrolled by 2 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; *pStateCurnt++ = *pSrc++; /* Address modifier index of coefficient buffer */ - j = 1u; + j = 1U; /* Loop over the Interpolation factor. */ i = (S->L); - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ acc0 = 0; @@ -112,11 +112,11 @@ void arm_fir_interpolate_q15( /* Loop over the polyPhase length. Unroll by a factor of 4. ** Repeat until we've computed numTaps-(4*S->L) coefficients. */ - tapCnt = phaseLen >> 2u; + tapCnt = phaseLen >> 2U; x0 = *(ptr1++); - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the input sample */ @@ -172,9 +172,9 @@ void arm_fir_interpolate_q15( } /* If the polyPhase length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = phaseLen % 0x4u; + tapCnt = phaseLen % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the input sample */ @@ -225,17 +225,17 @@ void arm_fir_interpolate_q15( blkCnt = blkCntN2; /* Loop over the blockSize. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; /* Address modifier index of coefficient buffer */ - j = 1u; + j = 1U; /* Loop over the Interpolation factor. */ i = S->L; - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ sum0 = 0; @@ -249,7 +249,7 @@ void arm_fir_interpolate_q15( /* Loop over the polyPhase length. Unroll by a factor of 4. ** Repeat until we've computed numTaps-(4*S->L) coefficients. */ tapCnt = phaseLen >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the coefficient */ @@ -307,9 +307,9 @@ void arm_fir_interpolate_q15( } /* If the polyPhase length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = phaseLen & 0x3u; + tapCnt = phaseLen & 0x3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the coefficient */ c0 = *(ptr2); @@ -352,10 +352,10 @@ void arm_fir_interpolate_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = ((uint32_t) phaseLen - 1u) >> 2u; + i = ((uint32_t) phaseLen - 1U) >> 2U; /* copy data */ - while (i > 0u) + while (i > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE @@ -375,9 +375,9 @@ void arm_fir_interpolate_q15( i--; } - i = ((uint32_t) phaseLen - 1u) % 0x04u; + i = ((uint32_t) phaseLen - 1U) % 0x04U; - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; @@ -408,13 +408,13 @@ void arm_fir_interpolate_q15( /* S->pState buffer contains previous frame (phaseLen - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (phaseLen - 1u); + pStateCurnt = S->pState + (phaseLen - 1U); /* Total number of intput samples */ blkCnt = blockSize; /* Loop over the blockSize. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -422,7 +422,7 @@ void arm_fir_interpolate_q15( /* Loop over the Interpolation factor. */ i = S->L; - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ sum = 0; @@ -431,12 +431,12 @@ void arm_fir_interpolate_q15( ptr1 = pState; /* Initialize coefficient pointer */ - ptr2 = pCoeffs + (i - 1u); + ptr2 = pCoeffs + (i - 1U); /* Loop over the polyPhase length */ tapCnt = (uint32_t) phaseLen; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the coefficient */ c0 = *ptr2; @@ -476,9 +476,9 @@ void arm_fir_interpolate_q15( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - i = (uint32_t) phaseLen - 1u; + i = (uint32_t) phaseLen - 1U; - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_interpolate_q31.c b/Source/FilteringFunctions/arm_fir_interpolate_q31.c index aa9801eb..2d23b377 100644 --- a/Source/FilteringFunctions/arm_fir_interpolate_q31.c +++ b/Source/FilteringFunctions/arm_fir_interpolate_q31.c @@ -87,19 +87,19 @@ void arm_fir_interpolate_q31( blkCntN2 = blockSize - (2 * blkCnt); /* Samples loop unrolled by 2 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; *pStateCurnt++ = *pSrc++; /* Address modifier index of coefficient buffer */ - j = 1u; + j = 1U; /* Loop over the Interpolation factor. */ i = (S->L); - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ acc0 = 0; @@ -113,11 +113,11 @@ void arm_fir_interpolate_q31( /* Loop over the polyPhase length. Unroll by a factor of 4. ** Repeat until we've computed numTaps-(4*S->L) coefficients. */ - tapCnt = phaseLen >> 2u; + tapCnt = phaseLen >> 2U; x0 = *(ptr1++); - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the input sample */ @@ -173,9 +173,9 @@ void arm_fir_interpolate_q31( } /* If the polyPhase length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = phaseLen % 0x4u; + tapCnt = phaseLen % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the input sample */ @@ -227,17 +227,17 @@ void arm_fir_interpolate_q31( blkCnt = blkCntN2; /* Loop over the blockSize. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; /* Address modifier index of coefficient buffer */ - j = 1u; + j = 1U; /* Loop over the Interpolation factor. */ i = S->L; - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ sum0 = 0; @@ -251,7 +251,7 @@ void arm_fir_interpolate_q31( /* Loop over the polyPhase length. Unroll by a factor of 4. ** Repeat until we've computed numTaps-(4*S->L) coefficients. */ tapCnt = phaseLen >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the coefficient */ @@ -309,9 +309,9 @@ void arm_fir_interpolate_q31( } /* If the polyPhase length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = phaseLen & 0x3u; + tapCnt = phaseLen & 0x3U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the coefficient */ c0 = *(ptr2); @@ -354,10 +354,10 @@ void arm_fir_interpolate_q31( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = (phaseLen - 1u) >> 2u; + tapCnt = (phaseLen - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -368,10 +368,10 @@ void arm_fir_interpolate_q31( tapCnt--; } - tapCnt = (phaseLen - 1u) % 0x04u; + tapCnt = (phaseLen - 1U) % 0x04U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -411,7 +411,7 @@ void arm_fir_interpolate_q31( blkCnt = blockSize; /* Loop over the blockSize. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -419,7 +419,7 @@ void arm_fir_interpolate_q31( /* Loop over the Interpolation factor. */ i = S->L; - while (i > 0u) + while (i > 0U) { /* Set accumulator to zero */ sum = 0; @@ -428,11 +428,11 @@ void arm_fir_interpolate_q31( ptr1 = pState; /* Initialize coefficient pointer */ - ptr2 = pCoeffs + (i - 1u); + ptr2 = pCoeffs + (i - 1U); tapCnt = phaseLen; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the coefficient */ c0 = *(ptr2); @@ -472,10 +472,10 @@ void arm_fir_interpolate_q31( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = phaseLen - 1u; + tapCnt = phaseLen - 1U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_lattice_f32.c b/Source/FilteringFunctions/arm_fir_lattice_f32.c index 5ac84176..369c9e42 100644 --- a/Source/FilteringFunctions/arm_fir_lattice_f32.c +++ b/Source/FilteringFunctions/arm_fir_lattice_f32.c @@ -146,7 +146,7 @@ void arm_fir_lattice_f32( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read two samples from input buffer */ @@ -198,13 +198,13 @@ void arm_fir_lattice_f32( fcurr4 = fnext4; /* Loop unrolling. Process 4 taps at a time . */ - stageCnt = (numStages - 1u) >> 2u; + stageCnt = (numStages - 1U) >> 2U; /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numStages-3 coefficients. */ /* Process 2nd, 3rd, 4th and 5th taps ... here */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* Read g1(n-1), g3(n-1) .... from state */ gcurr1 = *px; @@ -310,9 +310,9 @@ void arm_fir_lattice_f32( } /* If the (filter length -1) is not a multiple of 4, compute the remaining filter taps */ - stageCnt = (numStages - 1u) % 0x4u; + stageCnt = (numStages - 1U) % 0x4U; - while (stageCnt > 0u) + while (stageCnt > 0U) { gcurr1 = *px; @@ -353,9 +353,9 @@ void arm_fir_lattice_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurr1 = *pSrc++; @@ -382,10 +382,10 @@ void arm_fir_lattice_f32( for next stage processing */ fcurr1 = fnext1; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* read g2(n) from state buffer */ gcurr1 = *px; @@ -426,7 +426,7 @@ void arm_fir_lattice_f32( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurr = *pSrc++; @@ -453,10 +453,10 @@ void arm_fir_lattice_f32( for next stage processing */ fcurr = fnext; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* read g2(n) from state buffer */ gcurr = *px; diff --git a/Source/FilteringFunctions/arm_fir_lattice_q15.c b/Source/FilteringFunctions/arm_fir_lattice_q15.c index 8095ecaa..4c4e849f 100644 --- a/Source/FilteringFunctions/arm_fir_lattice_q15.c +++ b/Source/FilteringFunctions/arm_fir_lattice_q15.c @@ -72,11 +72,11 @@ void arm_fir_lattice_q15( pState = &S->pState[0]; - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read two samples from input buffer */ @@ -95,19 +95,19 @@ void arm_fir_lattice_q15( /* Process first sample for first tap */ /* f1(n) = f0(n) + K1 * g0(n-1) */ - fnext1 = (q31_t) ((gcurnt1 * (*pk)) >> 15u) + fcurnt1; + fnext1 = (q31_t) ((gcurnt1 * (*pk)) >> 15U) + fcurnt1; fnext1 = __SSAT(fnext1, 16); /* g1(n) = f0(n) * K1 + g0(n-1) */ - gnext1 = (q31_t) ((fcurnt1 * (*pk)) >> 15u) + gcurnt1; + gnext1 = (q31_t) ((fcurnt1 * (*pk)) >> 15U) + gcurnt1; gnext1 = __SSAT(gnext1, 16); /* Process second sample for first tap */ /* for sample 2 processing */ - fnext2 = (q31_t) ((fcurnt1 * (*pk)) >> 15u) + fcurnt2; + fnext2 = (q31_t) ((fcurnt1 * (*pk)) >> 15U) + fcurnt2; fnext2 = __SSAT(fnext2, 16); - gnext2 = (q31_t) ((fcurnt2 * (*pk)) >> 15u) + fcurnt1; + gnext2 = (q31_t) ((fcurnt2 * (*pk)) >> 15U) + fcurnt1; gnext2 = __SSAT(gnext2, 16); @@ -121,15 +121,15 @@ void arm_fir_lattice_q15( *px++ = (q15_t) fcurnt4; /* Process third sample for first tap */ - fnext3 = (q31_t) ((fcurnt2 * (*pk)) >> 15u) + fcurnt3; + fnext3 = (q31_t) ((fcurnt2 * (*pk)) >> 15U) + fcurnt3; fnext3 = __SSAT(fnext3, 16); - gnext3 = (q31_t) ((fcurnt3 * (*pk)) >> 15u) + fcurnt2; + gnext3 = (q31_t) ((fcurnt3 * (*pk)) >> 15U) + fcurnt2; gnext3 = __SSAT(gnext3, 16); /* Process fourth sample for first tap */ - fnext4 = (q31_t) ((fcurnt3 * (*pk)) >> 15u) + fcurnt4; + fnext4 = (q31_t) ((fcurnt3 * (*pk)) >> 15U) + fcurnt4; fnext4 = __SSAT(fnext4, 16); - gnext4 = (q31_t) ((fcurnt4 * (*pk++)) >> 15u) + fcurnt3; + gnext4 = (q31_t) ((fcurnt4 * (*pk++)) >> 15U) + fcurnt3; gnext4 = __SSAT(gnext4, 16); /* Update of f values for next coefficient set processing */ @@ -140,14 +140,14 @@ void arm_fir_lattice_q15( /* Loop unrolling. Process 4 taps at a time . */ - stageCnt = (numStages - 1u) >> 2; + stageCnt = (numStages - 1U) >> 2; /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numStages-3 coefficients. */ /* Process 2nd, 3rd, 4th and 5th taps ... here */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* Read g1(n-1), g3(n-1) .... from state */ gcurnt1 = *px; @@ -158,33 +158,33 @@ void arm_fir_lattice_q15( /* Process first sample for 2nd, 6th .. tap */ /* Sample processing for K2, K6.... */ /* f1(n) = f0(n) + K1 * g0(n-1) */ - fnext1 = (q31_t) ((gcurnt1 * (*pk)) >> 15u) + fcurnt1; + fnext1 = (q31_t) ((gcurnt1 * (*pk)) >> 15U) + fcurnt1; fnext1 = __SSAT(fnext1, 16); /* Process second sample for 2nd, 6th .. tap */ /* for sample 2 processing */ - fnext2 = (q31_t) ((gnext1 * (*pk)) >> 15u) + fcurnt2; + fnext2 = (q31_t) ((gnext1 * (*pk)) >> 15U) + fcurnt2; fnext2 = __SSAT(fnext2, 16); /* Process third sample for 2nd, 6th .. tap */ - fnext3 = (q31_t) ((gnext2 * (*pk)) >> 15u) + fcurnt3; + fnext3 = (q31_t) ((gnext2 * (*pk)) >> 15U) + fcurnt3; fnext3 = __SSAT(fnext3, 16); /* Process fourth sample for 2nd, 6th .. tap */ /* fnext4 = fcurnt4 + (*pk) * gnext3; */ - fnext4 = (q31_t) ((gnext3 * (*pk)) >> 15u) + fcurnt4; + fnext4 = (q31_t) ((gnext3 * (*pk)) >> 15U) + fcurnt4; fnext4 = __SSAT(fnext4, 16); /* g1(n) = f0(n) * K1 + g0(n-1) */ /* Calculation of state values for next stage */ - gnext4 = (q31_t) ((fcurnt4 * (*pk)) >> 15u) + gnext3; + gnext4 = (q31_t) ((fcurnt4 * (*pk)) >> 15U) + gnext3; gnext4 = __SSAT(gnext4, 16); - gnext3 = (q31_t) ((fcurnt3 * (*pk)) >> 15u) + gnext2; + gnext3 = (q31_t) ((fcurnt3 * (*pk)) >> 15U) + gnext2; gnext3 = __SSAT(gnext3, 16); - gnext2 = (q31_t) ((fcurnt2 * (*pk)) >> 15u) + gnext1; + gnext2 = (q31_t) ((fcurnt2 * (*pk)) >> 15U) + gnext1; gnext2 = __SSAT(gnext2, 16); - gnext1 = (q31_t) ((fcurnt1 * (*pk++)) >> 15u) + gcurnt1; + gnext1 = (q31_t) ((fcurnt1 * (*pk++)) >> 15U) + gcurnt1; gnext1 = __SSAT(gnext1, 16); @@ -197,33 +197,33 @@ void arm_fir_lattice_q15( /* Sample processing for K3, K7.... */ /* Process first sample for 3rd, 7th .. tap */ /* f3(n) = f2(n) + K3 * g2(n-1) */ - fcurnt1 = (q31_t) ((gcurnt1 * (*pk)) >> 15u) + fnext1; + fcurnt1 = (q31_t) ((gcurnt1 * (*pk)) >> 15U) + fnext1; fcurnt1 = __SSAT(fcurnt1, 16); /* Process second sample for 3rd, 7th .. tap */ - fcurnt2 = (q31_t) ((gnext1 * (*pk)) >> 15u) + fnext2; + fcurnt2 = (q31_t) ((gnext1 * (*pk)) >> 15U) + fnext2; fcurnt2 = __SSAT(fcurnt2, 16); /* Process third sample for 3rd, 7th .. tap */ - fcurnt3 = (q31_t) ((gnext2 * (*pk)) >> 15u) + fnext3; + fcurnt3 = (q31_t) ((gnext2 * (*pk)) >> 15U) + fnext3; fcurnt3 = __SSAT(fcurnt3, 16); /* Process fourth sample for 3rd, 7th .. tap */ - fcurnt4 = (q31_t) ((gnext3 * (*pk)) >> 15u) + fnext4; + fcurnt4 = (q31_t) ((gnext3 * (*pk)) >> 15U) + fnext4; fcurnt4 = __SSAT(fcurnt4, 16); /* Calculation of state values for next stage */ /* g3(n) = f2(n) * K3 + g2(n-1) */ - gnext4 = (q31_t) ((fnext4 * (*pk)) >> 15u) + gnext3; + gnext4 = (q31_t) ((fnext4 * (*pk)) >> 15U) + gnext3; gnext4 = __SSAT(gnext4, 16); - gnext3 = (q31_t) ((fnext3 * (*pk)) >> 15u) + gnext2; + gnext3 = (q31_t) ((fnext3 * (*pk)) >> 15U) + gnext2; gnext3 = __SSAT(gnext3, 16); - gnext2 = (q31_t) ((fnext2 * (*pk)) >> 15u) + gnext1; + gnext2 = (q31_t) ((fnext2 * (*pk)) >> 15U) + gnext1; gnext2 = __SSAT(gnext2, 16); - gnext1 = (q31_t) ((fnext1 * (*pk++)) >> 15u) + gcurnt1; + gnext1 = (q31_t) ((fnext1 * (*pk++)) >> 15U) + gcurnt1; gnext1 = __SSAT(gnext1, 16); /* Read g1(n-1), g3(n-1) .... from state */ @@ -235,33 +235,33 @@ void arm_fir_lattice_q15( /* Sample processing for K4, K8.... */ /* Process first sample for 4th, 8th .. tap */ /* f4(n) = f3(n) + K4 * g3(n-1) */ - fnext1 = (q31_t) ((gcurnt1 * (*pk)) >> 15u) + fcurnt1; + fnext1 = (q31_t) ((gcurnt1 * (*pk)) >> 15U) + fcurnt1; fnext1 = __SSAT(fnext1, 16); /* Process second sample for 4th, 8th .. tap */ /* for sample 2 processing */ - fnext2 = (q31_t) ((gnext1 * (*pk)) >> 15u) + fcurnt2; + fnext2 = (q31_t) ((gnext1 * (*pk)) >> 15U) + fcurnt2; fnext2 = __SSAT(fnext2, 16); /* Process third sample for 4th, 8th .. tap */ - fnext3 = (q31_t) ((gnext2 * (*pk)) >> 15u) + fcurnt3; + fnext3 = (q31_t) ((gnext2 * (*pk)) >> 15U) + fcurnt3; fnext3 = __SSAT(fnext3, 16); /* Process fourth sample for 4th, 8th .. tap */ - fnext4 = (q31_t) ((gnext3 * (*pk)) >> 15u) + fcurnt4; + fnext4 = (q31_t) ((gnext3 * (*pk)) >> 15U) + fcurnt4; fnext4 = __SSAT(fnext4, 16); /* g4(n) = f3(n) * K4 + g3(n-1) */ /* Calculation of state values for next stage */ - gnext4 = (q31_t) ((fcurnt4 * (*pk)) >> 15u) + gnext3; + gnext4 = (q31_t) ((fcurnt4 * (*pk)) >> 15U) + gnext3; gnext4 = __SSAT(gnext4, 16); - gnext3 = (q31_t) ((fcurnt3 * (*pk)) >> 15u) + gnext2; + gnext3 = (q31_t) ((fcurnt3 * (*pk)) >> 15U) + gnext2; gnext3 = __SSAT(gnext3, 16); - gnext2 = (q31_t) ((fcurnt2 * (*pk)) >> 15u) + gnext1; + gnext2 = (q31_t) ((fcurnt2 * (*pk)) >> 15U) + gnext1; gnext2 = __SSAT(gnext2, 16); - gnext1 = (q31_t) ((fcurnt1 * (*pk++)) >> 15u) + gcurnt1; + gnext1 = (q31_t) ((fcurnt1 * (*pk++)) >> 15U) + gcurnt1; gnext1 = __SSAT(gnext1, 16); @@ -274,39 +274,39 @@ void arm_fir_lattice_q15( /* Sample processing for K5, K9.... */ /* Process first sample for 5th, 9th .. tap */ /* f5(n) = f4(n) + K5 * g4(n-1) */ - fcurnt1 = (q31_t) ((gcurnt1 * (*pk)) >> 15u) + fnext1; + fcurnt1 = (q31_t) ((gcurnt1 * (*pk)) >> 15U) + fnext1; fcurnt1 = __SSAT(fcurnt1, 16); /* Process second sample for 5th, 9th .. tap */ - fcurnt2 = (q31_t) ((gnext1 * (*pk)) >> 15u) + fnext2; + fcurnt2 = (q31_t) ((gnext1 * (*pk)) >> 15U) + fnext2; fcurnt2 = __SSAT(fcurnt2, 16); /* Process third sample for 5th, 9th .. tap */ - fcurnt3 = (q31_t) ((gnext2 * (*pk)) >> 15u) + fnext3; + fcurnt3 = (q31_t) ((gnext2 * (*pk)) >> 15U) + fnext3; fcurnt3 = __SSAT(fcurnt3, 16); /* Process fourth sample for 5th, 9th .. tap */ - fcurnt4 = (q31_t) ((gnext3 * (*pk)) >> 15u) + fnext4; + fcurnt4 = (q31_t) ((gnext3 * (*pk)) >> 15U) + fnext4; fcurnt4 = __SSAT(fcurnt4, 16); /* Calculation of state values for next stage */ /* g5(n) = f4(n) * K5 + g4(n-1) */ - gnext4 = (q31_t) ((fnext4 * (*pk)) >> 15u) + gnext3; + gnext4 = (q31_t) ((fnext4 * (*pk)) >> 15U) + gnext3; gnext4 = __SSAT(gnext4, 16); - gnext3 = (q31_t) ((fnext3 * (*pk)) >> 15u) + gnext2; + gnext3 = (q31_t) ((fnext3 * (*pk)) >> 15U) + gnext2; gnext3 = __SSAT(gnext3, 16); - gnext2 = (q31_t) ((fnext2 * (*pk)) >> 15u) + gnext1; + gnext2 = (q31_t) ((fnext2 * (*pk)) >> 15U) + gnext1; gnext2 = __SSAT(gnext2, 16); - gnext1 = (q31_t) ((fnext1 * (*pk++)) >> 15u) + gcurnt1; + gnext1 = (q31_t) ((fnext1 * (*pk++)) >> 15U) + gcurnt1; gnext1 = __SSAT(gnext1, 16); stageCnt--; } /* If the (filter length -1) is not a multiple of 4, compute the remaining filter taps */ - stageCnt = (numStages - 1u) % 0x4u; + stageCnt = (numStages - 1U) % 0x4U; - while (stageCnt > 0u) + while (stageCnt > 0U) { gcurnt1 = *px; @@ -314,25 +314,25 @@ void arm_fir_lattice_q15( *px++ = (q15_t) gnext4; /* Process four samples for last three taps here */ - fnext1 = (q31_t) ((gcurnt1 * (*pk)) >> 15u) + fcurnt1; + fnext1 = (q31_t) ((gcurnt1 * (*pk)) >> 15U) + fcurnt1; fnext1 = __SSAT(fnext1, 16); - fnext2 = (q31_t) ((gnext1 * (*pk)) >> 15u) + fcurnt2; + fnext2 = (q31_t) ((gnext1 * (*pk)) >> 15U) + fcurnt2; fnext2 = __SSAT(fnext2, 16); - fnext3 = (q31_t) ((gnext2 * (*pk)) >> 15u) + fcurnt3; + fnext3 = (q31_t) ((gnext2 * (*pk)) >> 15U) + fcurnt3; fnext3 = __SSAT(fnext3, 16); - fnext4 = (q31_t) ((gnext3 * (*pk)) >> 15u) + fcurnt4; + fnext4 = (q31_t) ((gnext3 * (*pk)) >> 15U) + fcurnt4; fnext4 = __SSAT(fnext4, 16); /* g1(n) = f0(n) * K1 + g0(n-1) */ - gnext4 = (q31_t) ((fcurnt4 * (*pk)) >> 15u) + gnext3; + gnext4 = (q31_t) ((fcurnt4 * (*pk)) >> 15U) + gnext3; gnext4 = __SSAT(gnext4, 16); - gnext3 = (q31_t) ((fcurnt3 * (*pk)) >> 15u) + gnext2; + gnext3 = (q31_t) ((fcurnt3 * (*pk)) >> 15U) + gnext2; gnext3 = __SSAT(gnext3, 16); - gnext2 = (q31_t) ((fcurnt2 * (*pk)) >> 15u) + gnext1; + gnext2 = (q31_t) ((fcurnt2 * (*pk)) >> 15U) + gnext1; gnext2 = __SSAT(gnext2, 16); - gnext1 = (q31_t) ((fcurnt1 * (*pk++)) >> 15u) + gcurnt1; + gnext1 = (q31_t) ((fcurnt1 * (*pk++)) >> 15U) + gcurnt1; gnext1 = __SSAT(gnext1, 16); /* Update of f values for next coefficient set processing */ @@ -365,9 +365,9 @@ void arm_fir_lattice_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurnt1 = *pSrc++; @@ -383,12 +383,12 @@ void arm_fir_lattice_q15( /* for sample 1 processing */ /* f1(n) = f0(n) + K1 * g0(n-1) */ - fnext1 = (((q31_t) gcurnt1 * (*pk)) >> 15u) + fcurnt1; + fnext1 = (((q31_t) gcurnt1 * (*pk)) >> 15U) + fcurnt1; fnext1 = __SSAT(fnext1, 16); /* g1(n) = f0(n) * K1 + g0(n-1) */ - gnext1 = (((q31_t) fcurnt1 * (*pk++)) >> 15u) + gcurnt1; + gnext1 = (((q31_t) fcurnt1 * (*pk++)) >> 15U) + gcurnt1; gnext1 = __SSAT(gnext1, 16); /* save g1(n) in state buffer */ @@ -398,10 +398,10 @@ void arm_fir_lattice_q15( for next stage processing */ fcurnt1 = fnext1; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* read g2(n) from state buffer */ gcurnt1 = *px; @@ -411,11 +411,11 @@ void arm_fir_lattice_q15( /* Sample processing for K2, K3.... */ /* f2(n) = f1(n) + K2 * g1(n-1) */ - fnext1 = (((q31_t) gcurnt1 * (*pk)) >> 15u) + fcurnt1; + fnext1 = (((q31_t) gcurnt1 * (*pk)) >> 15U) + fcurnt1; fnext1 = __SSAT(fnext1, 16); /* g2(n) = f1(n) * K2 + g1(n-1) */ - gnext1 = (((q31_t) fcurnt1 * (*pk++)) >> 15u) + gcurnt1; + gnext1 = (((q31_t) fcurnt1 * (*pk++)) >> 15U) + gcurnt1; gnext1 = __SSAT(gnext1, 16); @@ -447,7 +447,7 @@ void arm_fir_lattice_q15( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurnt = *pSrc++; @@ -463,12 +463,12 @@ void arm_fir_lattice_q15( /* for sample 1 processing */ /* f1(n) = f0(n) + K1 * g0(n-1) */ - fnext = ((gcurnt * (*pk)) >> 15u) + fcurnt; + fnext = ((gcurnt * (*pk)) >> 15U) + fcurnt; fnext = __SSAT(fnext, 16); /* g1(n) = f0(n) * K1 + g0(n-1) */ - gnext = ((fcurnt * (*pk++)) >> 15u) + gcurnt; + gnext = ((fcurnt * (*pk++)) >> 15U) + gcurnt; gnext = __SSAT(gnext, 16); /* save f0(n) in state buffer */ @@ -478,10 +478,10 @@ void arm_fir_lattice_q15( for next stage processing */ fcurnt = fnext; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* read g1(n-1) from state buffer */ gcurnt = *px; @@ -491,11 +491,11 @@ void arm_fir_lattice_q15( /* Sample processing for K2, K3.... */ /* f2(n) = f1(n) + K2 * g1(n-1) */ - fnext = ((gcurnt * (*pk)) >> 15u) + fcurnt; + fnext = ((gcurnt * (*pk)) >> 15U) + fcurnt; fnext = __SSAT(fnext, 16); /* g2(n) = f1(n) * K2 + g1(n-1) */ - gnext = ((fcurnt * (*pk++)) >> 15u) + gcurnt; + gnext = ((fcurnt * (*pk++)) >> 15U) + gcurnt; gnext = __SSAT(gnext, 16); diff --git a/Source/FilteringFunctions/arm_fir_lattice_q31.c b/Source/FilteringFunctions/arm_fir_lattice_q31.c index fa05b6bd..8acfd34d 100644 --- a/Source/FilteringFunctions/arm_fir_lattice_q31.c +++ b/Source/FilteringFunctions/arm_fir_lattice_q31.c @@ -73,11 +73,11 @@ void arm_fir_lattice_q31( pState = &S->pState[0]; - blkCnt = blockSize >> 1u; + blkCnt = blockSize >> 1U; /* First part of the processing with loop unrolling. Compute 2 outputs at a time. a second loop below computes the remaining 1 sample. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurr1 = *pSrc++; @@ -103,8 +103,8 @@ void arm_fir_lattice_q31( /* g1(n) = f0(n) * K1 + g0(n-1) */ gnext1 = (q31_t) (((q63_t) fcurr1 * (k)) >> 32); - fnext1 = fcurr1 + (fnext1 << 1u); - gnext1 = gcurr1 + (gnext1 << 1u); + fnext1 = fcurr1 + (fnext1 << 1U); + gnext1 = gcurr1 + (gnext1 << 1U); /* for sample 1 processing */ /* f1(n) = f0(n) + K1 * g0(n-1) */ @@ -112,8 +112,8 @@ void arm_fir_lattice_q31( /* g1(n) = f0(n) * K1 + g0(n-1) */ gnext2 = (q31_t) (((q63_t) fcurr2 * (k)) >> 32); - fnext2 = fcurr2 + (fnext2 << 1u); - gnext2 = fcurr1 + (gnext2 << 1u); + fnext2 = fcurr2 + (fnext2 << 1U); + gnext2 = fcurr1 + (gnext2 << 1U); /* save g1(n) in state buffer */ *px++ = fcurr2; @@ -123,10 +123,10 @@ void arm_fir_lattice_q31( fcurr1 = fnext1; fcurr2 = fnext2; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* Read the reflection coefficient */ @@ -143,16 +143,16 @@ void arm_fir_lattice_q31( fnext1 = (q31_t) (((q63_t) gcurr1 * k) >> 32); fnext2 = (q31_t) (((q63_t) gnext1 * k) >> 32); - fnext1 = fcurr1 + (fnext1 << 1u); - fnext2 = fcurr2 + (fnext2 << 1u); + fnext1 = fcurr1 + (fnext1 << 1U); + fnext2 = fcurr2 + (fnext2 << 1U); /* g2(n) = f1(n) * K2 + g1(n-1) */ gnext2 = (q31_t) (((q63_t) fcurr2 * (k)) >> 32); - gnext2 = gnext1 + (gnext2 << 1u); + gnext2 = gnext1 + (gnext2 << 1U); /* g2(n) = f1(n) * K2 + g1(n-1) */ gnext1 = (q31_t) (((q63_t) fcurr1 * (k)) >> 32); - gnext1 = gcurr1 + (gnext1 << 1u); + gnext1 = gcurr1 + (gnext1 << 1U); /* f1(n) is saved in fcurr1 for next stage processing */ @@ -173,9 +173,9 @@ void arm_fir_lattice_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x2u; + blkCnt = blockSize % 0x2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurr1 = *pSrc++; @@ -195,11 +195,11 @@ void arm_fir_lattice_q31( /* for sample 1 processing */ /* f1(n) = f0(n) + K1 * g0(n-1) */ fnext1 = (q31_t) (((q63_t) gcurr1 * k) >> 32); - fnext1 = fcurr1 + (fnext1 << 1u); + fnext1 = fcurr1 + (fnext1 << 1U); /* g1(n) = f0(n) * K1 + g0(n-1) */ gnext1 = (q31_t) (((q63_t) fcurr1 * (k)) >> 32); - gnext1 = gcurr1 + (gnext1 << 1u); + gnext1 = gcurr1 + (gnext1 << 1U); /* save g1(n) in state buffer */ *px++ = fcurr1; @@ -208,10 +208,10 @@ void arm_fir_lattice_q31( for next stage processing */ fcurr1 = fnext1; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* Read the reflection coefficient */ k = *pk++; @@ -225,11 +225,11 @@ void arm_fir_lattice_q31( /* Sample processing for K2, K3.... */ /* f2(n) = f1(n) + K2 * g1(n-1) */ fnext1 = (q31_t) (((q63_t) gcurr1 * k) >> 32); - fnext1 = fcurr1 + (fnext1 << 1u); + fnext1 = fcurr1 + (fnext1 << 1U); /* g2(n) = f1(n) * K2 + g1(n-1) */ gnext1 = (q31_t) (((q63_t) fcurr1 * (k)) >> 32); - gnext1 = gcurr1 + (gnext1 << 1u); + gnext1 = gcurr1 + (gnext1 << 1U); /* f1(n) is saved in fcurr1 for next stage processing */ @@ -273,7 +273,7 @@ void arm_fir_lattice_q31( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* f0(n) = x(n) */ fcurr = *pSrc++; @@ -299,10 +299,10 @@ void arm_fir_lattice_q31( for next stage processing */ fcurr = fnext; - stageCnt = (numStages - 1u); + stageCnt = (numStages - 1U); /* stage loop */ - while (stageCnt > 0u) + while (stageCnt > 0U) { /* read g2(n) from state buffer */ gcurr = *px; diff --git a/Source/FilteringFunctions/arm_fir_q15.c b/Source/FilteringFunctions/arm_fir_q15.c index c065c37c..e970a109 100644 --- a/Source/FilteringFunctions/arm_fir_q15.c +++ b/Source/FilteringFunctions/arm_fir_q15.c @@ -89,7 +89,7 @@ void arm_fir_q15( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Apply loop unrolling and compute 4 output values simultaneously. * The variables acc0 ... acc3 hold output values that are being computed: @@ -104,7 +104,7 @@ void arm_fir_q15( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy four new input samples into the state buffer. ** Use 32-bit SIMD to move the 16-bit data. Only requires two copies. */ @@ -127,15 +127,15 @@ void arm_fir_q15( x0 = _SIMD32_OFFSET(px1); /* Read the third and forth samples from the state buffer: x[n-N-1], x[n-N-2] */ - x1 = _SIMD32_OFFSET(px1 + 1u); + x1 = _SIMD32_OFFSET(px1 + 1U); - px1 += 2u; + px1 += 2U; /* Loop over the number of taps. Unroll by a factor of 4. ** Repeat until we've computed numTaps-4 coefficients. */ tapCnt = numTaps >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read the first two coefficients using SIMD: b[N] and b[N-1] coefficients */ c0 = *__SIMD32(pb)++; @@ -150,7 +150,7 @@ void arm_fir_q15( x2 = _SIMD32_OFFSET(px1); /* Read state x[n-N-3], x[n-N-4] */ - x3 = _SIMD32_OFFSET(px1 + 1u); + x3 = _SIMD32_OFFSET(px1 + 1U); /* acc2 += b[N] * x[n-N-2] + b[N-1] * x[n-N-3] */ acc2 = __SMLALD(x2, c0, acc2); @@ -168,10 +168,10 @@ void arm_fir_q15( acc1 = __SMLALD(x3, c0, acc1); /* Read state x[n-N-4], x[n-N-5] */ - x0 = _SIMD32_OFFSET(px1 + 2u); + x0 = _SIMD32_OFFSET(px1 + 2U); /* Read state x[n-N-5], x[n-N-6] */ - x1 = _SIMD32_OFFSET(px1 + 3u); + x1 = _SIMD32_OFFSET(px1 + 3U); /* acc2 += b[N-2] * x[n-N-4] + b[N-3] * x[n-N-5] */ acc2 = __SMLALD(x0, c0, acc2); @@ -179,7 +179,7 @@ void arm_fir_q15( /* acc3 += b[N-2] * x[n-N-5] + b[N-3] * x[n-N-6] */ acc3 = __SMLALD(x1, c0, acc3); - px1 += 4u; + px1 += 4U; tapCnt--; @@ -188,7 +188,7 @@ void arm_fir_q15( /* If the filter length is not a multiple of 4, compute the remaining filter taps. ** This is always be 2 taps since the filter length is even. */ - if ((numTaps & 0x3u) != 0u) + if ((numTaps & 0x3U) != 0U) { /* Read 2 coefficients */ c0 = *__SIMD32(pb)++; @@ -196,12 +196,12 @@ void arm_fir_q15( /* Fetch 4 state variables */ x2 = _SIMD32_OFFSET(px1); - x3 = _SIMD32_OFFSET(px1 + 1u); + x3 = _SIMD32_OFFSET(px1 + 1U); /* Perform the multiply-accumulates */ acc0 = __SMLALD(x0, c0, acc0); - px1 += 2u; + px1 += 2U; acc1 = __SMLALD(x1, c0, acc1); acc2 = __SMLALD(x2, c0, acc2); @@ -238,8 +238,8 @@ void arm_fir_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; - while (blkCnt > 0u) + blkCnt = blockSize % 0x4U; + while (blkCnt > 0U) { /* Copy two samples into state buffer */ *pStateCurnt++ = *pSrc++; @@ -264,7 +264,7 @@ void arm_fir_q15( acc0 = __SMLALD(x0, c0, acc0); tapCnt--; } - while (tapCnt > 0u); + while (tapCnt > 0U); /* The result is in 2.30 format. Convert to 1.15 with saturation. ** Then store the output in the destination buffer. */ @@ -285,9 +285,9 @@ void arm_fir_q15( pStateCurnt = S->pState; /* Calculation of count for copying integer writes */ - tapCnt = (numTaps - 1u) >> 2; + tapCnt = (numTaps - 1U) >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Copy state values to start of state buffer */ @@ -299,10 +299,10 @@ void arm_fir_q15( } /* Calculation of count for remaining q15_t data */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* copy remaining data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -332,7 +332,7 @@ void arm_fir_q15( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Apply loop unrolling and compute 4 output values simultaneously. * The variables acc0 ... acc3 hold output values that are being computed: @@ -347,7 +347,7 @@ void arm_fir_q15( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy four new input samples into the state buffer. ** Use 32-bit SIMD to move the 16-bit data. Only requires two copies. */ @@ -420,7 +420,7 @@ void arm_fir_q15( acc0 = __SMLALD(x2, c0, acc0); /* Read state x[n-N-6], x[n-N-7] with offset */ - x2 = _SIMD32_OFFSET(px + 2u); + x2 = _SIMD32_OFFSET(px + 2U); /* acc2 += b[N-2] * x[n-N-4] + b[N-3] * x[n-N-5] */ acc2 = __SMLALD(x0, c0, acc2); @@ -439,7 +439,7 @@ void arm_fir_q15( acc3 = __SMLALDX(x1, c0, acc3); /* Update state pointer for next state reading */ - px += 4u; + px += 4U; /* Decrement tap count */ tapCnt--; @@ -448,7 +448,7 @@ void arm_fir_q15( /* If the filter length is not a multiple of 4, compute the remaining filter taps. ** This is always be 2 taps since the filter length is even. */ - if ((numTaps & 0x3u) != 0u) + if ((numTaps & 0x3U) != 0U) { /* Read last two coefficients */ @@ -512,8 +512,8 @@ void arm_fir_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; - while (blkCnt > 0u) + blkCnt = blockSize % 0x4U; + while (blkCnt > 0U) { /* Copy two samples into state buffer */ *pStateCurnt++ = *pSrc++; @@ -525,7 +525,7 @@ void arm_fir_q15( px = pState; pb = pCoeffs; - tapCnt = numTaps >> 1u; + tapCnt = numTaps >> 1U; do { @@ -533,14 +533,14 @@ void arm_fir_q15( acc0 += (q31_t) * px++ * *pb++; tapCnt--; } - while (tapCnt > 0u); + while (tapCnt > 0U); /* The result is in 2.30 format. Convert to 1.15 with saturation. ** Then store the output in the destination buffer. */ *pDst++ = (q15_t) (__SSAT((acc0 >> 15), 16)); /* Advance state pointer by 1 for the next sample */ - pState = pState + 1u; + pState = pState + 1U; /* Decrement the loop counter */ blkCnt--; @@ -554,9 +554,9 @@ void arm_fir_q15( pStateCurnt = S->pState; /* Calculation of count for copying integer writes */ - tapCnt = (numTaps - 1u) >> 2; + tapCnt = (numTaps - 1U) >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -568,10 +568,10 @@ void arm_fir_q15( } /* Calculation of count for remaining q15_t data */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* copy remaining data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -608,12 +608,12 @@ void arm_fir_q15( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Initialize blkCnt with blockSize */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -635,11 +635,11 @@ void arm_fir_q15( /* acc = b[numTaps-1] * x[n-numTaps-1] + b[numTaps-2] * x[n-numTaps-2] + b[numTaps-3] * x[n-numTaps-3] +...+ b[0] * x[0] */ acc += (q31_t) * px++ * *pb++; tapCnt--; - } while (tapCnt > 0u); + } while (tapCnt > 0U); /* The result is in 2.30 format. Convert to 1.15 ** Then store the output in the destination buffer. */ - *pDst++ = (q15_t) __SSAT((acc >> 15u), 16); + *pDst++ = (q15_t) __SSAT((acc >> 15U), 16); /* Advance state pointer by 1 for the next sample */ pState = pState + 1; @@ -656,10 +656,10 @@ void arm_fir_q15( pStateCurnt = S->pState; /* Copy numTaps number of values */ - tapCnt = (numTaps - 1u); + tapCnt = (numTaps - 1U); /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_q31.c b/Source/FilteringFunctions/arm_fir_q31.c index ec4c9178..4ca82953 100644 --- a/Source/FilteringFunctions/arm_fir_q31.c +++ b/Source/FilteringFunctions/arm_fir_q31.c @@ -82,7 +82,7 @@ void arm_fir_q31( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Apply loop unrolling and compute 4 output values simultaneously. * The variables acc0 ... acc3 hold output values that are being computed: @@ -100,7 +100,7 @@ void arm_fir_q31( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy three new input samples into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -126,7 +126,7 @@ void arm_fir_q31( /* Loop unrolling. Process 3 taps at a time. */ i = tapCnt; - while (i > 0u) + while (i > 0U) { /* Read the b[numTaps] coefficient */ c0 = *pb; @@ -140,7 +140,7 @@ void arm_fir_q31( acc2 += ((q63_t) x2 * c0); /* Read the coefficient and state */ - c0 = *(pb + 1u); + c0 = *(pb + 1U); x0 = *(px++); /* Perform the multiply-accumulates */ @@ -149,11 +149,11 @@ void arm_fir_q31( acc2 += ((q63_t) x0 * c0); /* Read the coefficient and state */ - c0 = *(pb + 2u); + c0 = *(pb + 2U); x1 = *(px++); /* update coefficient pointer */ - pb += 3u; + pb += 3U; /* Perform the multiply-accumulates */ acc0 += ((q63_t) x2 * c0); @@ -168,7 +168,7 @@ void arm_fir_q31( i = tapCntN3; - while (i > 0u) + while (i > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -194,9 +194,9 @@ void arm_fir_q31( /* The results in the 3 accumulators are in 2.30 format. Convert to 1.31 ** Then store the 3 outputs in the destination buffer. */ - *pDst++ = (q31_t) (acc0 >> 31u); - *pDst++ = (q31_t) (acc1 >> 31u); - *pDst++ = (q31_t) (acc2 >> 31u); + *pDst++ = (q31_t) (acc0 >> 31U); + *pDst++ = (q31_t) (acc1 >> 31U); + *pDst++ = (q31_t) (acc2 >> 31U); /* Decrement the samples loop counter */ blkCnt--; @@ -205,7 +205,7 @@ void arm_fir_q31( /* If the blockSize is not a multiple of 3, compute any remaining output samples here. ** No loop unrolling is used. */ - while (blockSize > 0u) + while (blockSize > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -226,11 +226,11 @@ void arm_fir_q31( { acc0 += (q63_t) * (px++) * (*(pb++)); i--; - } while (i > 0u); + } while (i > 0U); /* The result is in 2.62 format. Convert to 1.31 ** Then store the output in the destination buffer. */ - *pDst++ = (q31_t) (acc0 >> 31u); + *pDst++ = (q31_t) (acc0 >> 31U); /* Advance state pointer by 1 for the next sample */ pState = pState + 1; @@ -246,10 +246,10 @@ void arm_fir_q31( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = (numTaps - 1u) >> 2u; + tapCnt = (numTaps - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -261,10 +261,10 @@ void arm_fir_q31( } /* Calculate remaining number of copies */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -284,12 +284,12 @@ void arm_fir_q31( /* S->pState buffer contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Initialize blkCnt with blockSize */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -311,11 +311,11 @@ void arm_fir_q31( /* acc = b[numTaps-1] * x[n-numTaps-1] + b[numTaps-2] * x[n-numTaps-2] + b[numTaps-3] * x[n-numTaps-3] +...+ b[0] * x[0] */ acc += (q63_t) * px++ * *pb++; i--; - } while (i > 0u); + } while (i > 0U); /* The result is in 2.62 format. Convert to 1.31 ** Then store the output in the destination buffer. */ - *pDst++ = (q31_t) (acc >> 31u); + *pDst++ = (q31_t) (acc >> 31U); /* Advance state pointer by 1 for the next sample */ pState = pState + 1; @@ -332,10 +332,10 @@ void arm_fir_q31( pStateCurnt = S->pState; /* Copy numTaps number of values */ - tapCnt = numTaps - 1u; + tapCnt = numTaps - 1U; /* Copy the data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_fir_q7.c b/Source/FilteringFunctions/arm_fir_q7.c index 34fa2688..23e60ad9 100644 --- a/Source/FilteringFunctions/arm_fir_q7.c +++ b/Source/FilteringFunctions/arm_fir_q7.c @@ -78,7 +78,7 @@ void arm_fir_q7( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Apply loop unrolling and compute 4 output values simultaneously. * The variables acc0 ... acc3 hold output values that are being computed: @@ -92,7 +92,7 @@ void arm_fir_q7( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy four new input samples into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -122,7 +122,7 @@ void arm_fir_q7( tapCnt = numTaps >> 2; i = tapCnt; - while (i > 0u) + while (i > 0U) { /* Read the b[numTaps] coefficient */ c0 = *pb; @@ -143,10 +143,10 @@ void arm_fir_q7( acc3 += ((q15_t) x3 * c0); /* Read the b[numTaps-1] coefficient */ - c0 = *(pb + 1u); + c0 = *(pb + 1U); /* Read x[n-numTaps-4] sample */ - x0 = *(px + 1u); + x0 = *(px + 1U); /* Perform the multiply-accumulates */ acc0 += ((q15_t) x1 * c0); @@ -155,10 +155,10 @@ void arm_fir_q7( acc3 += ((q15_t) x0 * c0); /* Read the b[numTaps-2] coefficient */ - c0 = *(pb + 2u); + c0 = *(pb + 2U); /* Read x[n-numTaps-5] sample */ - x1 = *(px + 2u); + x1 = *(px + 2U); /* Perform the multiply-accumulates */ acc0 += ((q15_t) x2 * c0); @@ -167,10 +167,10 @@ void arm_fir_q7( acc3 += ((q15_t) x1 * c0); /* Read the b[numTaps-3] coefficients */ - c0 = *(pb + 3u); + c0 = *(pb + 3U); /* Read x[n-numTaps-6] sample */ - x2 = *(px + 3u); + x2 = *(px + 3U); /* Perform the multiply-accumulates */ acc0 += ((q15_t) x3 * c0); @@ -179,8 +179,8 @@ void arm_fir_q7( acc3 += ((q15_t) x2 * c0); /* update coefficient pointer */ - pb += 4u; - px += 4u; + pb += 4U; + px += 4U; /* Decrement the loop counter */ i--; @@ -188,8 +188,8 @@ void arm_fir_q7( /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - i = numTaps - (tapCnt * 4u); - while (i > 0u) + i = numTaps - (tapCnt * 4U); + while (i > 0U) { /* Read coefficients */ c0 = *(pb++); @@ -217,13 +217,13 @@ void arm_fir_q7( /* The results in the 4 accumulators are in 2.62 format. Convert to 1.31 ** Then store the 4 outputs in the destination buffer. */ - acc0 = __SSAT((acc0 >> 7u), 8); + acc0 = __SSAT((acc0 >> 7U), 8); *pDst++ = acc0; - acc1 = __SSAT((acc1 >> 7u), 8); + acc1 = __SSAT((acc1 >> 7U), 8); *pDst++ = acc1; - acc2 = __SSAT((acc2 >> 7u), 8); + acc2 = __SSAT((acc2 >> 7U), 8); *pDst++ = acc2; - acc3 = __SSAT((acc3 >> 7u), 8); + acc3 = __SSAT((acc3 >> 7U), 8); *pDst++ = acc3; /* Decrement the samples loop counter */ @@ -233,9 +233,9 @@ void arm_fir_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 4u; + blkCnt = blockSize % 4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -256,11 +256,11 @@ void arm_fir_q7( { acc0 += (q15_t) * (px++) * (*(pb++)); i--; - } while (i > 0u); + } while (i > 0U); /* The result is in 2.14 format. Convert to 1.7 ** Then store the output in the destination buffer. */ - *pDst++ = __SSAT((acc0 >> 7u), 8); + *pDst++ = __SSAT((acc0 >> 7U), 8); /* Advance state pointer by 1 for the next sample */ pState = pState + 1; @@ -276,10 +276,10 @@ void arm_fir_q7( /* Points to the start of the state buffer */ pStateCurnt = S->pState; - tapCnt = (numTaps - 1u) >> 2u; + tapCnt = (numTaps - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -291,10 +291,10 @@ void arm_fir_q7( } /* Calculate remaining number of copies */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -317,13 +317,13 @@ void arm_fir_q7( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = S->pState + (numTaps - 1u); + pStateCurnt = S->pState + (numTaps - 1U); /* Initialize blkCnt with blockSize */ blkCnt = blockSize; /* Perform filtering upto BlockSize - BlockSize%4 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy one sample at a time into state buffer */ *pStateCurnt++ = *pSrc++; @@ -340,7 +340,7 @@ void arm_fir_q7( i = numTaps; - while (i > 0u) + while (i > 0U) { /* acc = b[numTaps-1] * x[n-numTaps-1] + b[numTaps-2] * x[n-numTaps-2] + b[numTaps-3] * x[n-numTaps-3] +...+ b[0] * x[0] */ acc += (q15_t) * px++ * *pb++; @@ -367,10 +367,10 @@ void arm_fir_q7( /* Copy numTaps number of values */ - i = (numTaps - 1u); + i = (numTaps - 1U); /* Copy q7_t data */ - while (i > 0u) + while (i > 0U) { *pStateCurnt++ = *pState++; i--; diff --git a/Source/FilteringFunctions/arm_fir_sparse_f32.c b/Source/FilteringFunctions/arm_fir_sparse_f32.c index a8ca4527..bba2936a 100644 --- a/Source/FilteringFunctions/arm_fir_sparse_f32.c +++ b/Source/FilteringFunctions/arm_fir_sparse_f32.c @@ -168,9 +168,9 @@ void arm_fir_sparse_f32( /* Loop over the blockSize. Unroll by a factor of 4. * Compute 4 Multiplications at a time. */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiplications and store in destination buffer */ *pOut++ = *px++ * coeff; @@ -184,9 +184,9 @@ void arm_fir_sparse_f32( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiplications and store in destination buffer */ *pOut++ = *px++ * coeff; @@ -209,9 +209,9 @@ void arm_fir_sparse_f32( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 2u; + tapCnt = (uint32_t) numTaps - 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Working pointer for state buffer is updated */ @@ -230,9 +230,9 @@ void arm_fir_sparse_f32( /* Loop over the blockSize. Unroll by a factor of 4. * Compute 4 MACS at a time. */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pOut++ += *px++ * coeff; @@ -246,9 +246,9 @@ void arm_fir_sparse_f32( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pOut++ += *px++ * coeff; @@ -293,9 +293,9 @@ void arm_fir_sparse_f32( /* Loop over the blockSize. Unroll by a factor of 4. * Compute 4 MACS at a time. */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pOut++ += *px++ * coeff; @@ -309,9 +309,9 @@ void arm_fir_sparse_f32( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pOut++ += *px++ * coeff; @@ -326,7 +326,7 @@ void arm_fir_sparse_f32( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiplications and store in destination buffer */ *pOut++ = *px++ * coeff; @@ -349,9 +349,9 @@ void arm_fir_sparse_f32( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 2u; + tapCnt = (uint32_t) numTaps - 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Working pointer for state buffer is updated */ @@ -370,7 +370,7 @@ void arm_fir_sparse_f32( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pOut++ += *px++ * coeff; @@ -415,7 +415,7 @@ void arm_fir_sparse_f32( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pOut++ += *px++ * coeff; diff --git a/Source/FilteringFunctions/arm_fir_sparse_init_f32.c b/Source/FilteringFunctions/arm_fir_sparse_init_f32.c index 98ddfaf5..d6636790 100644 --- a/Source/FilteringFunctions/arm_fir_sparse_init_f32.c +++ b/Source/FilteringFunctions/arm_fir_sparse_init_f32.c @@ -80,7 +80,7 @@ void arm_fir_sparse_init_f32( S->maxDelay = maxDelay; /* reset the stateIndex to 0 */ - S->stateIndex = 0u; + S->stateIndex = 0U; /* Clear state buffer and size is always maxDelay + blockSize */ memset(pState, 0, (maxDelay + blockSize) * sizeof(float32_t)); diff --git a/Source/FilteringFunctions/arm_fir_sparse_init_q15.c b/Source/FilteringFunctions/arm_fir_sparse_init_q15.c index d9185614..08c2d0e9 100644 --- a/Source/FilteringFunctions/arm_fir_sparse_init_q15.c +++ b/Source/FilteringFunctions/arm_fir_sparse_init_q15.c @@ -80,7 +80,7 @@ void arm_fir_sparse_init_q15( S->maxDelay = maxDelay; /* reset the stateIndex to 0 */ - S->stateIndex = 0u; + S->stateIndex = 0U; /* Clear state buffer and size is always maxDelay + blockSize */ memset(pState, 0, (maxDelay + blockSize) * sizeof(q15_t)); diff --git a/Source/FilteringFunctions/arm_fir_sparse_init_q31.c b/Source/FilteringFunctions/arm_fir_sparse_init_q31.c index 391b9339..4a942320 100644 --- a/Source/FilteringFunctions/arm_fir_sparse_init_q31.c +++ b/Source/FilteringFunctions/arm_fir_sparse_init_q31.c @@ -79,7 +79,7 @@ void arm_fir_sparse_init_q31( S->maxDelay = maxDelay; /* reset the stateIndex to 0 */ - S->stateIndex = 0u; + S->stateIndex = 0U; /* Clear state buffer and size is always maxDelay + blockSize */ memset(pState, 0, (maxDelay + blockSize) * sizeof(q31_t)); diff --git a/Source/FilteringFunctions/arm_fir_sparse_init_q7.c b/Source/FilteringFunctions/arm_fir_sparse_init_q7.c index bb472624..58d67055 100644 --- a/Source/FilteringFunctions/arm_fir_sparse_init_q7.c +++ b/Source/FilteringFunctions/arm_fir_sparse_init_q7.c @@ -80,7 +80,7 @@ void arm_fir_sparse_init_q7( S->maxDelay = maxDelay; /* reset the stateIndex to 0 */ - S->stateIndex = 0u; + S->stateIndex = 0U; /* Clear state buffer and size is always maxDelay + blockSize */ memset(pState, 0, (maxDelay + blockSize) * sizeof(q7_t)); diff --git a/Source/FilteringFunctions/arm_fir_sparse_q15.c b/Source/FilteringFunctions/arm_fir_sparse_q15.c index 81dbab55..e17f2bd9 100644 --- a/Source/FilteringFunctions/arm_fir_sparse_q15.c +++ b/Source/FilteringFunctions/arm_fir_sparse_q15.c @@ -119,7 +119,7 @@ void arm_fir_sparse_q15( * Compute 4 multiplications at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform multiplication and store in the scratch buffer */ *pScratchOut++ = ((q31_t) * px++ * coeff); @@ -133,9 +133,9 @@ void arm_fir_sparse_q15( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform multiplication and store in the scratch buffer */ *pScratchOut++ = ((q31_t) * px++ * coeff); @@ -158,9 +158,9 @@ void arm_fir_sparse_q15( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 2u; + tapCnt = (uint32_t) numTaps - 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Working pointer for state buffer is updated */ py = pState; @@ -179,7 +179,7 @@ void arm_fir_sparse_q15( * Compute 4 MACS at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pScratchOut++ += (q31_t) * px++ * coeff; @@ -193,9 +193,9 @@ void arm_fir_sparse_q15( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pScratchOut++ += (q31_t) * px++ * coeff; @@ -240,7 +240,7 @@ void arm_fir_sparse_q15( * Compute 4 MACS at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pScratchOut++ += (q31_t) * px++ * coeff; @@ -254,9 +254,9 @@ void arm_fir_sparse_q15( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pScratchOut++ += (q31_t) * px++ * coeff; @@ -270,7 +270,7 @@ void arm_fir_sparse_q15( /* Loop over the blockSize. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { in1 = *pScr2++; in2 = *pScr2++; @@ -313,9 +313,9 @@ void arm_fir_sparse_q15( /* If the blockSize is not a multiple of 4, remaining samples are processed in the below loop */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { *pOut++ = (q15_t) __SSAT(*pScr2++ >> 15, 16); blkCnt--; @@ -356,7 +356,7 @@ void arm_fir_sparse_q15( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform multiplication and store in the scratch buffer */ *pScratchOut++ = ((q31_t) * px++ * coeff); @@ -379,9 +379,9 @@ void arm_fir_sparse_q15( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 2u; + tapCnt = (uint32_t) numTaps - 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Working pointer for state buffer is updated */ py = pState; @@ -398,7 +398,7 @@ void arm_fir_sparse_q15( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pScratchOut++ += (q31_t) * px++ * coeff; @@ -441,7 +441,7 @@ void arm_fir_sparse_q15( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ *pScratchOut++ += (q31_t) * px++ * coeff; @@ -455,7 +455,7 @@ void arm_fir_sparse_q15( /* Loop over the blockSize. */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { *pOut++ = (q15_t) __SSAT(*pScr2++ >> 15, 16); blkCnt--; diff --git a/Source/FilteringFunctions/arm_fir_sparse_q31.c b/Source/FilteringFunctions/arm_fir_sparse_q31.c index c6759f52..e441716c 100644 --- a/Source/FilteringFunctions/arm_fir_sparse_q31.c +++ b/Source/FilteringFunctions/arm_fir_sparse_q31.c @@ -113,7 +113,7 @@ void arm_fir_sparse_q31( * Compute 4 Multiplications at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiplications and store in the destination buffer */ *pOut++ = (q31_t) (((q63_t) * px++ * coeff) >> 32); @@ -127,9 +127,9 @@ void arm_fir_sparse_q31( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiplications and store in the destination buffer */ *pOut++ = (q31_t) (((q63_t) * px++ * coeff) >> 32); @@ -152,9 +152,9 @@ void arm_fir_sparse_q31( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 2u; + tapCnt = (uint32_t) numTaps - 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Working pointer for state buffer is updated */ py = pState; @@ -174,7 +174,7 @@ void arm_fir_sparse_q31( * Compute 4 MACS at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { out = *pOut; out += ((q63_t) * px++ * coeff) >> 32; @@ -198,9 +198,9 @@ void arm_fir_sparse_q31( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ out = *pOut; @@ -248,7 +248,7 @@ void arm_fir_sparse_q31( * Compute 4 MACS at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { out = *pOut; out += ((q63_t) * px++ * coeff) >> 32; @@ -272,9 +272,9 @@ void arm_fir_sparse_q31( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ out = *pOut; @@ -293,7 +293,7 @@ void arm_fir_sparse_q31( * process 4 output samples at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { in = *pOut << 1; *pOut++ = in; @@ -310,9 +310,9 @@ void arm_fir_sparse_q31( /* If the blockSize is not a multiple of 4, * process the remaining output samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { in = *pOut << 1; *pOut++ = in; @@ -326,7 +326,7 @@ void arm_fir_sparse_q31( /* Run the below code for Cortex-M0 */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiplications and store in the destination buffer */ *pOut++ = (q31_t) (((q63_t) * px++ * coeff) >> 32); @@ -349,9 +349,9 @@ void arm_fir_sparse_q31( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 2u; + tapCnt = (uint32_t) numTaps - 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Working pointer for state buffer is updated */ py = pState; @@ -369,7 +369,7 @@ void arm_fir_sparse_q31( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ out = *pOut; @@ -415,7 +415,7 @@ void arm_fir_sparse_q31( blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ out = *pOut; @@ -432,7 +432,7 @@ void arm_fir_sparse_q31( /* Output is converted into 1.31 format. */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { in = *pOut << 1; *pOut++ = in; diff --git a/Source/FilteringFunctions/arm_fir_sparse_q7.c b/Source/FilteringFunctions/arm_fir_sparse_q7.c index 61194777..c1b4ce34 100644 --- a/Source/FilteringFunctions/arm_fir_sparse_q7.c +++ b/Source/FilteringFunctions/arm_fir_sparse_q7.c @@ -124,7 +124,7 @@ void arm_fir_sparse_q7( * Compute 4 multiplications at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform multiplication and store in the scratch buffer */ *pScratchOut++ = ((q31_t) * px++ * coeff); @@ -138,9 +138,9 @@ void arm_fir_sparse_q7( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform multiplication and store in the scratch buffer */ *pScratchOut++ = ((q31_t) * px++ * coeff); @@ -163,9 +163,9 @@ void arm_fir_sparse_q7( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 2u; + tapCnt = (uint32_t) numTaps - 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Working pointer for state buffer is updated */ py = pState; @@ -184,7 +184,7 @@ void arm_fir_sparse_q7( * Compute 4 MACS at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ in = *pScratchOut + ((q31_t) * px++ * coeff); @@ -202,9 +202,9 @@ void arm_fir_sparse_q7( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ in = *pScratchOut + ((q31_t) * px++ * coeff); @@ -251,7 +251,7 @@ void arm_fir_sparse_q7( * Compute 4 MACS at a time. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ in = *pScratchOut + ((q31_t) * px++ * coeff); @@ -269,9 +269,9 @@ void arm_fir_sparse_q7( /* If the blockSize is not a multiple of 4, * compute the remaining samples */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ in = *pScratchOut + ((q31_t) * px++ * coeff); @@ -286,7 +286,7 @@ void arm_fir_sparse_q7( /* Loop over the blockSize. */ blkCnt = blockSize >> 2; - while (blkCnt > 0u) + while (blkCnt > 0U) { in1 = (q7_t) __SSAT(*pScr2++ >> 7, 8); in2 = (q7_t) __SSAT(*pScr2++ >> 7, 8); @@ -301,9 +301,9 @@ void arm_fir_sparse_q7( /* If the blockSize is not a multiple of 4, remaining samples are processed in the below loop */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { *pOut++ = (q7_t) __SSAT(*pScr2++ >> 7, 8); @@ -348,7 +348,7 @@ void arm_fir_sparse_q7( /* Loop over the blockSize */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform multiplication and store in the scratch buffer */ *pScratchOut++ = ((q31_t) * px++ * coeff); @@ -371,9 +371,9 @@ void arm_fir_sparse_q7( } /* Loop over the number of taps. */ - tapCnt = (uint32_t) numTaps - 2u; + tapCnt = (uint32_t) numTaps - 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Working pointer for state buffer is updated */ py = pState; @@ -391,7 +391,7 @@ void arm_fir_sparse_q7( /* Loop over the blockSize */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ in = *pScratchOut + ((q31_t) * px++ * coeff); @@ -437,7 +437,7 @@ void arm_fir_sparse_q7( /* Loop over the blockSize */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Perform Multiply-Accumulate */ in = *pScratchOut + ((q31_t) * px++ * coeff); @@ -452,7 +452,7 @@ void arm_fir_sparse_q7( /* Loop over the blockSize. */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { *pOut++ = (q7_t) __SSAT(*pScr2++ >> 7, 8); diff --git a/Source/FilteringFunctions/arm_iir_lattice_f32.c b/Source/FilteringFunctions/arm_iir_lattice_f32.c index 68b4a8b7..424be38e 100644 --- a/Source/FilteringFunctions/arm_iir_lattice_f32.c +++ b/Source/FilteringFunctions/arm_iir_lattice_f32.c @@ -144,7 +144,7 @@ void arm_iir_lattice_f32( pState = &S->pState[0]; /* Sample processing */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read Sample from input buffer */ /* fN(n) = x(n) */ @@ -166,7 +166,7 @@ void arm_iir_lattice_f32( /* Loop unrolling. Process 4 taps at a time. */ tapCnt = (numStages) >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Read gN-1(n-1) from state buffer */ gcurr1 = *px1; @@ -181,13 +181,13 @@ void arm_iir_lattice_f32( v1 = *pv; /* read next reflection coefficient kN-1 */ - k2 = *(pk + 1u); + k2 = *(pk + 1U); /* Read gN-2(n-1) from state buffer */ - gcurr2 = *(px1 + 1u); + gcurr2 = *(px1 + 1U); /* read next ladder coefficient vN-1 */ - v2 = *(pv + 1u); + v2 = *(pv + 1U); /* fN-2(n) = fN-1(n) - kN-1 * gN-2(n-1) */ fnext2 = fnext1 - (k2 * gcurr2); @@ -196,13 +196,13 @@ void arm_iir_lattice_f32( gnext = gcurr1 + (k1 * fnext1); /* read reflection coefficient kN-2 */ - k1 = *(pk + 2u); + k1 = *(pk + 2U); /* write gN(n) into state for next sample processing */ *px2++ = gnext; /* Read gN-3(n-1) from state buffer */ - gcurr1 = *(px1 + 2u); + gcurr1 = *(px1 + 2U); /* y(n) += gN(n) * vN */ acc += (gnext * v1); @@ -214,13 +214,13 @@ void arm_iir_lattice_f32( gnext = gcurr2 + (k2 * fnext2); /* Read gN-4(n-1) from state buffer */ - gcurr2 = *(px1 + 3u); + gcurr2 = *(px1 + 3U); /* y(n) += gN-1(n) * vN-1 */ acc += (gnext * v2); /* read reflection coefficient kN-3 */ - k2 = *(pk + 3u); + k2 = *(pk + 3U); /* write gN-1(n) into state for next sample processing */ *px2++ = gnext; @@ -232,7 +232,7 @@ void arm_iir_lattice_f32( gnext = gcurr1 + (k1 * fnext1); /* read ladder coefficient vN-2 */ - v3 = *(pv + 2u); + v3 = *(pv + 2U); /* y(n) += gN-2(n) * vN-2 */ acc += (gnext * v3); @@ -241,13 +241,13 @@ void arm_iir_lattice_f32( *px2++ = gnext; /* update pointer */ - pk += 4u; + pk += 4U; /* gN-3(n) = kN-3 * fN-4(n) + gN-4(n-1) */ gnext = (fnext2 * k2) + gcurr2; /* read next ladder coefficient vN-3 */ - v4 = *(pv + 3u); + v4 = *(pv + 3U); /* y(n) += gN-4(n) * vN-4 */ acc += (gnext * v4); @@ -256,17 +256,17 @@ void arm_iir_lattice_f32( *px2++ = gnext; /* update pointers */ - px1 += 4u; - pv += 4u; + px1 += 4U; + pv += 4U; tapCnt--; } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = (numStages) % 0x4u; + tapCnt = (numStages) % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { gcurr1 = *px1++; /* Process sample for last taps */ @@ -290,7 +290,7 @@ void arm_iir_lattice_f32( *pDst++ = acc; /* Advance the state pointer by 4 to process the next group of 4 samples */ - pState = pState + 1u; + pState = pState + 1U; blkCnt--; @@ -303,10 +303,10 @@ void arm_iir_lattice_f32( pStateCurnt = &S->pState[0]; pState = &S->pState[blockSize]; - tapCnt = numStages >> 2u; + tapCnt = numStages >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -319,10 +319,10 @@ void arm_iir_lattice_f32( } /* Calculate remaining number of copies */ - tapCnt = (numStages) % 0x4u; + tapCnt = (numStages) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -355,7 +355,7 @@ void arm_iir_lattice_f32( pState = &S->pState[0]; /* Sample processing */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read Sample from input buffer */ /* fN(n) = x(n) */ @@ -376,7 +376,7 @@ void arm_iir_lattice_f32( /* Process sample for numStages */ tapCnt = numStages; - while (tapCnt > 0u) + while (tapCnt > 0U) { gcurr = *px1++; /* Process sample for last taps */ @@ -402,7 +402,7 @@ void arm_iir_lattice_f32( *pDst++ = acc; /* Advance the state pointer by 1 to process the next group of samples */ - pState = pState + 1u; + pState = pState + 1U; blkCnt--; } @@ -417,7 +417,7 @@ void arm_iir_lattice_f32( tapCnt = numStages; /* Copy the data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_iir_lattice_q15.c b/Source/FilteringFunctions/arm_iir_lattice_q15.c index 57e5794f..8f680683 100644 --- a/Source/FilteringFunctions/arm_iir_lattice_q15.c +++ b/Source/FilteringFunctions/arm_iir_lattice_q15.c @@ -89,7 +89,7 @@ void arm_iir_lattice_q15( pState = &S->pState[0]; /* Sample processing */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read Sample from input buffer */ /* fN(n) = x(n) */ @@ -125,9 +125,9 @@ void arm_iir_lattice_q15( fcurr = fnext; /* Loop unrolling. Process 4 taps at a time. */ - tapCnt = (numStages - 1u) >> 2; + tapCnt = (numStages - 1U) >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Process sample for 2nd, 6th ...taps */ @@ -273,9 +273,9 @@ void arm_iir_lattice_q15( fnext = fcurr; /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = (numStages - 1u) % 0x4u; + tapCnt = (numStages - 1U) % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { gcurr = *px1++; /* Process sample for last taps */ @@ -301,7 +301,7 @@ void arm_iir_lattice_q15( *pDst++ = out; /* Advance the state pointer by 4 to process the next group of 4 samples */ - pState = pState + 1u; + pState = pState + 1U; blkCnt--; } @@ -312,10 +312,10 @@ void arm_iir_lattice_q15( pStateCurnt = &S->pState[0]; pState = &S->pState[blockSize]; - stgCnt = (numStages >> 2u); + stgCnt = (numStages >> 2U); /* copy data */ - while (stgCnt > 0u) + while (stgCnt > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE @@ -337,10 +337,10 @@ void arm_iir_lattice_q15( } /* Calculation of count for remaining q15_t data */ - stgCnt = (numStages) % 0x4u; + stgCnt = (numStages) % 0x4U; /* copy data */ - while (stgCnt > 0u) + while (stgCnt > 0U) { *pStateCurnt++ = *pState++; @@ -368,7 +368,7 @@ void arm_iir_lattice_q15( pState = &S->pState[0]; /* Sample processing */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read Sample from input buffer */ /* fN(n) = x(n) */ @@ -387,7 +387,7 @@ void arm_iir_lattice_q15( tapCnt = numStages; - while (tapCnt > 0u) + while (tapCnt > 0U) { gcurr = *px1++; /* Process sample */ @@ -418,7 +418,7 @@ void arm_iir_lattice_q15( *pDst++ = out; /* Advance the state pointer by 1 to process the next group of samples */ - pState = pState + 1u; + pState = pState + 1U; blkCnt--; } @@ -432,7 +432,7 @@ void arm_iir_lattice_q15( stgCnt = numStages; /* copy data */ - while (stgCnt > 0u) + while (stgCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_iir_lattice_q31.c b/Source/FilteringFunctions/arm_iir_lattice_q31.c index c2922af7..a14dd7a4 100644 --- a/Source/FilteringFunctions/arm_iir_lattice_q31.c +++ b/Source/FilteringFunctions/arm_iir_lattice_q31.c @@ -79,7 +79,7 @@ void arm_iir_lattice_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Sample processing */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read Sample from input buffer */ /* fN(n) = x(n) */ @@ -112,9 +112,9 @@ void arm_iir_lattice_q31( fcurr = fnext; /* Loop unrolling. Process 4 taps at a time. */ - tapCnt = (numStages - 1u) >> 2; + tapCnt = (numStages - 1U) >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Process sample for 2nd, 6th .. taps */ @@ -181,9 +181,9 @@ void arm_iir_lattice_q31( fnext = fcurr; /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = (numStages - 1u) % 0x4u; + tapCnt = (numStages - 1U) % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { gcurr = *px1++; /* Process sample for last taps */ @@ -205,10 +205,10 @@ void arm_iir_lattice_q31( *px2++ = fnext; /* write out into pDst */ - *pDst++ = (q31_t) (acc >> 31u); + *pDst++ = (q31_t) (acc >> 31U); /* Advance the state pointer by 4 to process the next group of 4 samples */ - pState = pState + 1u; + pState = pState + 1U; blkCnt--; } @@ -220,10 +220,10 @@ void arm_iir_lattice_q31( pStateCurnt = &S->pState[0]; pState = &S->pState[blockSize]; - tapCnt = numStages >> 2u; + tapCnt = numStages >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -236,10 +236,10 @@ void arm_iir_lattice_q31( } /* Calculate remaining number of copies */ - tapCnt = (numStages) % 0x4u; + tapCnt = (numStages) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -251,7 +251,7 @@ void arm_iir_lattice_q31( /* Run the below code for Cortex-M0 */ /* Sample processing */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read Sample from input buffer */ /* fN(n) = x(n) */ @@ -270,7 +270,7 @@ void arm_iir_lattice_q31( tapCnt = numStages; - while (tapCnt > 0u) + while (tapCnt > 0U) { gcurr = *px1++; /* Process sample */ @@ -300,10 +300,10 @@ void arm_iir_lattice_q31( *px2++ = fnext; /* write out into pDst */ - *pDst++ = (q31_t) (acc >> 31u); + *pDst++ = (q31_t) (acc >> 31U); /* Advance the state pointer by 1 to process the next group of samples */ - pState = pState + 1u; + pState = pState + 1U; blkCnt--; } @@ -318,7 +318,7 @@ void arm_iir_lattice_q31( tapCnt = numStages; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_lms_f32.c b/Source/FilteringFunctions/arm_lms_f32.c index 329d64f8..e5728b41 100644 --- a/Source/FilteringFunctions/arm_lms_f32.c +++ b/Source/FilteringFunctions/arm_lms_f32.c @@ -189,7 +189,7 @@ void arm_lms_f32( /* S->pState points to state array which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); blkCnt = blockSize; @@ -198,7 +198,7 @@ void arm_lms_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -215,7 +215,7 @@ void arm_lms_f32( /* Loop unrolling. Process 4 taps at a time. */ tapCnt = numTaps >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ sum += (*px++) * (*pb++); @@ -228,9 +228,9 @@ void arm_lms_f32( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ sum += (*px++) * (*pb++); @@ -260,7 +260,7 @@ void arm_lms_f32( tapCnt = numTaps >> 2; /* Update filter coefficients */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ *pb = *pb + (w * (*px++)); @@ -280,9 +280,9 @@ void arm_lms_f32( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ *pb = *pb + (w * (*px++)); @@ -307,11 +307,11 @@ void arm_lms_f32( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Loop unrolling for (numTaps - 1u) samples copy */ - tapCnt = (numTaps - 1u) >> 2u; + /* Loop unrolling for (numTaps - 1U) samples copy */ + tapCnt = (numTaps - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -323,10 +323,10 @@ void arm_lms_f32( } /* Calculate remaining number of copies */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -338,7 +338,7 @@ void arm_lms_f32( /* Run the below code for Cortex-M0 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -355,7 +355,7 @@ void arm_lms_f32( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ sum += (*px++) * (*pb++); @@ -384,7 +384,7 @@ void arm_lms_f32( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ *pb = *pb + (w * (*px++)); @@ -409,11 +409,11 @@ void arm_lms_f32( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Copy (numTaps - 1u) samples */ - tapCnt = (numTaps - 1u); + /* Copy (numTaps - 1U) samples */ + tapCnt = (numTaps - 1U); /* Copy the data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_lms_init_q15.c b/Source/FilteringFunctions/arm_lms_init_q15.c index cdc154de..3a13f261 100644 --- a/Source/FilteringFunctions/arm_lms_init_q15.c +++ b/Source/FilteringFunctions/arm_lms_init_q15.c @@ -75,7 +75,7 @@ void arm_lms_init_q15( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always blockSize + numTaps - 1 */ - memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(q15_t)); + memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(q15_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_lms_init_q31.c b/Source/FilteringFunctions/arm_lms_init_q31.c index 09728758..5859c843 100644 --- a/Source/FilteringFunctions/arm_lms_init_q31.c +++ b/Source/FilteringFunctions/arm_lms_init_q31.c @@ -75,7 +75,7 @@ void arm_lms_init_q31( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always blockSize + numTaps - 1 */ - memset(pState, 0, ((uint32_t) numTaps + (blockSize - 1u)) * sizeof(q31_t)); + memset(pState, 0, ((uint32_t) numTaps + (blockSize - 1U)) * sizeof(q31_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_lms_norm_f32.c b/Source/FilteringFunctions/arm_lms_norm_f32.c index 41ecee5c..3fdc5a18 100644 --- a/Source/FilteringFunctions/arm_lms_norm_f32.c +++ b/Source/FilteringFunctions/arm_lms_norm_f32.c @@ -187,7 +187,7 @@ void arm_lms_norm_f32( /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Loop over blockSize number of values */ blkCnt = blockSize; @@ -197,7 +197,7 @@ void arm_lms_norm_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc; @@ -221,7 +221,7 @@ void arm_lms_norm_f32( /* Loop unrolling. Process 4 taps at a time. */ tapCnt = numTaps >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ sum += (*px++) * (*pb++); @@ -234,9 +234,9 @@ void arm_lms_norm_f32( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ sum += (*px++) * (*pb++); @@ -267,7 +267,7 @@ void arm_lms_norm_f32( tapCnt = numTaps >> 2; /* Update filter coefficients */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ *pb += w * (*px++); @@ -288,9 +288,9 @@ void arm_lms_norm_f32( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ *pb += w * (*px++); @@ -319,11 +319,11 @@ void arm_lms_norm_f32( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Loop unrolling for (numTaps - 1u)/4 samples copy */ - tapCnt = (numTaps - 1u) >> 2u; + /* Loop unrolling for (numTaps - 1U)/4 samples copy */ + tapCnt = (numTaps - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -335,10 +335,10 @@ void arm_lms_norm_f32( } /* Calculate remaining number of copies */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -350,7 +350,7 @@ void arm_lms_norm_f32( /* Run the below code for Cortex-M0 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc; @@ -374,7 +374,7 @@ void arm_lms_norm_f32( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ sum += (*px++) * (*pb++); @@ -404,7 +404,7 @@ void arm_lms_norm_f32( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ *pb += w * (*px++); @@ -433,11 +433,11 @@ void arm_lms_norm_f32( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Copy (numTaps - 1u) samples */ - tapCnt = (numTaps - 1u); + /* Copy (numTaps - 1U) samples */ + tapCnt = (numTaps - 1U); /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_lms_norm_init_f32.c b/Source/FilteringFunctions/arm_lms_norm_init_f32.c index 7dd8f914..820c5c88 100644 --- a/Source/FilteringFunctions/arm_lms_norm_init_f32.c +++ b/Source/FilteringFunctions/arm_lms_norm_init_f32.c @@ -72,7 +72,7 @@ void arm_lms_norm_init_f32( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always blockSize + numTaps - 1 */ - memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(float32_t)); + memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(float32_t)); /* Assign state pointer */ S->pState = pState; diff --git a/Source/FilteringFunctions/arm_lms_norm_init_q15.c b/Source/FilteringFunctions/arm_lms_norm_init_q15.c index 5f2acb30..4bedbd96 100644 --- a/Source/FilteringFunctions/arm_lms_norm_init_q15.c +++ b/Source/FilteringFunctions/arm_lms_norm_init_q15.c @@ -73,7 +73,7 @@ void arm_lms_norm_init_q15( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always blockSize + numTaps - 1 */ - memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(q15_t)); + memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(q15_t)); /* Assign post Shift value applied to coefficients */ S->postShift = postShift; diff --git a/Source/FilteringFunctions/arm_lms_norm_init_q31.c b/Source/FilteringFunctions/arm_lms_norm_init_q31.c index a6dc990f..a2402d19 100644 --- a/Source/FilteringFunctions/arm_lms_norm_init_q31.c +++ b/Source/FilteringFunctions/arm_lms_norm_init_q31.c @@ -72,7 +72,7 @@ void arm_lms_norm_init_q31( S->pCoeffs = pCoeffs; /* Clear state buffer and size is always blockSize + numTaps - 1 */ - memset(pState, 0, (numTaps + (blockSize - 1u)) * sizeof(q31_t)); + memset(pState, 0, (numTaps + (blockSize - 1U)) * sizeof(q31_t)); /* Assign post Shift value applied to coefficients */ S->postShift = postShift; diff --git a/Source/FilteringFunctions/arm_lms_norm_q15.c b/Source/FilteringFunctions/arm_lms_norm_q15.c index a3c0d8df..70012ea0 100644 --- a/Source/FilteringFunctions/arm_lms_norm_q15.c +++ b/Source/FilteringFunctions/arm_lms_norm_q15.c @@ -84,7 +84,7 @@ void arm_lms_norm_q15( q15_t e = 0, d = 0; /* error, reference data sample */ q15_t w = 0, in; /* weight factor and state */ q15_t x0; /* temporary variable to hold input sample */ - //uint32_t shift = (uint32_t) S->postShift + 1u; /* Shift to be applied to the output */ + //uint32_t shift = (uint32_t) S->postShift + 1U; /* Shift to be applied to the output */ q15_t errorXmu, oneByEnergy; /* Temporary variables to store error and mu product and reciprocal of energy */ q15_t postShift; /* Post shift to be applied to weight after reciprocal calculation */ q31_t coef; /* Teporary variable for coefficient */ @@ -97,7 +97,7 @@ void arm_lms_norm_q15( /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Loop over blockSize number of values */ blkCnt = blockSize; @@ -107,7 +107,7 @@ void arm_lms_norm_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc; @@ -131,7 +131,7 @@ void arm_lms_norm_q15( /* Loop unrolling. Process 4 taps at a time. */ tapCnt = numTaps >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ @@ -154,9 +154,9 @@ void arm_lms_norm_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += (((q31_t) * px++ * (*pb++))); @@ -175,7 +175,7 @@ void arm_lms_norm_q15( acc = (uint32_t) acc_l >> lShift | acc_h << uShift; /* Converting the result to 1.15 format and saturate the output */ - acc = __SSAT(acc, 16u); + acc = __SSAT(acc, 16U); /* Store the result from accumulator into the destination buffer. */ *pOut++ = (q15_t) acc; @@ -208,7 +208,7 @@ void arm_lms_norm_q15( tapCnt = numTaps >> 2; /* Update filter coefficients */ - while (tapCnt > 0u) + while (tapCnt > 0U) { coef = *pb + (((q31_t) w * (*px++)) >> 15); *pb++ = (q15_t) __SSAT((coef), 16); @@ -224,9 +224,9 @@ void arm_lms_norm_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = *pb + (((q31_t) w * (*px++)) >> 15); @@ -240,7 +240,7 @@ void arm_lms_norm_q15( x0 = *pState; /* Advance state pointer by 1 for the next sample */ - pState = pState + 1u; + pState = pState + 1U; /* Decrement the loop counter */ blkCnt--; @@ -258,9 +258,9 @@ void arm_lms_norm_q15( pStateCurnt = S->pState; /* Calculation of count for copying integer writes */ - tapCnt = (numTaps - 1u) >> 2; + tapCnt = (numTaps - 1U) >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE @@ -282,10 +282,10 @@ void arm_lms_norm_q15( } /* Calculation of count for remaining q15_t data */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -297,7 +297,7 @@ void arm_lms_norm_q15( /* Run the below code for Cortex-M0 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc; @@ -321,7 +321,7 @@ void arm_lms_norm_q15( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += (((q31_t) * px++ * (*pb++))); @@ -340,10 +340,10 @@ void arm_lms_norm_q15( acc = (uint32_t) acc_l >> lShift | acc_h << uShift; /* Converting the result to 1.15 format and saturate the output */ - acc = __SSAT(acc, 16u); + acc = __SSAT(acc, 16U); /* Converting the result to 1.15 format */ - //acc = __SSAT((acc >> (16u - shift)), 16u); + //acc = __SSAT((acc >> (16U - shift)), 16U); /* Store the result from accumulator into the destination buffer. */ *pOut++ = (q15_t) acc; @@ -375,7 +375,7 @@ void arm_lms_norm_q15( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = *pb + (((q31_t) w * (*px++)) >> 15); @@ -389,7 +389,7 @@ void arm_lms_norm_q15( x0 = *pState; /* Advance state pointer by 1 for the next sample */ - pState = pState + 1u; + pState = pState + 1U; /* Decrement the loop counter */ blkCnt--; @@ -406,11 +406,11 @@ void arm_lms_norm_q15( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* copy (numTaps - 1u) data */ - tapCnt = (numTaps - 1u); + /* copy (numTaps - 1U) data */ + tapCnt = (numTaps - 1U); /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_lms_norm_q31.c b/Source/FilteringFunctions/arm_lms_norm_q31.c index 247d5ab4..9711738a 100644 --- a/Source/FilteringFunctions/arm_lms_norm_q31.c +++ b/Source/FilteringFunctions/arm_lms_norm_q31.c @@ -85,20 +85,20 @@ void arm_lms_norm_q31( q31_t e = 0, d = 0; /* error, reference data sample */ q31_t w = 0, in; /* weight factor and state */ q31_t x0; /* temporary variable to hold input sample */ -// uint32_t shift = 32u - ((uint32_t) S->postShift + 1u); /* Shift to be applied to the output */ +// uint32_t shift = 32U - ((uint32_t) S->postShift + 1U); /* Shift to be applied to the output */ q31_t errorXmu, oneByEnergy; /* Temporary variables to store error and mu product and reciprocal of energy */ q31_t postShift; /* Post shift to be applied to weight after reciprocal calculation */ q31_t coef; /* Temporary variable for coef */ q31_t acc_l, acc_h; /* temporary input */ - uint32_t uShift = ((uint32_t) S->postShift + 1u); - uint32_t lShift = 32u - uShift; /* Shift to be applied to the output */ + uint32_t uShift = ((uint32_t) S->postShift + 1U); + uint32_t lShift = 32U - uShift; /* Shift to be applied to the output */ energy = S->energy; x0 = S->x0; /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Loop over blockSize number of values */ blkCnt = blockSize; @@ -108,7 +108,7 @@ void arm_lms_norm_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ @@ -134,7 +134,7 @@ void arm_lms_norm_q31( /* Loop unrolling. Process 4 taps at a time. */ tapCnt = numTaps >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += ((q63_t) (*px++)) * (*pb++); @@ -147,9 +147,9 @@ void arm_lms_norm_q31( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += ((q63_t) (*px++)) * (*pb++); @@ -195,27 +195,27 @@ void arm_lms_norm_q31( tapCnt = numTaps >> 2; /* Update filter coefficients */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ /* coef is in 2.30 format */ coef = (q31_t) (((q63_t) w * (*px++)) >> (32)); /* get coef in 1.31 format by left shifting */ - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); /* update coefficient buffer to next coefficient */ pb++; coef = (q31_t) (((q63_t) w * (*px++)) >> (32)); - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); pb++; coef = (q31_t) (((q63_t) w * (*px++)) >> (32)); - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); pb++; coef = (q31_t) (((q63_t) w * (*px++)) >> (32)); - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); pb++; /* Decrement the loop counter */ @@ -223,13 +223,13 @@ void arm_lms_norm_q31( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = (q31_t) (((q63_t) w * (*px++)) >> (32)); - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); pb++; /* Decrement the loop counter */ @@ -257,11 +257,11 @@ void arm_lms_norm_q31( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Loop unrolling for (numTaps - 1u) samples copy */ - tapCnt = (numTaps - 1u) >> 2u; + /* Loop unrolling for (numTaps - 1U) samples copy */ + tapCnt = (numTaps - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -273,10 +273,10 @@ void arm_lms_norm_q31( } /* Calculate remaining number of copies */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -288,7 +288,7 @@ void arm_lms_norm_q31( /* Run the below code for Cortex-M0 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ @@ -314,7 +314,7 @@ void arm_lms_norm_q31( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += ((q63_t) (*px++)) * (*pb++); @@ -363,13 +363,13 @@ void arm_lms_norm_q31( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ /* coef is in 2.30 format */ coef = (q31_t) (((q63_t) w * (*px++)) >> (32)); /* get coef in 1.31 format by left shifting */ - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); /* update coefficient buffer to next coefficient */ pb++; @@ -398,11 +398,11 @@ void arm_lms_norm_q31( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Loop for (numTaps - 1u) samples copy */ - tapCnt = (numTaps - 1u); + /* Loop for (numTaps - 1U) samples copy */ + tapCnt = (numTaps - 1U); /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_lms_q15.c b/Source/FilteringFunctions/arm_lms_q15.c index 323e0cff..66902946 100644 --- a/Source/FilteringFunctions/arm_lms_q15.c +++ b/Source/FilteringFunctions/arm_lms_q15.c @@ -91,12 +91,12 @@ void arm_lms_q15( /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Initializing blkCnt with blockSize */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -111,9 +111,9 @@ void arm_lms_q15( acc = 0; /* Loop unrolling. Process 4 taps at a time. */ - tapCnt = numTaps >> 2u; + tapCnt = numTaps >> 2U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* acc += b[N] * x[n-N] + b[N-1] * x[n-N-1] */ /* Perform the multiply-accumulate */ @@ -137,9 +137,9 @@ void arm_lms_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += (q63_t) (((q31_t) (*px++) * (*pb++))); @@ -179,10 +179,10 @@ void arm_lms_q15( pb = pCoeffs; /* Loop unrolling. Process 4 taps at a time. */ - tapCnt = numTaps >> 2u; + tapCnt = numTaps >> 2U; /* Update filter coefficients */ - while (tapCnt > 0u) + while (tapCnt > 0U) { coef = (q31_t) * pb + (((q31_t) alpha * (*px++)) >> 15); *pb++ = (q15_t) __SSAT((coef), 16); @@ -198,9 +198,9 @@ void arm_lms_q15( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = (q31_t) * pb + (((q31_t) alpha * (*px++)) >> 15); @@ -223,9 +223,9 @@ void arm_lms_q15( pStateCurnt = S->pState; /* Calculation of count for copying integer writes */ - tapCnt = (numTaps - 1u) >> 2; + tapCnt = (numTaps - 1U) >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE @@ -244,10 +244,10 @@ void arm_lms_q15( } /* Calculation of count for remaining q15_t data */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -261,12 +261,12 @@ void arm_lms_q15( /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -283,7 +283,7 @@ void arm_lms_q15( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += (q63_t) ((q31_t) (*px++) * (*pb++)); @@ -325,7 +325,7 @@ void arm_lms_q15( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = (q31_t) * pb + (((q31_t) alpha * (*px++)) >> 15); @@ -347,11 +347,11 @@ void arm_lms_q15( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Copy (numTaps - 1u) samples */ - tapCnt = (numTaps - 1u); + /* Copy (numTaps - 1U) samples */ + tapCnt = (numTaps - 1U); /* Copy the data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/FilteringFunctions/arm_lms_q31.c b/Source/FilteringFunctions/arm_lms_q31.c index 682e3c8f..816e5895 100644 --- a/Source/FilteringFunctions/arm_lms_q31.c +++ b/Source/FilteringFunctions/arm_lms_q31.c @@ -83,12 +83,12 @@ void arm_lms_q31( q31_t alpha; /* Intermediate constant for taps update */ q31_t coef; /* Temporary variable for coef */ q31_t acc_l, acc_h; /* temporary input */ - uint32_t uShift = ((uint32_t) S->postShift + 1u); - uint32_t lShift = 32u - uShift; /* Shift to be applied to the output */ + uint32_t uShift = ((uint32_t) S->postShift + 1U); + uint32_t lShift = 32U - uShift; /* Shift to be applied to the output */ /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */ /* pStateCurnt points to the location where the new input data should be written */ - pStateCurnt = &(S->pState[(numTaps - 1u)]); + pStateCurnt = &(S->pState[(numTaps - 1U)]); /* Initializing blkCnt with blockSize */ blkCnt = blockSize; @@ -98,7 +98,7 @@ void arm_lms_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -115,7 +115,7 @@ void arm_lms_q31( /* Loop unrolling. Process 4 taps at a time. */ tapCnt = numTaps >> 2; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ /* acc += b[N] * x[n-N] */ @@ -135,9 +135,9 @@ void arm_lms_q31( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += ((q63_t) (*px++)) * (*pb++); @@ -177,25 +177,25 @@ void arm_lms_q31( tapCnt = numTaps >> 2; /* Update filter coefficients */ - while (tapCnt > 0u) + while (tapCnt > 0U) { /* coef is in 2.30 format */ coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32)); /* get coef in 1.31 format by left shifting */ - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); /* update coefficient buffer to next coefficient */ pb++; coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32)); - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); pb++; coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32)); - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); pb++; coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32)); - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); pb++; /* Decrement the loop counter */ @@ -203,13 +203,13 @@ void arm_lms_q31( } /* If the filter length is not a multiple of 4, compute the remaining filter taps */ - tapCnt = numTaps % 0x4u; + tapCnt = numTaps % 0x4U; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32)); - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); pb++; /* Decrement the loop counter */ @@ -227,11 +227,11 @@ void arm_lms_q31( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Loop unrolling for (numTaps - 1u) samples copy */ - tapCnt = (numTaps - 1u) >> 2u; + /* Loop unrolling for (numTaps - 1U) samples copy */ + tapCnt = (numTaps - 1U) >> 2U; /* copy data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; *pStateCurnt++ = *pState++; @@ -243,10 +243,10 @@ void arm_lms_q31( } /* Calculate remaining number of copies */ - tapCnt = (numTaps - 1u) % 0x4u; + tapCnt = (numTaps - 1U) % 0x4U; /* Copy the remaining q31_t data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; @@ -258,7 +258,7 @@ void arm_lms_q31( /* Run the below code for Cortex-M0 */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Copy the new input sample into the state buffer */ *pStateCurnt++ = *pSrc++; @@ -275,7 +275,7 @@ void arm_lms_q31( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ acc += ((q63_t) (*px++)) * (*pb++); @@ -314,11 +314,11 @@ void arm_lms_q31( /* Loop over numTaps number of values */ tapCnt = numTaps; - while (tapCnt > 0u) + while (tapCnt > 0U) { /* Perform the multiply-accumulate */ coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32)); - *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1u)); + *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U)); pb++; /* Decrement the loop counter */ @@ -336,11 +336,11 @@ void arm_lms_q31( /* Points to the start of the pState buffer */ pStateCurnt = S->pState; - /* Copy (numTaps - 1u) samples */ - tapCnt = (numTaps - 1u); + /* Copy (numTaps - 1U) samples */ + tapCnt = (numTaps - 1U); /* Copy the data */ - while (tapCnt > 0u) + while (tapCnt > 0U) { *pStateCurnt++ = *pState++; diff --git a/Source/MatrixFunctions/arm_mat_add_f32.c b/Source/MatrixFunctions/arm_mat_add_f32.c index b49eda2c..4a54049e 100644 --- a/Source/MatrixFunctions/arm_mat_add_f32.c +++ b/Source/MatrixFunctions/arm_mat_add_f32.c @@ -96,11 +96,11 @@ arm_status arm_mat_add_f32( #if defined (ARM_MATH_DSP) /* Loop unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) + B(m,n) */ /* Add and then store the results in the destination buffer. */ @@ -152,16 +152,16 @@ arm_status arm_mat_add_f32( /* update pointers to process next sampels */ - pIn1 += 4u; - pIn2 += 4u; - pOut += 4u; + pIn1 += 4U; + pIn2 += 4U; + pOut += 4U; /* Decrement the loop counter */ blkCnt--; } /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -172,7 +172,7 @@ arm_status arm_mat_add_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) + B(m,n) */ /* Add and then store the results in the destination buffer. */ diff --git a/Source/MatrixFunctions/arm_mat_add_q15.c b/Source/MatrixFunctions/arm_mat_add_q15.c index f00fc64c..896e60c4 100644 --- a/Source/MatrixFunctions/arm_mat_add_q15.c +++ b/Source/MatrixFunctions/arm_mat_add_q15.c @@ -86,11 +86,11 @@ arm_status arm_mat_add_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Loop unrolling */ - blkCnt = (uint32_t) numSamples >> 2u; + blkCnt = (uint32_t) numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) + B(m,n) */ /* Add, Saturate and then store the results in the destination buffer. */ @@ -103,11 +103,11 @@ arm_status arm_mat_add_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = (uint32_t) numSamples % 0x4u; + blkCnt = (uint32_t) numSamples % 0x4U; /* q15 pointers of input and output are initialized */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) + B(m,n) */ /* Add, Saturate and then store the results in the destination buffer. */ @@ -126,7 +126,7 @@ arm_status arm_mat_add_q15( /* q15 pointers of input and output are initialized */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) + B(m,n) */ /* Add, Saturate and then store the results in the destination buffer. */ diff --git a/Source/MatrixFunctions/arm_mat_add_q31.c b/Source/MatrixFunctions/arm_mat_add_q31.c index d7f3d348..f230ad24 100644 --- a/Source/MatrixFunctions/arm_mat_add_q31.c +++ b/Source/MatrixFunctions/arm_mat_add_q31.c @@ -92,12 +92,12 @@ arm_status arm_mat_add_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) + B(m,n) */ /* Add, saturate and then store the results in the destination buffer. */ @@ -144,9 +144,9 @@ arm_status arm_mat_add_q31( pOut[3] = out2; /* update pointers to process next sampels */ - pIn1 += 4u; - pIn2 += 4u; - pOut += 4u; + pIn1 += 4U; + pIn2 += 4U; + pOut += 4U; /* Decrement the loop counter */ blkCnt--; @@ -154,7 +154,7 @@ arm_status arm_mat_add_q31( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -166,7 +166,7 @@ arm_status arm_mat_add_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) + B(m,n) */ /* Add, saturate and then store the results in the destination buffer. */ diff --git a/Source/MatrixFunctions/arm_mat_cmplx_mult_f32.c b/Source/MatrixFunctions/arm_mat_cmplx_mult_f32.c index 4f4cd3e6..bb8341e4 100644 --- a/Source/MatrixFunctions/arm_mat_cmplx_mult_f32.c +++ b/Source/MatrixFunctions/arm_mat_cmplx_mult_f32.c @@ -80,7 +80,7 @@ arm_status arm_mat_cmplx_mult_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ - uint16_t col, i = 0u, j, row = numRowsA, colCnt; /* loop counters */ + uint16_t col, i = 0U, j, row = numRowsA, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ #ifdef ARM_MATH_MATRIX_CHECK @@ -112,7 +112,7 @@ arm_status arm_mat_cmplx_mult_f32( ** to the starting address of the pSrcB data */ pIn2 = pSrcB->pData; - j = 0u; + j = 0U; /* column loop */ do @@ -131,7 +131,7 @@ arm_status arm_mat_cmplx_mult_f32( colCnt = numColsA >> 2; /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { /* Reading real part of complex matrix A */ @@ -141,15 +141,15 @@ arm_status arm_mat_cmplx_mult_f32( c0 = *pIn2; /* Reading imaginary part of complex matrix A */ - b0 = *(pIn1 + 1u); + b0 = *(pIn1 + 1U); /* Reading imaginary part of complex matrix B */ - d0 = *(pIn2 + 1u); + d0 = *(pIn2 + 1U); sumReal1 += a0 * c0; sumImag1 += b0 * c0; - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; sumReal2 -= b0 * d0; @@ -160,13 +160,13 @@ arm_status arm_mat_cmplx_mult_f32( a1 = *pIn1; c1 = *pIn2; - b1 = *(pIn1 + 1u); - d1 = *(pIn2 + 1u); + b1 = *(pIn1 + 1U); + d1 = *(pIn2 + 1U); sumReal1 += a1 * c1; sumImag1 += b1 * c1; - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; sumReal2 -= b1 * d1; @@ -175,13 +175,13 @@ arm_status arm_mat_cmplx_mult_f32( a0 = *pIn1; c0 = *pIn2; - b0 = *(pIn1 + 1u); - d0 = *(pIn2 + 1u); + b0 = *(pIn1 + 1U); + d0 = *(pIn2 + 1U); sumReal1 += a0 * c0; sumImag1 += b0 * c0; - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; sumReal2 -= b0 * d0; @@ -192,13 +192,13 @@ arm_status arm_mat_cmplx_mult_f32( a1 = *pIn1; c1 = *pIn2; - b1 = *(pIn1 + 1u); - d1 = *(pIn2 + 1u); + b1 = *(pIn1 + 1U); + d1 = *(pIn2 + 1U); sumReal1 += a1 * c1; sumImag1 += b1 * c1; - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; sumReal2 -= b1 * d1; @@ -210,21 +210,21 @@ arm_status arm_mat_cmplx_mult_f32( /* If the columns of pSrcA is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - colCnt = numColsA % 0x4u; + colCnt = numColsA % 0x4U; - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ a1 = *pIn1; c1 = *pIn2; - b1 = *(pIn1 + 1u); - d1 = *(pIn2 + 1u); + b1 = *(pIn1 + 1U); + d1 = *(pIn2 + 1U); sumReal1 += a1 * c1; sumImag1 += b1 * c1; - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; sumReal2 -= b1 * d1; @@ -243,12 +243,12 @@ arm_status arm_mat_cmplx_mult_f32( /* Update the pointer pIn2 to point to the starting address of the next column */ j++; - pIn2 = pSrcB->pData + 2u * j; + pIn2 = pSrcB->pData + 2U * j; /* Decrement the column loop counter */ col--; - } while (col > 0u); + } while (col > 0U); /* Update the pointer pInA to point to the starting address of the next row */ i = i + numColsB; @@ -257,7 +257,7 @@ arm_status arm_mat_cmplx_mult_f32( /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); /* Set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; diff --git a/Source/MatrixFunctions/arm_mat_cmplx_mult_q15.c b/Source/MatrixFunctions/arm_mat_cmplx_mult_q15.c index a805e609..5dee79c9 100644 --- a/Source/MatrixFunctions/arm_mat_cmplx_mult_q15.c +++ b/Source/MatrixFunctions/arm_mat_cmplx_mult_q15.c @@ -89,7 +89,7 @@ arm_status arm_mat_cmplx_mult_q15( uint16_t numColsB = pSrcB->numCols; /* number of columns of input matrix B */ uint16_t numColsA = pSrcA->numCols; /* number of columns of input matrix A */ uint16_t numRowsB = pSrcB->numRows; /* number of rows of input matrix A */ - uint16_t col, i = 0u, row = numRowsB, colCnt; /* loop counters */ + uint16_t col, i = 0U, row = numRowsB, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ q63_t sumReal, sumImag; @@ -124,7 +124,7 @@ arm_status arm_mat_cmplx_mult_q15( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (col > 0u) + while (col > 0U) { #ifdef UNALIGNED_SUPPORT_DISABLE /* Read two elements from the row */ @@ -169,9 +169,9 @@ arm_status arm_mat_cmplx_mult_q15( /* If the columns of pSrcB is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - col = numColsB % 0x4u; + col = numColsB % 0x4U; - while (col > 0u) + while (col > 0U) { /* Read two elements from the row */ in = *pInB++; @@ -219,9 +219,9 @@ arm_status arm_mat_cmplx_mult_q15( /* If the columns of pSrcB is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - col = numColsB % 0x4u; + col = numColsB % 0x4U; - while (col > 0u) + while (col > 0U) { /* Read two elements from the row */ in = *__SIMD32(pInB)++; @@ -236,16 +236,16 @@ arm_status arm_mat_cmplx_mult_q15( col--; } - i = i + 2u; + i = i + 2U; /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); /* Reset the variables for the usage in the following multiplication process */ row = numRowsA; - i = 0u; + i = 0U; px = pDst->pData; /* The following loop performs the dot-product of each row in pSrcA with each column in pSrcB */ @@ -274,7 +274,7 @@ arm_status arm_mat_cmplx_mult_q15( /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ @@ -282,10 +282,10 @@ arm_status arm_mat_cmplx_mult_q15( /* read real and imag values from pSrcA buffer */ a = *pInA; - b = *(pInA + 1u); + b = *(pInA + 1U); /* read real and imag values from pSrcB buffer */ c = *pInB; - d = *(pInB + 1u); + d = *(pInB + 1U); /* Multiply and Accumlates */ sumReal += (q31_t) a *c; @@ -294,14 +294,14 @@ arm_status arm_mat_cmplx_mult_q15( sumImag += (q31_t) b *c; /* read next real and imag values from pSrcA buffer */ - a = *(pInA + 2u); - b = *(pInA + 3u); + a = *(pInA + 2U); + b = *(pInA + 3U); /* read next real and imag values from pSrcB buffer */ - c = *(pInB + 2u); - d = *(pInB + 3u); + c = *(pInB + 2U); + d = *(pInB + 3U); /* update pointer */ - pInA += 4u; + pInA += 4U; /* Multiply and Accumlates */ sumReal += (q31_t) a *c; @@ -309,7 +309,7 @@ arm_status arm_mat_cmplx_mult_q15( sumReal -= (q31_t) b *d; sumImag += (q31_t) b *c; /* update pointer */ - pInB += 4u; + pInB += 4U; #else /* read real and imag values from pSrcA and pSrcB buffer */ pSourceA = *__SIMD32(pInA)++; @@ -346,7 +346,7 @@ arm_status arm_mat_cmplx_mult_q15( } /* process odd column samples */ - if ((numColsA & 0x1u) > 0u) + if ((numColsA & 0x1U) > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ @@ -391,14 +391,14 @@ arm_status arm_mat_cmplx_mult_q15( /* Decrement the column loop counter */ col--; - } while (col > 0u); + } while (col > 0U); i = i + numColsA; /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); /* set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; diff --git a/Source/MatrixFunctions/arm_mat_cmplx_mult_q31.c b/Source/MatrixFunctions/arm_mat_cmplx_mult_q31.c index c1ecf4e5..65cbb663 100644 --- a/Source/MatrixFunctions/arm_mat_cmplx_mult_q31.c +++ b/Source/MatrixFunctions/arm_mat_cmplx_mult_q31.c @@ -81,7 +81,7 @@ arm_status arm_mat_cmplx_mult_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ - uint16_t col, i = 0u, j, row = numRowsA, colCnt; /* loop counters */ + uint16_t col, i = 0U, j, row = numRowsA, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ #ifdef ARM_MATH_MATRIX_CHECK @@ -113,7 +113,7 @@ arm_status arm_mat_cmplx_mult_q31( ** to the starting address of the pSrcB data */ pIn2 = pSrcB->pData; - j = 0u; + j = 0U; /* column loop */ do @@ -129,7 +129,7 @@ arm_status arm_mat_cmplx_mult_q31( colCnt = numColsA >> 2; /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { /* Reading real part of complex matrix A */ @@ -139,17 +139,17 @@ arm_status arm_mat_cmplx_mult_q31( c0 = *pIn2; /* Reading imaginary part of complex matrix A */ - b0 = *(pIn1 + 1u); + b0 = *(pIn1 + 1U); /* Reading imaginary part of complex matrix B */ - d0 = *(pIn2 + 1u); + d0 = *(pIn2 + 1U); /* Multiply and Accumlates */ sumReal1 += (q63_t) a0 *c0; sumImag1 += (q63_t) b0 *c0; /* update pointers */ - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; /* Multiply and Accumlates */ @@ -161,15 +161,15 @@ arm_status arm_mat_cmplx_mult_q31( /* read real and imag values from pSrcA and pSrcB buffer */ a1 = *pIn1; c1 = *pIn2; - b1 = *(pIn1 + 1u); - d1 = *(pIn2 + 1u); + b1 = *(pIn1 + 1U); + d1 = *(pIn2 + 1U); /* Multiply and Accumlates */ sumReal1 += (q63_t) a1 *c1; sumImag1 += (q63_t) b1 *c1; /* update pointers */ - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; /* Multiply and Accumlates */ @@ -179,15 +179,15 @@ arm_status arm_mat_cmplx_mult_q31( a0 = *pIn1; c0 = *pIn2; - b0 = *(pIn1 + 1u); - d0 = *(pIn2 + 1u); + b0 = *(pIn1 + 1U); + d0 = *(pIn2 + 1U); /* Multiply and Accumlates */ sumReal1 += (q63_t) a0 *c0; sumImag1 += (q63_t) b0 *c0; /* update pointers */ - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; /* Multiply and Accumlates */ @@ -199,15 +199,15 @@ arm_status arm_mat_cmplx_mult_q31( a1 = *pIn1; c1 = *pIn2; - b1 = *(pIn1 + 1u); - d1 = *(pIn2 + 1u); + b1 = *(pIn1 + 1U); + d1 = *(pIn2 + 1U); /* Multiply and Accumlates */ sumReal1 += (q63_t) a1 *c1; sumImag1 += (q63_t) b1 *c1; /* update pointers */ - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; /* Multiply and Accumlates */ @@ -220,23 +220,23 @@ arm_status arm_mat_cmplx_mult_q31( /* If the columns of pSrcA is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - colCnt = numColsA % 0x4u; + colCnt = numColsA % 0x4U; - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ a1 = *pIn1; c1 = *pIn2; - b1 = *(pIn1 + 1u); - d1 = *(pIn2 + 1u); + b1 = *(pIn1 + 1U); + d1 = *(pIn2 + 1U); /* Multiply and Accumlates */ sumReal1 += (q63_t) a1 *c1; sumImag1 += (q63_t) b1 *c1; /* update pointers */ - pIn1 += 2u; + pIn1 += 2U; pIn2 += 2 * numColsB; /* Multiply and Accumlates */ @@ -253,12 +253,12 @@ arm_status arm_mat_cmplx_mult_q31( /* Update the pointer pIn2 to point to the starting address of the next column */ j++; - pIn2 = pSrcB->pData + 2u * j; + pIn2 = pSrcB->pData + 2U * j; /* Decrement the column loop counter */ col--; - } while (col > 0u); + } while (col > 0U); /* Update the pointer pInA to point to the starting address of the next row */ i = i + numColsB; @@ -267,7 +267,7 @@ arm_status arm_mat_cmplx_mult_q31( /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); /* Set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; diff --git a/Source/MatrixFunctions/arm_mat_inverse_f32.c b/Source/MatrixFunctions/arm_mat_inverse_f32.c index 1d760c91..b82373a3 100644 --- a/Source/MatrixFunctions/arm_mat_inverse_f32.c +++ b/Source/MatrixFunctions/arm_mat_inverse_f32.c @@ -88,7 +88,7 @@ arm_status arm_mat_inverse_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ float32_t Xchg, in = 0.0f, in1; /* Temporary input values */ - uint32_t i, rowCnt, flag = 0u, j, loopCnt, k, l; /* loop counters */ + uint32_t i, rowCnt, flag = 0U, j, loopCnt, k, l; /* loop counters */ arm_status status; /* status of matrix inverse */ #ifdef ARM_MATH_MATRIX_CHECK @@ -149,11 +149,11 @@ arm_status arm_mat_inverse_f32( rowCnt = numRows; /* Making the destination matrix as identity matrix */ - while (rowCnt > 0u) + while (rowCnt > 0U) { /* Writing all zeroes in lower triangle of the destination matrix */ j = numRows - rowCnt; - while (j > 0u) + while (j > 0U) { *pOutT1++ = 0.0f; j--; @@ -163,8 +163,8 @@ arm_status arm_mat_inverse_f32( *pOutT1++ = 1.0f; /* Writing all zeroes in upper triangle of the destination matrix */ - j = rowCnt - 1u; - while (j > 0u) + j = rowCnt - 1U; + while (j > 0U) { *pOutT1++ = 0.0f; j--; @@ -179,9 +179,9 @@ arm_status arm_mat_inverse_f32( loopCnt = numCols; /* Index modifier to navigate through the columns */ - l = 0u; + l = 0U; - while (loopCnt > 0u) + while (loopCnt > 0U) { /* Check if the pivot element is zero.. * If it is zero then interchange the row with non zero row below. @@ -217,15 +217,15 @@ arm_status arm_mat_inverse_f32( pInT1 = pIn; /* Destination pointer modifier */ - k = 1u; + k = 1U; /* Check if the pivot element is the most significant of the column */ if ( (in > 0.0f ? in : -in) != maxC) { /* Loop over the number rows present below */ - i = numRows - (l + 1u); + i = numRows - (l + 1U); - while (i > 0u) + while (i > 0U) { /* Update the input and destination pointers */ pInT2 = pInT1 + (numCols * l); @@ -239,7 +239,7 @@ arm_status arm_mat_inverse_f32( * to the right of the pilot element */ j = numCols - l; - while (j > 0u) + while (j > 0U) { /* Exchange the row elements of the input matrix */ Xchg = *pInT2; @@ -253,7 +253,7 @@ arm_status arm_mat_inverse_f32( /* Loop over number of columns of the destination matrix */ j = numCols; - while (j > 0u) + while (j > 0U) { /* Exchange the row elements of the destination matrix */ Xchg = *pOutT2; @@ -265,7 +265,7 @@ arm_status arm_mat_inverse_f32( } /* Flag to indicate whether exchange is done or not */ - flag = 1u; + flag = 1U; /* Break after exchange is done */ break; @@ -280,7 +280,7 @@ arm_status arm_mat_inverse_f32( } /* Update the status if the matrix is singular */ - if ((flag != 1u) && (in == 0.0f)) + if ((flag != 1U) && (in == 0.0f)) { return ARM_MATH_SINGULAR; } @@ -300,7 +300,7 @@ arm_status arm_mat_inverse_f32( * to the right of the pilot element */ j = (numCols - l); - while (j > 0u) + while (j > 0U) { /* Divide each element of the row of the input matrix * by the pivot element */ @@ -314,7 +314,7 @@ arm_status arm_mat_inverse_f32( /* Loop over number of columns of the destination matrix */ j = numCols; - while (j > 0u) + while (j > 0U) { /* Divide each element of the row of the destination matrix * by the pivot element */ @@ -333,13 +333,13 @@ arm_status arm_mat_inverse_f32( pInT2 = pOut; /* index used to check for pivot element */ - i = 0u; + i = 0U; /* Loop over number of rows */ /* to be replaced by the sum of that row and a multiple of row i */ k = numRows; - while (k > 0u) + while (k > 0U) { /* Check for the pivot element */ if (i == l) @@ -363,7 +363,7 @@ arm_status arm_mat_inverse_f32( to replace the elements in the input matrix */ j = (numCols - l); - while (j > 0u) + while (j > 0U) { /* Replace the element by the sum of that row and a multiple of the reference row */ @@ -378,7 +378,7 @@ arm_status arm_mat_inverse_f32( replace the elements in the destination matrix */ j = numCols; - while (j > 0u) + while (j > 0U) { /* Replace the element by the sum of that row and a multiple of the reference row */ @@ -417,7 +417,7 @@ arm_status arm_mat_inverse_f32( /* Run the below code for Cortex-M0 */ float32_t Xchg, in = 0.0f; /* Temporary input values */ - uint32_t i, rowCnt, flag = 0u, j, loopCnt, k, l; /* loop counters */ + uint32_t i, rowCnt, flag = 0U, j, loopCnt, k, l; /* loop counters */ arm_status status; /* status of matrix inverse */ #ifdef ARM_MATH_MATRIX_CHECK @@ -475,11 +475,11 @@ arm_status arm_mat_inverse_f32( rowCnt = numRows; /* Making the destination matrix as identity matrix */ - while (rowCnt > 0u) + while (rowCnt > 0U) { /* Writing all zeroes in lower triangle of the destination matrix */ j = numRows - rowCnt; - while (j > 0u) + while (j > 0U) { *pOutT1++ = 0.0f; j--; @@ -489,8 +489,8 @@ arm_status arm_mat_inverse_f32( *pOutT1++ = 1.0f; /* Writing all zeroes in upper triangle of the destination matrix */ - j = rowCnt - 1u; - while (j > 0u) + j = rowCnt - 1U; + while (j > 0U) { *pOutT1++ = 0.0f; j--; @@ -505,9 +505,9 @@ arm_status arm_mat_inverse_f32( loopCnt = numCols; /* Index modifier to navigate through the columns */ - l = 0u; - //for(loopCnt = 0u; loopCnt < numCols; loopCnt++) - while (loopCnt > 0u) + l = 0U; + //for(loopCnt = 0U; loopCnt < numCols; loopCnt++) + while (loopCnt > 0U) { /* Check if the pivot element is zero.. * If it is zero then interchange the row with non zero row below. @@ -526,13 +526,13 @@ arm_status arm_mat_inverse_f32( in = *pInT1; /* Destination pointer modifier */ - k = 1u; + k = 1U; /* Check if the pivot element is zero */ if (*pInT1 == 0.0f) { /* Loop over the number rows present below */ - for (i = (l + 1u); i < numRows; i++) + for (i = (l + 1U); i < numRows; i++) { /* Update the input and destination pointers */ pInT2 = pInT1 + (numCols * l); @@ -544,7 +544,7 @@ arm_status arm_mat_inverse_f32( { /* Loop over number of columns * to the right of the pilot element */ - for (j = 0u; j < (numCols - l); j++) + for (j = 0U; j < (numCols - l); j++) { /* Exchange the row elements of the input matrix */ Xchg = *pInT2; @@ -552,7 +552,7 @@ arm_status arm_mat_inverse_f32( *pInT1++ = Xchg; } - for (j = 0u; j < numCols; j++) + for (j = 0U; j < numCols; j++) { Xchg = *pOutT2; *pOutT2++ = *pOutT1; @@ -560,7 +560,7 @@ arm_status arm_mat_inverse_f32( } /* Flag to indicate whether exchange is done or not */ - flag = 1u; + flag = 1U; /* Break after exchange is done */ break; @@ -572,7 +572,7 @@ arm_status arm_mat_inverse_f32( } /* Update the status if the matrix is singular */ - if ((flag != 1u) && (in == 0.0f)) + if ((flag != 1U) && (in == 0.0f)) { return ARM_MATH_SINGULAR; } @@ -590,14 +590,14 @@ arm_status arm_mat_inverse_f32( /* Loop over number of columns * to the right of the pilot element */ - for (j = 0u; j < (numCols - l); j++) + for (j = 0U; j < (numCols - l); j++) { /* Divide each element of the row of the input matrix * by the pivot element */ *pInT1 = *pInT1 / in; pInT1++; } - for (j = 0u; j < numCols; j++) + for (j = 0U; j < numCols; j++) { /* Divide each element of the row of the destination matrix * by the pivot element */ @@ -612,7 +612,7 @@ arm_status arm_mat_inverse_f32( pInT1 = pIn; pOutT1 = pOut; - for (i = 0u; i < numRows; i++) + for (i = 0U; i < numRows; i++) { /* Check for the pivot element */ if (i == l) @@ -633,7 +633,7 @@ arm_status arm_mat_inverse_f32( /* Loop over the number of columns to the right of the pivot element, to replace the elements in the input matrix */ - for (j = 0u; j < (numCols - l); j++) + for (j = 0U; j < (numCols - l); j++) { /* Replace the element by the sum of that row and a multiple of the reference row */ @@ -642,7 +642,7 @@ arm_status arm_mat_inverse_f32( } /* Loop over the number of columns to replace the elements in the destination matrix */ - for (j = 0u; j < numCols; j++) + for (j = 0U; j < numCols; j++) { /* Replace the element by the sum of that row and a multiple of the reference row */ @@ -669,7 +669,7 @@ arm_status arm_mat_inverse_f32( /* Set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; - if ((flag != 1u) && (in == 0.0f)) + if ((flag != 1U) && (in == 0.0f)) { pIn = pSrc->pData; for (i = 0; i < numRows * numCols; i++) diff --git a/Source/MatrixFunctions/arm_mat_inverse_f64.c b/Source/MatrixFunctions/arm_mat_inverse_f64.c index f1b6788a..54e59820 100644 --- a/Source/MatrixFunctions/arm_mat_inverse_f64.c +++ b/Source/MatrixFunctions/arm_mat_inverse_f64.c @@ -88,7 +88,7 @@ arm_status arm_mat_inverse_f64( /* Run the below code for Cortex-M4 and Cortex-M3 */ float64_t Xchg, in = 0.0f, in1; /* Temporary input values */ - uint32_t i, rowCnt, flag = 0u, j, loopCnt, k, l; /* loop counters */ + uint32_t i, rowCnt, flag = 0U, j, loopCnt, k, l; /* loop counters */ arm_status status; /* status of matrix inverse */ #ifdef ARM_MATH_MATRIX_CHECK @@ -149,11 +149,11 @@ arm_status arm_mat_inverse_f64( rowCnt = numRows; /* Making the destination matrix as identity matrix */ - while (rowCnt > 0u) + while (rowCnt > 0U) { /* Writing all zeroes in lower triangle of the destination matrix */ j = numRows - rowCnt; - while (j > 0u) + while (j > 0U) { *pOutT1++ = 0.0f; j--; @@ -163,8 +163,8 @@ arm_status arm_mat_inverse_f64( *pOutT1++ = 1.0f; /* Writing all zeroes in upper triangle of the destination matrix */ - j = rowCnt - 1u; - while (j > 0u) + j = rowCnt - 1U; + while (j > 0U) { *pOutT1++ = 0.0f; j--; @@ -179,9 +179,9 @@ arm_status arm_mat_inverse_f64( loopCnt = numCols; /* Index modifier to navigate through the columns */ - l = 0u; + l = 0U; - while (loopCnt > 0u) + while (loopCnt > 0U) { /* Check if the pivot element is zero.. * If it is zero then interchange the row with non zero row below. @@ -217,15 +217,15 @@ arm_status arm_mat_inverse_f64( pInT1 = pIn; /* Destination pointer modifier */ - k = 1u; + k = 1U; /* Check if the pivot element is the most significant of the column */ if ( (in > 0.0f ? in : -in) != maxC) { /* Loop over the number rows present below */ - i = numRows - (l + 1u); + i = numRows - (l + 1U); - while (i > 0u) + while (i > 0U) { /* Update the input and destination pointers */ pInT2 = pInT1 + (numCols * l); @@ -239,7 +239,7 @@ arm_status arm_mat_inverse_f64( * to the right of the pilot element */ j = numCols - l; - while (j > 0u) + while (j > 0U) { /* Exchange the row elements of the input matrix */ Xchg = *pInT2; @@ -253,7 +253,7 @@ arm_status arm_mat_inverse_f64( /* Loop over number of columns of the destination matrix */ j = numCols; - while (j > 0u) + while (j > 0U) { /* Exchange the row elements of the destination matrix */ Xchg = *pOutT2; @@ -265,7 +265,7 @@ arm_status arm_mat_inverse_f64( } /* Flag to indicate whether exchange is done or not */ - flag = 1u; + flag = 1U; /* Break after exchange is done */ break; @@ -280,7 +280,7 @@ arm_status arm_mat_inverse_f64( } /* Update the status if the matrix is singular */ - if ((flag != 1u) && (in == 0.0f)) + if ((flag != 1U) && (in == 0.0f)) { return ARM_MATH_SINGULAR; } @@ -300,7 +300,7 @@ arm_status arm_mat_inverse_f64( * to the right of the pilot element */ j = (numCols - l); - while (j > 0u) + while (j > 0U) { /* Divide each element of the row of the input matrix * by the pivot element */ @@ -314,7 +314,7 @@ arm_status arm_mat_inverse_f64( /* Loop over number of columns of the destination matrix */ j = numCols; - while (j > 0u) + while (j > 0U) { /* Divide each element of the row of the destination matrix * by the pivot element */ @@ -333,13 +333,13 @@ arm_status arm_mat_inverse_f64( pInT2 = pOut; /* index used to check for pivot element */ - i = 0u; + i = 0U; /* Loop over number of rows */ /* to be replaced by the sum of that row and a multiple of row i */ k = numRows; - while (k > 0u) + while (k > 0U) { /* Check for the pivot element */ if (i == l) @@ -363,7 +363,7 @@ arm_status arm_mat_inverse_f64( to replace the elements in the input matrix */ j = (numCols - l); - while (j > 0u) + while (j > 0U) { /* Replace the element by the sum of that row and a multiple of the reference row */ @@ -378,7 +378,7 @@ arm_status arm_mat_inverse_f64( replace the elements in the destination matrix */ j = numCols; - while (j > 0u) + while (j > 0U) { /* Replace the element by the sum of that row and a multiple of the reference row */ @@ -417,7 +417,7 @@ arm_status arm_mat_inverse_f64( /* Run the below code for Cortex-M0 */ float64_t Xchg, in = 0.0f; /* Temporary input values */ - uint32_t i, rowCnt, flag = 0u, j, loopCnt, k, l; /* loop counters */ + uint32_t i, rowCnt, flag = 0U, j, loopCnt, k, l; /* loop counters */ arm_status status; /* status of matrix inverse */ #ifdef ARM_MATH_MATRIX_CHECK @@ -475,11 +475,11 @@ arm_status arm_mat_inverse_f64( rowCnt = numRows; /* Making the destination matrix as identity matrix */ - while (rowCnt > 0u) + while (rowCnt > 0U) { /* Writing all zeroes in lower triangle of the destination matrix */ j = numRows - rowCnt; - while (j > 0u) + while (j > 0U) { *pOutT1++ = 0.0f; j--; @@ -489,8 +489,8 @@ arm_status arm_mat_inverse_f64( *pOutT1++ = 1.0f; /* Writing all zeroes in upper triangle of the destination matrix */ - j = rowCnt - 1u; - while (j > 0u) + j = rowCnt - 1U; + while (j > 0U) { *pOutT1++ = 0.0f; j--; @@ -505,9 +505,9 @@ arm_status arm_mat_inverse_f64( loopCnt = numCols; /* Index modifier to navigate through the columns */ - l = 0u; - //for(loopCnt = 0u; loopCnt < numCols; loopCnt++) - while (loopCnt > 0u) + l = 0U; + //for(loopCnt = 0U; loopCnt < numCols; loopCnt++) + while (loopCnt > 0U) { /* Check if the pivot element is zero.. * If it is zero then interchange the row with non zero row below. @@ -526,13 +526,13 @@ arm_status arm_mat_inverse_f64( in = *pInT1; /* Destination pointer modifier */ - k = 1u; + k = 1U; /* Check if the pivot element is zero */ if (*pInT1 == 0.0f) { /* Loop over the number rows present below */ - for (i = (l + 1u); i < numRows; i++) + for (i = (l + 1U); i < numRows; i++) { /* Update the input and destination pointers */ pInT2 = pInT1 + (numCols * l); @@ -544,7 +544,7 @@ arm_status arm_mat_inverse_f64( { /* Loop over number of columns * to the right of the pilot element */ - for (j = 0u; j < (numCols - l); j++) + for (j = 0U; j < (numCols - l); j++) { /* Exchange the row elements of the input matrix */ Xchg = *pInT2; @@ -552,7 +552,7 @@ arm_status arm_mat_inverse_f64( *pInT1++ = Xchg; } - for (j = 0u; j < numCols; j++) + for (j = 0U; j < numCols; j++) { Xchg = *pOutT2; *pOutT2++ = *pOutT1; @@ -560,7 +560,7 @@ arm_status arm_mat_inverse_f64( } /* Flag to indicate whether exchange is done or not */ - flag = 1u; + flag = 1U; /* Break after exchange is done */ break; @@ -572,7 +572,7 @@ arm_status arm_mat_inverse_f64( } /* Update the status if the matrix is singular */ - if ((flag != 1u) && (in == 0.0f)) + if ((flag != 1U) && (in == 0.0f)) { return ARM_MATH_SINGULAR; } @@ -590,14 +590,14 @@ arm_status arm_mat_inverse_f64( /* Loop over number of columns * to the right of the pilot element */ - for (j = 0u; j < (numCols - l); j++) + for (j = 0U; j < (numCols - l); j++) { /* Divide each element of the row of the input matrix * by the pivot element */ *pInT1 = *pInT1 / in; pInT1++; } - for (j = 0u; j < numCols; j++) + for (j = 0U; j < numCols; j++) { /* Divide each element of the row of the destination matrix * by the pivot element */ @@ -612,7 +612,7 @@ arm_status arm_mat_inverse_f64( pInT1 = pIn; pOutT1 = pOut; - for (i = 0u; i < numRows; i++) + for (i = 0U; i < numRows; i++) { /* Check for the pivot element */ if (i == l) @@ -633,7 +633,7 @@ arm_status arm_mat_inverse_f64( /* Loop over the number of columns to the right of the pivot element, to replace the elements in the input matrix */ - for (j = 0u; j < (numCols - l); j++) + for (j = 0U; j < (numCols - l); j++) { /* Replace the element by the sum of that row and a multiple of the reference row */ @@ -642,7 +642,7 @@ arm_status arm_mat_inverse_f64( } /* Loop over the number of columns to replace the elements in the destination matrix */ - for (j = 0u; j < numCols; j++) + for (j = 0U; j < numCols; j++) { /* Replace the element by the sum of that row and a multiple of the reference row */ @@ -669,7 +669,7 @@ arm_status arm_mat_inverse_f64( /* Set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; - if ((flag != 1u) && (in == 0.0f)) + if ((flag != 1U) && (in == 0.0f)) { pIn = pSrc->pData; for (i = 0; i < numRows * numCols; i++) diff --git a/Source/MatrixFunctions/arm_mat_mult_f32.c b/Source/MatrixFunctions/arm_mat_mult_f32.c index abe2180f..a038f2ff 100644 --- a/Source/MatrixFunctions/arm_mat_mult_f32.c +++ b/Source/MatrixFunctions/arm_mat_mult_f32.c @@ -83,7 +83,7 @@ arm_status arm_mat_mult_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ float32_t in1, in2, in3, in4; - uint16_t col, i = 0u, j, row = numRowsA, colCnt; /* loop counters */ + uint16_t col, i = 0U, j, row = numRowsA, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ #ifdef ARM_MATH_MATRIX_CHECK @@ -115,7 +115,7 @@ arm_status arm_mat_mult_f32( ** to the starting address of the pSrcB data */ pIn2 = pSrcB->pData; - j = 0u; + j = 0U; /* column loop */ do @@ -127,10 +127,10 @@ arm_status arm_mat_mult_f32( pIn1 = pInA; /* Apply loop unrolling and compute 4 MACs simultaneously. */ - colCnt = numColsA >> 2u; + colCnt = numColsA >> 2U; /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ in3 = *pIn2; @@ -150,7 +150,7 @@ arm_status arm_mat_mult_f32( in4 = *pIn2; pIn2 += numColsB; sum += in2 * in4; - pIn1 += 4u; + pIn1 += 4U; /* Decrement the loop count */ colCnt--; @@ -158,9 +158,9 @@ arm_status arm_mat_mult_f32( /* If the columns of pSrcA is not a multiple of 4, compute any remaining MACs here. ** No loop unrolling is used. */ - colCnt = numColsA % 0x4u; + colCnt = numColsA % 0x4U; - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ sum += *pIn1++ * (*pIn2); @@ -180,14 +180,14 @@ arm_status arm_mat_mult_f32( /* Decrement the column loop counter */ col--; - } while (col > 0u); + } while (col > 0U); #else /* Run the below code for Cortex-M0 */ float32_t *pInB = pSrcB->pData; /* input data matrix pointer B */ - uint16_t col, i = 0u, row = numRowsA, colCnt; /* loop counters */ + uint16_t col, i = 0U, row = numRowsA, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ #ifdef ARM_MATH_MATRIX_CHECK @@ -230,7 +230,7 @@ arm_status arm_mat_mult_f32( /* Matrix A columns number of MAC operations are to be performed */ colCnt = numColsA; - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ sum += *pIn1++ * (*pIn2); @@ -249,7 +249,7 @@ arm_status arm_mat_mult_f32( /* Update the pointer pIn2 to point to the starting address of the next column */ pIn2 = pInB + (numColsB - col); - } while (col > 0u); + } while (col > 0U); #endif /* #if defined (ARM_MATH_DSP) */ @@ -260,7 +260,7 @@ arm_status arm_mat_mult_f32( /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); /* Set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; } diff --git a/Source/MatrixFunctions/arm_mat_mult_fast_q15.c b/Source/MatrixFunctions/arm_mat_mult_fast_q15.c index 728bd501..8d720c7f 100644 --- a/Source/MatrixFunctions/arm_mat_mult_fast_q15.c +++ b/Source/MatrixFunctions/arm_mat_mult_fast_q15.c @@ -85,7 +85,7 @@ arm_status arm_mat_mult_fast_q15( uint16_t numColsB = pSrcB->numCols; /* number of columns of input matrix B */ uint16_t numColsA = pSrcA->numCols; /* number of columns of input matrix A */ uint16_t numRowsB = pSrcB->numRows; /* number of rows of input matrix A */ - uint32_t col, i = 0u, row = numRowsB, colCnt; /* loop counters */ + uint32_t col, i = 0U, row = numRowsB, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ #ifndef UNALIGNED_SUPPORT_DISABLE @@ -125,7 +125,7 @@ arm_status arm_mat_mult_fast_q15( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (col > 0u) + while (col > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE /* Read two elements from the row */ @@ -234,9 +234,9 @@ arm_status arm_mat_mult_fast_q15( /* If the columns of pSrcB is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - col = numColsB % 0x4u; + col = numColsB % 0x4U; - while (col > 0u) + while (col > 0U) { /* Read and store the input element in the destination */ *px = *pInB++; @@ -253,11 +253,11 @@ arm_status arm_mat_mult_fast_q15( /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); /* Reset the variables for the usage in the following multiplication process */ row = numRowsA; - i = 0u; + i = 0U; px = pDst->pData; #ifndef UNALIGNED_SUPPORT_DISABLE @@ -268,7 +268,7 @@ arm_status arm_mat_mult_fast_q15( /* The following loop performs the dot-product of each row in pSrcA with each column in pSrcB */ /* row loop */ - while (row > 0u) + while (row > 0U) { /* For every row wise process, the column loop counter is to be initiated */ col = numColsB; @@ -284,7 +284,7 @@ arm_status arm_mat_mult_fast_q15( #endif /* column loop */ - while (col > 0u) + while (col > 0U) { /* Set the variable sum, that acts as accumulator, to zero */ sum = 0; @@ -307,7 +307,7 @@ arm_status arm_mat_mult_fast_q15( #endif /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ #ifndef UNALIGNED_SUPPORT_DISABLE @@ -351,7 +351,7 @@ arm_status arm_mat_mult_fast_q15( /* process odd column samples */ #ifndef UNALIGNED_SUPPORT_DISABLE - if (numColsA & 1u) { + if (numColsA & 1U) { inA1 = *pInA++; inB1 = *pInB++; inA2 = *pInA2++; @@ -362,9 +362,9 @@ arm_status arm_mat_mult_fast_q15( sum4 += inA2 * inB2; } #else - colCnt = numColsA % 0x4u; + colCnt = numColsA % 0x4U; - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ sum += (q31_t) (*pInA++) * (*pInB++); @@ -392,7 +392,7 @@ arm_status arm_mat_mult_fast_q15( #ifndef UNALIGNED_SUPPORT_DISABLE i = i + numColsA; - px = px2 + (numColsB & 1u); + px = px2 + (numColsB & 1U); px2 = px + numColsB; #endif @@ -406,7 +406,7 @@ arm_status arm_mat_mult_fast_q15( #ifndef UNALIGNED_SUPPORT_DISABLE /* Compute remaining output column */ - if (numColsB & 1u) { + if (numColsB & 1U) { /* Avoid redundant computation of last element */ row = numRowsA & (~0x1); @@ -429,7 +429,7 @@ arm_status arm_mat_mult_fast_q15( colCnt = numColsA >> 2; /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { inA1 = *__SIMD32(pInA)++; inA2 = *__SIMD32(pInA)++; @@ -443,8 +443,8 @@ arm_status arm_mat_mult_fast_q15( colCnt--; } - colCnt = numColsA & 3u; - while (colCnt > 0u) { + colCnt = numColsA & 3U; + while (colCnt > 0U) { sum += (q31_t) (*pInA++) * (*pInB++); colCnt--; } @@ -459,14 +459,14 @@ arm_status arm_mat_mult_fast_q15( } /* Compute remaining output row */ - if (numRowsA & 1u) { + if (numRowsA & 1U) { /* point to last row in output matrix */ px = pDst->pData+(numColsB)*(numRowsA-1); pInB = pSrcBT; col = numColsB; - i = 0u; + i = 0U; /* col loop */ while (col > 0) @@ -482,7 +482,7 @@ arm_status arm_mat_mult_fast_q15( colCnt = numColsA >> 2; /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { inA1 = *__SIMD32(pInA)++; inA2 = *__SIMD32(pInA)++; @@ -496,8 +496,8 @@ arm_status arm_mat_mult_fast_q15( colCnt--; } - colCnt = numColsA & 3u; - while (colCnt > 0u) { + colCnt = numColsA & 3U; + while (colCnt > 0U) { sum += (q31_t) (*pInA++) * (*pInB++); colCnt--; } diff --git a/Source/MatrixFunctions/arm_mat_mult_fast_q31.c b/Source/MatrixFunctions/arm_mat_mult_fast_q31.c index 35e7adb2..78b33ef5 100644 --- a/Source/MatrixFunctions/arm_mat_mult_fast_q31.c +++ b/Source/MatrixFunctions/arm_mat_mult_fast_q31.c @@ -80,7 +80,7 @@ arm_status arm_mat_mult_fast_q31( uint16_t numRowsA = pSrcA->numRows; /* number of rows of input matrix A */ uint16_t numColsB = pSrcB->numCols; /* number of columns of input matrix B */ uint16_t numColsA = pSrcA->numCols; /* number of columns of input matrix A */ - uint32_t col, i = 0u, j, row = numRowsA, colCnt; /* loop counters */ + uint32_t col, i = 0U, j, row = numRowsA, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ q31_t inA1, inB1; @@ -116,7 +116,7 @@ arm_status arm_mat_mult_fast_q31( /* The following loop performs the dot-product of each row in pSrcA with each column in pSrcB */ /* row loop */ - while (row > 0u) + while (row > 0U) { /* For every row wise process, the column loop counter is to be initiated */ @@ -126,14 +126,14 @@ arm_status arm_mat_mult_fast_q31( ** to the starting address of the pSrcB data */ pInB = pSrcB->pData; - j = 0u; + j = 0U; #if defined (ARM_MATH_DSP) col = col >> 1; #endif /* column loop */ - while (col > 0u) + while (col > 0U) { /* Set the variable sum, that acts as accumulator, to zero */ sum = 0; @@ -153,7 +153,7 @@ arm_status arm_mat_mult_fast_q31( #endif /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { #if defined (ARM_MATH_DSP) @@ -190,7 +190,7 @@ arm_status arm_mat_mult_fast_q31( inA1 = pInA[3]; sum = __SMMLA(inA1, inB1, sum); - pInA += 4u; + pInA += 4U; #endif /* Decrement the loop counter */ @@ -199,8 +199,8 @@ arm_status arm_mat_mult_fast_q31( #ifdef ARM_MATH_CM0_FAMILY /* If the columns of pSrcA is not a multiple of 4, compute any remaining output samples here. */ - colCnt = numColsA % 0x4u; - while (colCnt > 0u) + colCnt = numColsA % 0x4U; + while (colCnt > 0U) { sum = __SMMLA(*pInA++, *pInB, sum); pInB += numColsB; @@ -228,7 +228,7 @@ arm_status arm_mat_mult_fast_q31( #if defined (ARM_MATH_DSP) i = i + numColsA; - px = px2 + (numColsB & 1u); + px = px2 + (numColsB & 1U); px2 = px + numColsB; #endif @@ -242,7 +242,7 @@ arm_status arm_mat_mult_fast_q31( #if defined (ARM_MATH_DSP) /* Compute remaining output column */ - if (numColsB & 1u) { + if (numColsB & 1U) { /* Avoid redundant computation of last element */ row = numRowsA & (~0x1); @@ -265,7 +265,7 @@ arm_status arm_mat_mult_fast_q31( colCnt = numColsA >> 2; /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { inA1 = *pInA++; inA2 = *pInA++; @@ -289,8 +289,8 @@ arm_status arm_mat_mult_fast_q31( colCnt--; } - colCnt = numColsA & 3u; - while (colCnt > 0u) { + colCnt = numColsA & 3U; + while (colCnt > 0U) { sum = __SMMLA(*pInA++, *pInB, sum); pInB += numColsB; colCnt--; @@ -306,13 +306,13 @@ arm_status arm_mat_mult_fast_q31( } /* Compute remaining output row */ - if (numRowsA & 1u) { + if (numRowsA & 1U) { /* point to last row in output matrix */ px = pDst->pData+(numColsB)*(numRowsA-1); col = numColsB; - i = 0u; + i = 0U; /* col loop */ while (col > 0) @@ -329,7 +329,7 @@ arm_status arm_mat_mult_fast_q31( colCnt = numColsA >> 2; /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { inA1 = *pInA++; inA2 = *pInA++; @@ -353,8 +353,8 @@ arm_status arm_mat_mult_fast_q31( colCnt--; } - colCnt = numColsA & 3u; - while (colCnt > 0u) { + colCnt = numColsA & 3U; + while (colCnt > 0U) { sum = __SMMLA(*pInA++, *pInB, sum); pInB += numColsB; colCnt--; diff --git a/Source/MatrixFunctions/arm_mat_mult_q15.c b/Source/MatrixFunctions/arm_mat_mult_q15.c index c22aea90..3244f471 100644 --- a/Source/MatrixFunctions/arm_mat_mult_q15.c +++ b/Source/MatrixFunctions/arm_mat_mult_q15.c @@ -84,7 +84,7 @@ arm_status arm_mat_mult_q15( uint16_t numColsB = pSrcB->numCols; /* number of columns of input matrix B */ uint16_t numColsA = pSrcA->numCols; /* number of columns of input matrix A */ uint16_t numRowsB = pSrcB->numRows; /* number of rows of input matrix A */ - uint16_t col, i = 0u, row = numRowsB, colCnt; /* loop counters */ + uint16_t col, i = 0U, row = numRowsB, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ #ifndef UNALIGNED_SUPPORT_DISABLE @@ -121,7 +121,7 @@ arm_status arm_mat_mult_q15( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (col > 0u) + while (col > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE @@ -234,9 +234,9 @@ arm_status arm_mat_mult_q15( /* If the columns of pSrcB is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - col = numColsB % 0x4u; + col = numColsB % 0x4U; - while (col > 0u) + while (col > 0U) { /* Read and store the input element in the destination */ *px = *pInB++; @@ -253,11 +253,11 @@ arm_status arm_mat_mult_q15( /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); /* Reset the variables for the usage in the following multiplication process */ row = numRowsA; - i = 0u; + i = 0U; px = pDst->pData; /* The following loop performs the dot-product of each row in pSrcA with each column in pSrcB */ @@ -285,7 +285,7 @@ arm_status arm_mat_mult_q15( /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ #ifndef UNALIGNED_SUPPORT_DISABLE @@ -328,9 +328,9 @@ arm_status arm_mat_mult_q15( } /* process remaining column samples */ - colCnt = numColsA & 3u; + colCnt = numColsA & 3U; - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ sum += *pInA++ * *pInB++; @@ -346,14 +346,14 @@ arm_status arm_mat_mult_q15( /* Decrement the column loop counter */ col--; - } while (col > 0u); + } while (col > 0U); i = i + numColsA; /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); #else @@ -368,7 +368,7 @@ arm_status arm_mat_mult_q15( uint16_t numColsB = pSrcB->numCols; /* number of columns of input matrix B */ uint16_t numColsA = pSrcA->numCols; /* number of columns of input matrix A */ uint16_t numRowsA = pSrcA->numRows; /* number of rows of input matrix A */ - uint16_t col, i = 0u, row = numRowsA, colCnt; /* loop counters */ + uint16_t col, i = 0U, row = numRowsA, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ #ifdef ARM_MATH_MATRIX_CHECK @@ -411,7 +411,7 @@ arm_status arm_mat_mult_q15( colCnt = numColsA; /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ /* Perform the multiply-accumulates */ @@ -432,7 +432,7 @@ arm_status arm_mat_mult_q15( /* Update the pointer pIn2 to point to the starting address of the next column */ pIn2 = pInB + (numColsB - col); - } while (col > 0u); + } while (col > 0U); /* Update the pointer pSrcA to point to the starting address of the next row */ i = i + numColsB; @@ -441,7 +441,7 @@ arm_status arm_mat_mult_q15( /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); #endif /* #if defined (ARM_MATH_DSP) */ /* set status as ARM_MATH_SUCCESS */ diff --git a/Source/MatrixFunctions/arm_mat_mult_q31.c b/Source/MatrixFunctions/arm_mat_mult_q31.c index 8a90fdc1..9bd2b970 100644 --- a/Source/MatrixFunctions/arm_mat_mult_q31.c +++ b/Source/MatrixFunctions/arm_mat_mult_q31.c @@ -82,7 +82,7 @@ arm_status arm_mat_mult_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ - uint16_t col, i = 0u, j, row = numRowsA, colCnt; /* loop counters */ + uint16_t col, i = 0U, j, row = numRowsA, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ q31_t a0, a1, a2, a3, b0, b1, b2, b3; @@ -114,7 +114,7 @@ arm_status arm_mat_mult_q31( ** to the starting address of the pSrcB data */ pIn2 = pSrcB->pData; - j = 0u; + j = 0U; /* column loop */ do @@ -130,7 +130,7 @@ arm_status arm_mat_mult_q31( /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ /* Perform the multiply-accumulates */ @@ -163,9 +163,9 @@ arm_status arm_mat_mult_q31( /* If the columns of pSrcA is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - colCnt = numColsA % 0x4u; + colCnt = numColsA % 0x4U; - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ /* Perform the multiply-accumulates */ @@ -186,14 +186,14 @@ arm_status arm_mat_mult_q31( /* Decrement the column loop counter */ col--; - } while (col > 0u); + } while (col > 0U); #else /* Run the below code for Cortex-M0 */ q31_t *pInB = pSrcB->pData; /* input data matrix pointer B */ - uint16_t col, i = 0u, row = numRowsA, colCnt; /* loop counters */ + uint16_t col, i = 0U, row = numRowsA, colCnt; /* loop counters */ arm_status status; /* status of matrix multiplication */ @@ -237,7 +237,7 @@ arm_status arm_mat_mult_q31( colCnt = numColsA; /* matrix multiplication */ - while (colCnt > 0u) + while (colCnt > 0U) { /* c(m,n) = a(1,1)*b(1,1) + a(1,2) * b(2,1) + .... + a(m,p)*b(p,n) */ /* Perform the multiply-accumulates */ @@ -257,7 +257,7 @@ arm_status arm_mat_mult_q31( /* Update the pointer pIn2 to point to the starting address of the next column */ pIn2 = pInB + (numColsB - col); - } while (col > 0u); + } while (col > 0U); #endif @@ -268,7 +268,7 @@ arm_status arm_mat_mult_q31( /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); /* set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; diff --git a/Source/MatrixFunctions/arm_mat_scale_f32.c b/Source/MatrixFunctions/arm_mat_scale_f32.c index 8e304dd0..dbc385a4 100644 --- a/Source/MatrixFunctions/arm_mat_scale_f32.c +++ b/Source/MatrixFunctions/arm_mat_scale_f32.c @@ -105,7 +105,7 @@ arm_status arm_mat_scale_f32( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) * scale */ /* Scaling and results are stored in the destination buffer. */ @@ -126,8 +126,8 @@ arm_status arm_mat_scale_f32( pOut[3] = out4; /* update pointers to process next sampels */ - pIn += 4u; - pOut += 4u; + pIn += 4U; + pOut += 4U; /* Decrement the numSamples loop counter */ blkCnt--; @@ -135,7 +135,7 @@ arm_status arm_mat_scale_f32( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -146,7 +146,7 @@ arm_status arm_mat_scale_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) * scale */ /* The results are stored in the destination buffer. */ diff --git a/Source/MatrixFunctions/arm_mat_scale_q15.c b/Source/MatrixFunctions/arm_mat_scale_q15.c index 357a397b..af664cac 100644 --- a/Source/MatrixFunctions/arm_mat_scale_q15.c +++ b/Source/MatrixFunctions/arm_mat_scale_q15.c @@ -95,7 +95,7 @@ arm_status arm_mat_scale_q15( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) * k */ /* Scale, saturate and then store the results in the destination buffer. */ @@ -127,8 +127,8 @@ arm_status arm_mat_scale_q15( _SIMD32_OFFSET(pOut + 2) = __PKHBT(in4, in3, 16); /* update pointers to process next sampels */ - pIn += 4u; - pOut += 4u; + pIn += 4U; + pOut += 4U; /* Decrement the numSamples loop counter */ @@ -137,7 +137,7 @@ arm_status arm_mat_scale_q15( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -148,7 +148,7 @@ arm_status arm_mat_scale_q15( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) * k */ /* Scale, saturate and then store the results in the destination buffer. */ diff --git a/Source/MatrixFunctions/arm_mat_scale_q31.c b/Source/MatrixFunctions/arm_mat_scale_q31.c index 9af0491d..d190cf15 100644 --- a/Source/MatrixFunctions/arm_mat_scale_q31.c +++ b/Source/MatrixFunctions/arm_mat_scale_q31.c @@ -91,11 +91,11 @@ arm_status arm_mat_scale_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) * k */ /* Read values from input */ @@ -138,8 +138,8 @@ arm_status arm_mat_scale_q31( *(pOut + 3) = out4; /* update pointers to process next sampels */ - pIn += 4u; - pOut += 4u; + pIn += 4U; + pOut += 4U; /* Decrement the numSamples loop counter */ @@ -148,7 +148,7 @@ arm_status arm_mat_scale_q31( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -159,7 +159,7 @@ arm_status arm_mat_scale_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) * k */ /* Scale, saturate and then store the results in the destination buffer. */ diff --git a/Source/MatrixFunctions/arm_mat_sub_f32.c b/Source/MatrixFunctions/arm_mat_sub_f32.c index 048d578a..7c0b54e9 100644 --- a/Source/MatrixFunctions/arm_mat_sub_f32.c +++ b/Source/MatrixFunctions/arm_mat_sub_f32.c @@ -96,11 +96,11 @@ arm_status arm_mat_sub_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) - B(m,n) */ /* Subtract and then store the results in the destination buffer. */ @@ -153,9 +153,9 @@ arm_status arm_mat_sub_f32( /* update pointers to process next sampels */ - pIn1 += 4u; - pIn2 += 4u; - pOut += 4u; + pIn1 += 4U; + pIn2 += 4U; + pOut += 4U; /* Decrement the loop counter */ blkCnt--; @@ -163,7 +163,7 @@ arm_status arm_mat_sub_f32( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -174,7 +174,7 @@ arm_status arm_mat_sub_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) - B(m,n) */ /* Subtract and then store the results in the destination buffer. */ diff --git a/Source/MatrixFunctions/arm_mat_sub_q15.c b/Source/MatrixFunctions/arm_mat_sub_q15.c index ebf5671c..28e659fc 100644 --- a/Source/MatrixFunctions/arm_mat_sub_q15.c +++ b/Source/MatrixFunctions/arm_mat_sub_q15.c @@ -87,11 +87,11 @@ arm_status arm_mat_sub_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Apply loop unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) - B(m,n) */ /* Subtract, Saturate and then store the results in the destination buffer. */ @@ -104,9 +104,9 @@ arm_status arm_mat_sub_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) - B(m,n) */ /* Subtract and then store the results in the destination buffer. */ @@ -123,7 +123,7 @@ arm_status arm_mat_sub_q15( /* Initialize blkCnt with number of samples */ blkCnt = numSamples; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) - B(m,n) */ /* Subtract and then store the results in the destination buffer. */ diff --git a/Source/MatrixFunctions/arm_mat_sub_q31.c b/Source/MatrixFunctions/arm_mat_sub_q31.c index d3ab00c4..3bf5508d 100644 --- a/Source/MatrixFunctions/arm_mat_sub_q31.c +++ b/Source/MatrixFunctions/arm_mat_sub_q31.c @@ -94,11 +94,11 @@ arm_status arm_mat_sub_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Loop Unrolling */ - blkCnt = numSamples >> 2u; + blkCnt = numSamples >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) - B(m,n) */ /* Subtract, saturate and then store the results in the destination buffer. */ @@ -147,9 +147,9 @@ arm_status arm_mat_sub_q31( pOut[3] = out2; /* update pointers to process next samples */ - pIn1 += 4u; - pIn2 += 4u; - pOut += 4u; + pIn1 += 4U; + pIn2 += 4U; + pOut += 4U; /* Decrement the loop counter */ blkCnt--; @@ -157,7 +157,7 @@ arm_status arm_mat_sub_q31( /* If the numSamples is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = numSamples % 0x4u; + blkCnt = numSamples % 0x4U; #else @@ -168,7 +168,7 @@ arm_status arm_mat_sub_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C(m,n) = A(m,n) - B(m,n) */ /* Subtract, saturate and then store the results in the destination buffer. */ diff --git a/Source/MatrixFunctions/arm_mat_trans_f32.c b/Source/MatrixFunctions/arm_mat_trans_f32.c index 95021abc..84165ce2 100644 --- a/Source/MatrixFunctions/arm_mat_trans_f32.c +++ b/Source/MatrixFunctions/arm_mat_trans_f32.c @@ -68,7 +68,7 @@ arm_status arm_mat_trans_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ - uint16_t blkCnt, i = 0u, row = nRows; /* loop counters */ + uint16_t blkCnt, i = 0U, row = nRows; /* loop counters */ arm_status status; /* status of matrix transpose */ @@ -97,7 +97,7 @@ arm_status arm_mat_trans_f32( /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) /* column loop */ + while (blkCnt > 0U) /* column loop */ { /* Read and store the input element in the destination */ *px = *pIn++; @@ -128,9 +128,9 @@ arm_status arm_mat_trans_f32( } /* Perform matrix transpose for last 3 samples here. */ - blkCnt = nColumns % 0x4u; + blkCnt = nColumns % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read and store the input element in the destination */ *px = *pIn++; @@ -146,7 +146,7 @@ arm_status arm_mat_trans_f32( /* Run the below code for Cortex-M0 */ - uint16_t col, i = 0u, row = nRows; /* loop counters */ + uint16_t col, i = 0U, row = nRows; /* loop counters */ arm_status status; /* status of matrix transpose */ @@ -172,7 +172,7 @@ arm_status arm_mat_trans_f32( /* Initialize column loop counter */ col = nColumns; - while (col > 0u) + while (col > 0U) { /* Read and store the input element in the destination */ *px = *pIn++; @@ -191,7 +191,7 @@ arm_status arm_mat_trans_f32( /* Decrement the row loop counter */ row--; - } while (row > 0u); /* row loop end */ + } while (row > 0U); /* row loop end */ /* Set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; diff --git a/Source/MatrixFunctions/arm_mat_trans_q15.c b/Source/MatrixFunctions/arm_mat_trans_q15.c index 16993d0a..6ba09043 100644 --- a/Source/MatrixFunctions/arm_mat_trans_q15.c +++ b/Source/MatrixFunctions/arm_mat_trans_q15.c @@ -53,7 +53,7 @@ arm_status arm_mat_trans_q15( q15_t *pOut = pDst->pData; /* output data matrix pointer */ uint16_t nRows = pSrc->numRows; /* number of nRows */ uint16_t nColumns = pSrc->numCols; /* number of nColumns */ - uint16_t col, row = nRows, i = 0u; /* row and column loop counters */ + uint16_t col, row = nRows, i = 0U; /* row and column loop counters */ arm_status status; /* status of matrix transpose */ #if defined (ARM_MATH_DSP) @@ -88,14 +88,14 @@ arm_status arm_mat_trans_q15( { /* Apply loop unrolling and exchange the columns with row elements */ - col = nColumns >> 2u; + col = nColumns >> 2U; /* The pointer pOut is set to starting address of the column being processed */ pOut = pDst->pData + i; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (col > 0u) + while (col > 0U) { #ifndef UNALIGNED_SUPPORT_DISABLE @@ -211,7 +211,7 @@ arm_status arm_mat_trans_q15( } /* Perform matrix transpose for last 3 samples here. */ - col = nColumns % 0x4u; + col = nColumns % 0x4U; #else @@ -241,7 +241,7 @@ arm_status arm_mat_trans_q15( #endif /* #if defined (ARM_MATH_DSP) */ - while (col > 0u) + while (col > 0U) { /* Read and store the input element in the destination */ *pOut = *pSrcA++; @@ -258,7 +258,7 @@ arm_status arm_mat_trans_q15( /* Decrement the row loop counter */ row--; - } while (row > 0u); + } while (row > 0U); /* set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; diff --git a/Source/MatrixFunctions/arm_mat_trans_q31.c b/Source/MatrixFunctions/arm_mat_trans_q31.c index 152fb639..6f698e0e 100644 --- a/Source/MatrixFunctions/arm_mat_trans_q31.c +++ b/Source/MatrixFunctions/arm_mat_trans_q31.c @@ -59,7 +59,7 @@ arm_status arm_mat_trans_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ - uint16_t blkCnt, i = 0u, row = nRows; /* loop counters */ + uint16_t blkCnt, i = 0U, row = nRows; /* loop counters */ arm_status status; /* status of matrix transpose */ @@ -81,14 +81,14 @@ arm_status arm_mat_trans_q31( do { /* Apply loop unrolling and exchange the columns with row elements */ - blkCnt = nColumns >> 2u; + blkCnt = nColumns >> 2U; /* The pointer px is set to starting address of the column being processed */ px = pOut + i; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read and store the input element in the destination */ *px = *pIn++; @@ -119,9 +119,9 @@ arm_status arm_mat_trans_q31( } /* Perform matrix transpose for last 3 samples here. */ - blkCnt = nColumns % 0x4u; + blkCnt = nColumns % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Read and store the input element in the destination */ *px = *pIn++; @@ -137,7 +137,7 @@ arm_status arm_mat_trans_q31( /* Run the below code for Cortex-M0 */ - uint16_t col, i = 0u, row = nRows; /* loop counters */ + uint16_t col, i = 0U, row = nRows; /* loop counters */ arm_status status; /* status of matrix transpose */ @@ -163,7 +163,7 @@ arm_status arm_mat_trans_q31( /* Initialize column loop counter */ col = nColumns; - while (col > 0u) + while (col > 0U) { /* Read and store the input element in the destination */ *px = *pIn++; @@ -183,7 +183,7 @@ arm_status arm_mat_trans_q31( row--; } - while (row > 0u); /* row loop end */ + while (row > 0U); /* row loop end */ /* set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; diff --git a/Source/StatisticsFunctions/arm_max_f32.c b/Source/StatisticsFunctions/arm_max_f32.c index cf2cff6b..a0a68acd 100644 --- a/Source/StatisticsFunctions/arm_max_f32.c +++ b/Source/StatisticsFunctions/arm_max_f32.c @@ -68,16 +68,16 @@ void arm_max_f32( uint32_t blkCnt, outIndex, count; /* loop counter */ /* Initialise the count value. */ - count = 0u; + count = 0U; /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; /* Loop unrolling */ - blkCnt = (blockSize - 1u) >> 2u; + blkCnt = (blockSize - 1U) >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize maxVal to the next consecutive values one by one */ maxVal1 = *pSrc++; @@ -88,7 +88,7 @@ void arm_max_f32( { /* Update the maximum value and its index */ out = maxVal1; - outIndex = count + 1u; + outIndex = count + 1U; } /* compare for the maximum value */ @@ -96,7 +96,7 @@ void arm_max_f32( { /* Update the maximum value and its index */ out = maxVal2; - outIndex = count + 2u; + outIndex = count + 2U; } /* Initialize maxVal to the next consecutive values one by one */ @@ -108,7 +108,7 @@ void arm_max_f32( { /* Update the maximum value and its index */ out = maxVal1; - outIndex = count + 3u; + outIndex = count + 3U; } /* compare for the maximum value */ @@ -116,17 +116,17 @@ void arm_max_f32( { /* Update the maximum value and its index */ out = maxVal2; - outIndex = count + 4u; + outIndex = count + 4U; } - count += 4u; + count += 4U; /* Decrement the loop counter */ blkCnt--; } - /* if (blockSize - 1u) is not multiple of 4 */ - blkCnt = (blockSize - 1u) % 4u; + /* if (blockSize - 1U) is not multiple of 4 */ + blkCnt = (blockSize - 1U) % 4U; #else /* Run the below code for Cortex-M0 */ @@ -135,15 +135,15 @@ void arm_max_f32( uint32_t blkCnt, outIndex; /* loop counter */ /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; - blkCnt = (blockSize - 1u); + blkCnt = (blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize maxVal to the next consecutive values one by one */ maxVal1 = *pSrc++; diff --git a/Source/StatisticsFunctions/arm_max_q15.c b/Source/StatisticsFunctions/arm_max_q15.c index 812ecdb8..67d5e346 100644 --- a/Source/StatisticsFunctions/arm_max_q15.c +++ b/Source/StatisticsFunctions/arm_max_q15.c @@ -60,16 +60,16 @@ void arm_max_q15( uint32_t blkCnt, outIndex, count; /* loop counter */ /* Initialise the count value. */ - count = 0u; + count = 0U; /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; /* Loop unrolling */ - blkCnt = (blockSize - 1u) >> 2u; + blkCnt = (blockSize - 1U) >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize maxVal to the next consecutive values one by one */ maxVal1 = *pSrc++; @@ -80,7 +80,7 @@ void arm_max_q15( { /* Update the maximum value and its index */ out = maxVal1; - outIndex = count + 1u; + outIndex = count + 1U; } /* compare for the maximum value */ @@ -88,7 +88,7 @@ void arm_max_q15( { /* Update the maximum value and its index */ out = maxVal2; - outIndex = count + 2u; + outIndex = count + 2U; } /* Initialize maxVal to the next consecutive values one by one */ @@ -100,7 +100,7 @@ void arm_max_q15( { /* Update the maximum value and its index */ out = maxVal1; - outIndex = count + 3u; + outIndex = count + 3U; } /* compare for the maximum value */ @@ -108,17 +108,17 @@ void arm_max_q15( { /* Update the maximum value and its index */ out = maxVal2; - outIndex = count + 4u; + outIndex = count + 4U; } - count += 4u; + count += 4U; /* Decrement the loop counter */ blkCnt--; } - /* if (blockSize - 1u) is not multiple of 4 */ - blkCnt = (blockSize - 1u) % 4u; + /* if (blockSize - 1U) is not multiple of 4 */ + blkCnt = (blockSize - 1U) % 4U; #else /* Run the below code for Cortex-M0 */ @@ -127,15 +127,15 @@ void arm_max_q15( uint32_t blkCnt, outIndex; /* loop counter */ /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; - blkCnt = (blockSize - 1u); + blkCnt = (blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize maxVal to the next consecutive values one by one */ maxVal1 = *pSrc++; diff --git a/Source/StatisticsFunctions/arm_max_q31.c b/Source/StatisticsFunctions/arm_max_q31.c index dbd4b691..5d34bbd2 100644 --- a/Source/StatisticsFunctions/arm_max_q31.c +++ b/Source/StatisticsFunctions/arm_max_q31.c @@ -60,16 +60,16 @@ void arm_max_q31( uint32_t blkCnt, outIndex, count; /* loop counter */ /* Initialise the count value. */ - count = 0u; + count = 0U; /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; /* Loop unrolling */ - blkCnt = (blockSize - 1u) >> 2u; + blkCnt = (blockSize - 1U) >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize maxVal to the next consecutive values one by one */ maxVal1 = *pSrc++; @@ -80,7 +80,7 @@ void arm_max_q31( { /* Update the maximum value and its index */ out = maxVal1; - outIndex = count + 1u; + outIndex = count + 1U; } /* compare for the maximum value */ @@ -88,7 +88,7 @@ void arm_max_q31( { /* Update the maximum value and its index */ out = maxVal2; - outIndex = count + 2u; + outIndex = count + 2U; } /* Initialize maxVal to the next consecutive values one by one */ @@ -100,7 +100,7 @@ void arm_max_q31( { /* Update the maximum value and its index */ out = maxVal1; - outIndex = count + 3u; + outIndex = count + 3U; } /* compare for the maximum value */ @@ -108,17 +108,17 @@ void arm_max_q31( { /* Update the maximum value and its index */ out = maxVal2; - outIndex = count + 4u; + outIndex = count + 4U; } - count += 4u; + count += 4U; /* Decrement the loop counter */ blkCnt--; } - /* if (blockSize - 1u) is not multiple of 4 */ - blkCnt = (blockSize - 1u) % 4u; + /* if (blockSize - 1U) is not multiple of 4 */ + blkCnt = (blockSize - 1U) % 4U; #else /* Run the below code for Cortex-M0 */ @@ -127,15 +127,15 @@ void arm_max_q31( uint32_t blkCnt, outIndex; /* loop counter */ /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; - blkCnt = (blockSize - 1u); + blkCnt = (blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize maxVal to the next consecutive values one by one */ maxVal1 = *pSrc++; diff --git a/Source/StatisticsFunctions/arm_max_q7.c b/Source/StatisticsFunctions/arm_max_q7.c index dda61ada..72f6e5eb 100644 --- a/Source/StatisticsFunctions/arm_max_q7.c +++ b/Source/StatisticsFunctions/arm_max_q7.c @@ -60,16 +60,16 @@ void arm_max_q7( uint32_t blkCnt, outIndex, count; /* loop counter */ /* Initialise the count value. */ - count = 0u; + count = 0U; /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; /* Loop unrolling */ - blkCnt = (blockSize - 1u) >> 2u; + blkCnt = (blockSize - 1U) >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize maxVal to the next consecutive values one by one */ maxVal1 = *pSrc++; @@ -80,7 +80,7 @@ void arm_max_q7( { /* Update the maximum value and its index */ out = maxVal1; - outIndex = count + 1u; + outIndex = count + 1U; } /* compare for the maximum value */ @@ -88,7 +88,7 @@ void arm_max_q7( { /* Update the maximum value and its index */ out = maxVal2; - outIndex = count + 2u; + outIndex = count + 2U; } /* Initialize maxVal to the next consecutive values one by one */ @@ -100,7 +100,7 @@ void arm_max_q7( { /* Update the maximum value and its index */ out = maxVal1; - outIndex = count + 3u; + outIndex = count + 3U; } /* compare for the maximum value */ @@ -108,17 +108,17 @@ void arm_max_q7( { /* Update the maximum value and its index */ out = maxVal2; - outIndex = count + 4u; + outIndex = count + 4U; } - count += 4u; + count += 4U; /* Decrement the loop counter */ blkCnt--; } - /* if (blockSize - 1u) is not multiple of 4 */ - blkCnt = (blockSize - 1u) % 4u; + /* if (blockSize - 1U) is not multiple of 4 */ + blkCnt = (blockSize - 1U) % 4U; #else /* Run the below code for Cortex-M0 */ @@ -127,15 +127,15 @@ void arm_max_q7( uint32_t blkCnt, outIndex; /* loop counter */ /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; - blkCnt = (blockSize - 1u); + blkCnt = (blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize maxVal to the next consecutive values one by one */ maxVal1 = *pSrc++; diff --git a/Source/StatisticsFunctions/arm_mean_f32.c b/Source/StatisticsFunctions/arm_mean_f32.c index 98f643f9..85a3b16f 100644 --- a/Source/StatisticsFunctions/arm_mean_f32.c +++ b/Source/StatisticsFunctions/arm_mean_f32.c @@ -73,11 +73,11 @@ void arm_mean_f32( float32_t in1, in2, in3, in4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ in1 = *pSrc++; @@ -96,7 +96,7 @@ void arm_mean_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ @@ -106,7 +106,7 @@ void arm_mean_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ sum += *pSrc++; diff --git a/Source/StatisticsFunctions/arm_mean_q15.c b/Source/StatisticsFunctions/arm_mean_q15.c index 6c6335ae..7bf55c2f 100644 --- a/Source/StatisticsFunctions/arm_mean_q15.c +++ b/Source/StatisticsFunctions/arm_mean_q15.c @@ -71,19 +71,19 @@ void arm_mean_q15( q31_t in; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ in = *__SIMD32(pSrc)++; - sum += ((in << 16u) >> 16u); - sum += (in >> 16u); + sum += ((in << 16U) >> 16U); + sum += (in >> 16U); in = *__SIMD32(pSrc)++; - sum += ((in << 16u) >> 16u); - sum += (in >> 16u); + sum += ((in << 16U) >> 16U); + sum += (in >> 16U); /* Decrement the loop counter */ blkCnt--; @@ -91,7 +91,7 @@ void arm_mean_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ @@ -101,7 +101,7 @@ void arm_mean_q15( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ sum += *pSrc++; diff --git a/Source/StatisticsFunctions/arm_mean_q31.c b/Source/StatisticsFunctions/arm_mean_q31.c index 2d8f4686..ea83ced8 100644 --- a/Source/StatisticsFunctions/arm_mean_q31.c +++ b/Source/StatisticsFunctions/arm_mean_q31.c @@ -71,11 +71,11 @@ void arm_mean_q31( q31_t in1, in2, in3, in4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ in1 = *pSrc++; @@ -94,7 +94,7 @@ void arm_mean_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ @@ -104,7 +104,7 @@ void arm_mean_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ sum += *pSrc++; diff --git a/Source/StatisticsFunctions/arm_mean_q7.c b/Source/StatisticsFunctions/arm_mean_q7.c index efee11d1..a7bdfb8d 100644 --- a/Source/StatisticsFunctions/arm_mean_q7.c +++ b/Source/StatisticsFunctions/arm_mean_q7.c @@ -71,19 +71,19 @@ void arm_mean_q7( q31_t in; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ in = *__SIMD32(pSrc)++; - sum += ((in << 24u) >> 24u); - sum += ((in << 16u) >> 24u); - sum += ((in << 8u) >> 24u); - sum += (in >> 24u); + sum += ((in << 24U) >> 24U); + sum += ((in << 16U) >> 24U); + sum += ((in << 8U) >> 24U); + sum += (in >> 24U); /* Decrement the loop counter */ blkCnt--; @@ -91,7 +91,7 @@ void arm_mean_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ @@ -101,7 +101,7 @@ void arm_mean_q7( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ sum += *pSrc++; diff --git a/Source/StatisticsFunctions/arm_min_f32.c b/Source/StatisticsFunctions/arm_min_f32.c index 4acf8fce..858b0a26 100644 --- a/Source/StatisticsFunctions/arm_min_f32.c +++ b/Source/StatisticsFunctions/arm_min_f32.c @@ -68,16 +68,16 @@ void arm_min_f32( uint32_t blkCnt, outIndex, count; /* loop counter */ /* Initialise the count value. */ - count = 0u; + count = 0U; /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; /* Loop unrolling */ - blkCnt = (blockSize - 1u) >> 2u; + blkCnt = (blockSize - 1U) >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize minVal to the next consecutive values one by one */ minVal1 = *pSrc++; @@ -88,7 +88,7 @@ void arm_min_f32( { /* Update the minimum value and its index */ out = minVal1; - outIndex = count + 1u; + outIndex = count + 1U; } /* compare for the minimum value */ @@ -96,7 +96,7 @@ void arm_min_f32( { /* Update the minimum value and its index */ out = minVal2; - outIndex = count + 2u; + outIndex = count + 2U; } /* Initialize minVal to the next consecutive values one by one */ @@ -108,7 +108,7 @@ void arm_min_f32( { /* Update the minimum value and its index */ out = minVal1; - outIndex = count + 3u; + outIndex = count + 3U; } /* compare for the minimum value */ @@ -116,17 +116,17 @@ void arm_min_f32( { /* Update the minimum value and its index */ out = minVal2; - outIndex = count + 4u; + outIndex = count + 4U; } - count += 4u; + count += 4U; /* Decrement the loop counter */ blkCnt--; } - /* if (blockSize - 1u) is not multiple of 4 */ - blkCnt = (blockSize - 1u) % 4u; + /* if (blockSize - 1U) is not multiple of 4 */ + blkCnt = (blockSize - 1U) % 4U; #else /* Run the below code for Cortex-M0 */ @@ -135,15 +135,15 @@ void arm_min_f32( uint32_t blkCnt, outIndex; /* loop counter */ /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; - blkCnt = (blockSize - 1u); + blkCnt = (blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize minVal to the next consecutive values one by one */ minVal1 = *pSrc++; diff --git a/Source/StatisticsFunctions/arm_min_q15.c b/Source/StatisticsFunctions/arm_min_q15.c index 639787a1..fdc32b78 100644 --- a/Source/StatisticsFunctions/arm_min_q15.c +++ b/Source/StatisticsFunctions/arm_min_q15.c @@ -61,16 +61,16 @@ void arm_min_q15( uint32_t blkCnt, outIndex, count; /* loop counter */ /* Initialise the count value. */ - count = 0u; + count = 0U; /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; /* Loop unrolling */ - blkCnt = (blockSize - 1u) >> 2u; + blkCnt = (blockSize - 1U) >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize minVal to the next consecutive values one by one */ minVal1 = *pSrc++; @@ -81,7 +81,7 @@ void arm_min_q15( { /* Update the minimum value and its index */ out = minVal1; - outIndex = count + 1u; + outIndex = count + 1U; } /* compare for the minimum value */ @@ -89,7 +89,7 @@ void arm_min_q15( { /* Update the minimum value and its index */ out = minVal2; - outIndex = count + 2u; + outIndex = count + 2U; } /* Initialize minVal to the next consecutive values one by one */ @@ -101,7 +101,7 @@ void arm_min_q15( { /* Update the minimum value and its index */ out = minVal1; - outIndex = count + 3u; + outIndex = count + 3U; } /* compare for the minimum value */ @@ -109,17 +109,17 @@ void arm_min_q15( { /* Update the minimum value and its index */ out = minVal2; - outIndex = count + 4u; + outIndex = count + 4U; } - count += 4u; + count += 4U; /* Decrement the loop counter */ blkCnt--; } - /* if (blockSize - 1u) is not multiple of 4 */ - blkCnt = (blockSize - 1u) % 4u; + /* if (blockSize - 1U) is not multiple of 4 */ + blkCnt = (blockSize - 1U) % 4U; #else /* Run the below code for Cortex-M0 */ @@ -128,15 +128,15 @@ void arm_min_q15( uint32_t blkCnt, outIndex; /* loop counter */ /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; - blkCnt = (blockSize - 1u); + blkCnt = (blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize minVal to the next consecutive values one by one */ minVal1 = *pSrc++; diff --git a/Source/StatisticsFunctions/arm_min_q31.c b/Source/StatisticsFunctions/arm_min_q31.c index eb9e0c56..fc4c1556 100644 --- a/Source/StatisticsFunctions/arm_min_q31.c +++ b/Source/StatisticsFunctions/arm_min_q31.c @@ -61,16 +61,16 @@ void arm_min_q31( uint32_t blkCnt, outIndex, count; /* loop counter */ /* Initialise the count value. */ - count = 0u; + count = 0U; /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; /* Loop unrolling */ - blkCnt = (blockSize - 1u) >> 2u; + blkCnt = (blockSize - 1U) >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize minVal to the next consecutive values one by one */ minVal1 = *pSrc++; @@ -81,7 +81,7 @@ void arm_min_q31( { /* Update the minimum value and its index */ out = minVal1; - outIndex = count + 1u; + outIndex = count + 1U; } /* compare for the minimum value */ @@ -89,7 +89,7 @@ void arm_min_q31( { /* Update the minimum value and its index */ out = minVal2; - outIndex = count + 2u; + outIndex = count + 2U; } /* Initialize minVal to the next consecutive values one by one */ @@ -101,7 +101,7 @@ void arm_min_q31( { /* Update the minimum value and its index */ out = minVal1; - outIndex = count + 3u; + outIndex = count + 3U; } /* compare for the minimum value */ @@ -109,17 +109,17 @@ void arm_min_q31( { /* Update the minimum value and its index */ out = minVal2; - outIndex = count + 4u; + outIndex = count + 4U; } - count += 4u; + count += 4U; /* Decrement the loop counter */ blkCnt--; } - /* if (blockSize - 1u) is not multiple of 4 */ - blkCnt = (blockSize - 1u) % 4u; + /* if (blockSize - 1U) is not multiple of 4 */ + blkCnt = (blockSize - 1U) % 4U; #else /* Run the below code for Cortex-M0 */ @@ -128,15 +128,15 @@ void arm_min_q31( uint32_t blkCnt, outIndex; /* loop counter */ /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; - blkCnt = (blockSize - 1u); + blkCnt = (blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize minVal to the next consecutive values one by one */ minVal1 = *pSrc++; diff --git a/Source/StatisticsFunctions/arm_min_q7.c b/Source/StatisticsFunctions/arm_min_q7.c index 41892f19..50362e69 100644 --- a/Source/StatisticsFunctions/arm_min_q7.c +++ b/Source/StatisticsFunctions/arm_min_q7.c @@ -61,16 +61,16 @@ void arm_min_q7( uint32_t blkCnt, outIndex, count; /* loop counter */ /* Initialise the count value. */ - count = 0u; + count = 0U; /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; /* Loop unrolling */ - blkCnt = (blockSize - 1u) >> 2u; + blkCnt = (blockSize - 1U) >> 2U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize minVal to the next consecutive values one by one */ minVal1 = *pSrc++; @@ -81,7 +81,7 @@ void arm_min_q7( { /* Update the minimum value and its index */ out = minVal1; - outIndex = count + 1u; + outIndex = count + 1U; } /* compare for the minimum value */ @@ -89,7 +89,7 @@ void arm_min_q7( { /* Update the minimum value and its index */ out = minVal2; - outIndex = count + 2u; + outIndex = count + 2U; } /* Initialize minVal to the next consecutive values one by one */ @@ -101,7 +101,7 @@ void arm_min_q7( { /* Update the minimum value and its index */ out = minVal1; - outIndex = count + 3u; + outIndex = count + 3U; } /* compare for the minimum value */ @@ -109,17 +109,17 @@ void arm_min_q7( { /* Update the minimum value and its index */ out = minVal2; - outIndex = count + 4u; + outIndex = count + 4U; } - count += 4u; + count += 4U; /* Decrement the loop counter */ blkCnt--; } - /* if (blockSize - 1u) is not multiple of 4 */ - blkCnt = (blockSize - 1u) % 4u; + /* if (blockSize - 1U) is not multiple of 4 */ + blkCnt = (blockSize - 1U) % 4U; #else /* Run the below code for Cortex-M0 */ @@ -128,15 +128,15 @@ void arm_min_q7( uint32_t blkCnt, outIndex; /* loop counter */ /* Initialise the index value to zero. */ - outIndex = 0u; + outIndex = 0U; /* Load first input value that act as reference value for comparision */ out = *pSrc++; - blkCnt = (blockSize - 1u); + blkCnt = (blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Initialize minVal to the next consecutive values one by one */ minVal1 = *pSrc++; diff --git a/Source/StatisticsFunctions/arm_power_f32.c b/Source/StatisticsFunctions/arm_power_f32.c index c7de37c1..1426735b 100644 --- a/Source/StatisticsFunctions/arm_power_f32.c +++ b/Source/StatisticsFunctions/arm_power_f32.c @@ -74,11 +74,11 @@ void arm_power_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute Power and then store the result in a temporary variable, sum. */ @@ -97,7 +97,7 @@ void arm_power_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -109,7 +109,7 @@ void arm_power_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* compute power and then store the result in a temporary variable, sum. */ diff --git a/Source/StatisticsFunctions/arm_power_q15.c b/Source/StatisticsFunctions/arm_power_q15.c index 19a56c00..6d95f4dc 100644 --- a/Source/StatisticsFunctions/arm_power_q15.c +++ b/Source/StatisticsFunctions/arm_power_q15.c @@ -74,11 +74,11 @@ void arm_power_q15( /* loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute Power and then store the result in a temporary variable, sum. */ @@ -93,9 +93,9 @@ void arm_power_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute Power and then store the result in a temporary variable, sum. */ @@ -116,7 +116,7 @@ void arm_power_q15( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute Power and then store the result in a temporary variable, sum. */ diff --git a/Source/StatisticsFunctions/arm_power_q31.c b/Source/StatisticsFunctions/arm_power_q31.c index 9197377a..16be2490 100644 --- a/Source/StatisticsFunctions/arm_power_q31.c +++ b/Source/StatisticsFunctions/arm_power_q31.c @@ -73,25 +73,25 @@ void arm_power_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute Power then shift intermediate results by 14 bits to maintain 16.48 format and then store the result in a temporary variable sum, providing 15 guard bits. */ in = *pSrc++; - sum += ((q63_t) in * in) >> 14u; + sum += ((q63_t) in * in) >> 14U; in = *pSrc++; - sum += ((q63_t) in * in) >> 14u; + sum += ((q63_t) in * in) >> 14U; in = *pSrc++; - sum += ((q63_t) in * in) >> 14u; + sum += ((q63_t) in * in) >> 14U; in = *pSrc++; - sum += ((q63_t) in * in) >> 14u; + sum += ((q63_t) in * in) >> 14U; /* Decrement the loop counter */ blkCnt--; @@ -99,7 +99,7 @@ void arm_power_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ @@ -109,12 +109,12 @@ void arm_power_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute Power and then store the result in a temporary variable, sum. */ in = *pSrc++; - sum += ((q63_t) in * in) >> 14u; + sum += ((q63_t) in * in) >> 14U; /* Decrement the loop counter */ blkCnt--; diff --git a/Source/StatisticsFunctions/arm_power_q7.c b/Source/StatisticsFunctions/arm_power_q7.c index 246f84eb..24306cdc 100644 --- a/Source/StatisticsFunctions/arm_power_q7.c +++ b/Source/StatisticsFunctions/arm_power_q7.c @@ -74,11 +74,11 @@ void arm_power_q7( q31_t in1, in2; /* Temporary variables to store input */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* Reading two inputs of pSrc vector and packing */ input1 = *__SIMD32(pSrc)++; @@ -97,7 +97,7 @@ void arm_power_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ @@ -107,7 +107,7 @@ void arm_power_q7( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute Power and then store the result in a temporary variable, sum. */ diff --git a/Source/StatisticsFunctions/arm_rms_f32.c b/Source/StatisticsFunctions/arm_rms_f32.c index 1e1bb904..8d1b7085 100644 --- a/Source/StatisticsFunctions/arm_rms_f32.c +++ b/Source/StatisticsFunctions/arm_rms_f32.c @@ -74,11 +74,11 @@ void arm_rms_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute sum of the squares and then store the result in a temporary variable, sum */ @@ -97,7 +97,7 @@ void arm_rms_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ @@ -107,7 +107,7 @@ void arm_rms_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute sum of the squares and then store the results in a temporary variable, sum */ diff --git a/Source/StatisticsFunctions/arm_rms_q15.c b/Source/StatisticsFunctions/arm_rms_q15.c index acdd96b2..d0e61ca3 100644 --- a/Source/StatisticsFunctions/arm_rms_q15.c +++ b/Source/StatisticsFunctions/arm_rms_q15.c @@ -70,11 +70,11 @@ void arm_rms_q15( uint32_t blkCnt; /* loop counter */ /* loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute sum of the squares and then store the results in a temporary variable, sum */ @@ -89,9 +89,9 @@ void arm_rms_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute sum of the squares and then store the results in a temporary variable, sum */ @@ -115,7 +115,7 @@ void arm_rms_q15( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute sum of the squares and then store the results in a temporary variable, sum */ diff --git a/Source/StatisticsFunctions/arm_rms_q31.c b/Source/StatisticsFunctions/arm_rms_q31.c index 7115d157..cb3c58e9 100644 --- a/Source/StatisticsFunctions/arm_rms_q31.c +++ b/Source/StatisticsFunctions/arm_rms_q31.c @@ -73,11 +73,11 @@ void arm_rms_q31( q31_t in1, in2, in3, in4; /* Temporary input variables */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 8 outputs at a time. ** a second loop below computes the remaining 1 to 7 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute sum of the squares and then store the result in a temporary variable, sum */ @@ -99,7 +99,7 @@ void arm_rms_q31( /* update source buffer to process next samples */ - pSrc += 4u; + pSrc += 4U; /* Decrement the loop counter */ blkCnt--; @@ -107,7 +107,7 @@ void arm_rms_q31( /* If the blockSize is not a multiple of 8, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 */ @@ -116,7 +116,7 @@ void arm_rms_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ /* Compute sum of the squares and then store the results in a temporary variable, sum */ diff --git a/Source/StatisticsFunctions/arm_std_f32.c b/Source/StatisticsFunctions/arm_std_f32.c index f782ed6d..9750b88b 100644 --- a/Source/StatisticsFunctions/arm_std_f32.c +++ b/Source/StatisticsFunctions/arm_std_f32.c @@ -79,7 +79,7 @@ void arm_std_f32( float32_t var; /* Temporary varaince storage */ #endif - if (blockSize == 1u) + if (blockSize == 1U) { *pResult = 0; return; @@ -89,11 +89,11 @@ void arm_std_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples @@ -117,9 +117,9 @@ void arm_std_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples @@ -152,7 +152,7 @@ void arm_std_f32( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples diff --git a/Source/StatisticsFunctions/arm_std_q15.c b/Source/StatisticsFunctions/arm_std_q15.c index fe4e602a..2f2f52e1 100644 --- a/Source/StatisticsFunctions/arm_std_q15.c +++ b/Source/StatisticsFunctions/arm_std_q15.c @@ -73,7 +73,7 @@ void arm_std_q15( q15_t in; /* input value */ #endif - if (blockSize == 1u) + if (blockSize == 1U) { *pResult = 0; return; @@ -83,22 +83,22 @@ void arm_std_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples * and then store the result in a temporary variable, sum. */ in = *__SIMD32(pSrc)++; - sum += ((in << 16u) >> 16u); - sum += (in >> 16u); + sum += ((in << 16U) >> 16U); + sum += (in >> 16U); sumOfSquares = __SMLALD(in, in, sumOfSquares); in = *__SIMD32(pSrc)++; - sum += ((in << 16u) >> 16u); - sum += (in >> 16u); + sum += ((in << 16U) >> 16U); + sum += (in >> 16U); sumOfSquares = __SMLALD(in, in, sumOfSquares); /* Decrement the loop counter */ @@ -107,9 +107,9 @@ void arm_std_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples @@ -124,14 +124,14 @@ void arm_std_q15( /* Compute Mean of squares of the input samples * and then store the result in a temporary variable, meanOfSquares. */ - meanOfSquares = (q31_t)(sumOfSquares / (q63_t)(blockSize - 1u)); + meanOfSquares = (q31_t)(sumOfSquares / (q63_t)(blockSize - 1U)); /* Compute square of mean */ - squareOfMean = (q31_t)((q63_t)sum * sum / (q63_t)(blockSize * (blockSize - 1u))); + squareOfMean = (q31_t)((q63_t)sum * sum / (q63_t)(blockSize * (blockSize - 1U))); /* mean of the squares minus the square of the mean. */ /* Compute standard deviation and store the result to the destination */ - arm_sqrt_q15(__SSAT((meanOfSquares - squareOfMean) >> 15u, 16u), pResult); + arm_sqrt_q15(__SSAT((meanOfSquares - squareOfMean) >> 15U, 16U), pResult); #else /* Run the below code for Cortex-M0 */ @@ -139,7 +139,7 @@ void arm_std_q15( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples @@ -157,14 +157,14 @@ void arm_std_q15( /* Compute Mean of squares of the input samples * and then store the result in a temporary variable, meanOfSquares. */ - meanOfSquares = (q31_t)(sumOfSquares / (q63_t)(blockSize - 1u)); + meanOfSquares = (q31_t)(sumOfSquares / (q63_t)(blockSize - 1U)); /* Compute square of mean */ - squareOfMean = (q31_t)((q63_t)sum * sum / (q63_t)(blockSize * (blockSize - 1u))); + squareOfMean = (q31_t)((q63_t)sum * sum / (q63_t)(blockSize * (blockSize - 1U))); /* mean of the squares minus the square of the mean. */ /* Compute standard deviation and store the result to the destination */ - arm_sqrt_q15(__SSAT((meanOfSquares - squareOfMean) >> 15u, 16u), pResult); + arm_sqrt_q15(__SSAT((meanOfSquares - squareOfMean) >> 15U, 16U), pResult); #endif /* #if defined (ARM_MATH_DSP) */ } diff --git a/Source/StatisticsFunctions/arm_std_q31.c b/Source/StatisticsFunctions/arm_std_q31.c index a88fc831..f02cbdde 100644 --- a/Source/StatisticsFunctions/arm_std_q31.c +++ b/Source/StatisticsFunctions/arm_std_q31.c @@ -72,7 +72,7 @@ void arm_std_q31( uint32_t blkCnt; /* loop counter */ q63_t sumOfSquares = 0; /* Accumulator */ - if (blockSize == 1u) + if (blockSize == 1U) { *pResult = 0; return; @@ -82,25 +82,25 @@ void arm_std_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples * and then store the result in a temporary variable, sum. */ - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); @@ -110,14 +110,14 @@ void arm_std_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples * and then store the result in a temporary variable, sum. */ - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); @@ -127,7 +127,7 @@ void arm_std_q31( /* Compute Mean of squares of the input samples * and then store the result in a temporary variable, meanOfSquares. */ - meanOfSquares = sumOfSquares / (q63_t)(blockSize - 1u); + meanOfSquares = sumOfSquares / (q63_t)(blockSize - 1U); #else /* Run the below code for Cortex-M0 */ @@ -135,12 +135,12 @@ void arm_std_q31( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples * and then store the result in a temporary variable, sumOfSquares. */ - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sumOfSquares += ((q63_t) (in) * (in)); /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ @@ -153,15 +153,15 @@ void arm_std_q31( /* Compute Mean of squares of the input samples * and then store the result in a temporary variable, meanOfSquares. */ - meanOfSquares = sumOfSquares / (q63_t)(blockSize - 1u); + meanOfSquares = sumOfSquares / (q63_t)(blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ /* Compute square of mean */ - squareOfMean = sum * sum / (q63_t)(blockSize * (blockSize - 1u)); + squareOfMean = sum * sum / (q63_t)(blockSize * (blockSize - 1U)); /* Compute standard deviation and then store the result to the destination */ - arm_sqrt_q31((meanOfSquares - squareOfMean) >> 15u, pResult); + arm_sqrt_q31((meanOfSquares - squareOfMean) >> 15U, pResult); } /** diff --git a/Source/StatisticsFunctions/arm_var_f32.c b/Source/StatisticsFunctions/arm_var_f32.c index e43f80cb..c0f731de 100644 --- a/Source/StatisticsFunctions/arm_var_f32.c +++ b/Source/StatisticsFunctions/arm_var_f32.c @@ -76,7 +76,7 @@ void arm_var_f32( float32_t in1, in2, in3, in4; #endif - if (blockSize <= 1u) + if (blockSize <= 1U) { *pResult = 0; return; @@ -86,11 +86,11 @@ void arm_var_f32( /* Run the below code for Cortex-M4 and Cortex-M7 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ in1 = *pInput++; @@ -109,7 +109,7 @@ void arm_var_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 or Cortex-M3 */ @@ -119,7 +119,7 @@ void arm_var_f32( #endif - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ sum += *pInput++; @@ -136,11 +136,11 @@ void arm_var_f32( #if defined(ARM_MATH_DSP) /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { fValue = *pInput++ - fMean; fSum += fValue * fValue; @@ -155,7 +155,7 @@ void arm_var_f32( blkCnt--; } - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else /* Run the below code for Cortex-M0 or Cortex-M3 */ @@ -163,7 +163,7 @@ void arm_var_f32( blkCnt = blockSize; #endif - while (blkCnt > 0u) + while (blkCnt > 0U) { fValue = *pInput++ - fMean; fSum += fValue * fValue; diff --git a/Source/StatisticsFunctions/arm_var_q15.c b/Source/StatisticsFunctions/arm_var_q15.c index 4b2c267b..5ba61f70 100644 --- a/Source/StatisticsFunctions/arm_var_q15.c +++ b/Source/StatisticsFunctions/arm_var_q15.c @@ -73,7 +73,7 @@ void arm_var_q15( q15_t in; /* input value */ #endif - if (blockSize == 1u) + if (blockSize == 1U) { *pResult = 0; return; @@ -83,22 +83,22 @@ void arm_var_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples * and then store the result in a temporary variable, sum. */ in = *__SIMD32(pSrc)++; - sum += ((in << 16u) >> 16u); - sum += (in >> 16u); + sum += ((in << 16U) >> 16U); + sum += (in >> 16U); sumOfSquares = __SMLALD(in, in, sumOfSquares); in = *__SIMD32(pSrc)++; - sum += ((in << 16u) >> 16u); - sum += (in >> 16u); + sum += ((in << 16U) >> 16U); + sum += (in >> 16U); sumOfSquares = __SMLALD(in, in, sumOfSquares); /* Decrement the loop counter */ @@ -107,9 +107,9 @@ void arm_var_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples @@ -124,13 +124,13 @@ void arm_var_q15( /* Compute Mean of squares of the input samples * and then store the result in a temporary variable, meanOfSquares. */ - meanOfSquares = (q31_t)(sumOfSquares / (q63_t)(blockSize - 1u)); + meanOfSquares = (q31_t)(sumOfSquares / (q63_t)(blockSize - 1U)); /* Compute square of mean */ - squareOfMean = (q31_t)((q63_t)sum * sum / (q63_t)(blockSize * (blockSize - 1u))); + squareOfMean = (q31_t)((q63_t)sum * sum / (q63_t)(blockSize * (blockSize - 1U))); /* mean of the squares minus the square of the mean. */ - *pResult = (meanOfSquares - squareOfMean) >> 15u; + *pResult = (meanOfSquares - squareOfMean) >> 15U; #else /* Run the below code for Cortex-M0 */ @@ -138,7 +138,7 @@ void arm_var_q15( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples @@ -156,10 +156,10 @@ void arm_var_q15( /* Compute Mean of squares of the input samples * and then store the result in a temporary variable, meanOfSquares. */ - meanOfSquares = (q31_t)(sumOfSquares / (q63_t)(blockSize - 1u)); + meanOfSquares = (q31_t)(sumOfSquares / (q63_t)(blockSize - 1U)); /* Compute square of mean */ - squareOfMean = (q31_t)((q63_t)sum * sum / (q63_t)(blockSize * (blockSize - 1u))); + squareOfMean = (q31_t)((q63_t)sum * sum / (q63_t)(blockSize * (blockSize - 1U))); /* mean of the squares minus the square of the mean. */ *pResult = (meanOfSquares - squareOfMean) >> 15; diff --git a/Source/StatisticsFunctions/arm_var_q31.c b/Source/StatisticsFunctions/arm_var_q31.c index 1a23ee14..526c6cd8 100644 --- a/Source/StatisticsFunctions/arm_var_q31.c +++ b/Source/StatisticsFunctions/arm_var_q31.c @@ -72,7 +72,7 @@ void arm_var_q31( uint32_t blkCnt; /* loop counter */ q63_t sumOfSquares = 0; /* Accumulator */ - if (blockSize == 1u) + if (blockSize == 1U) { *pResult = 0; return; @@ -82,25 +82,25 @@ void arm_var_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples * and then store the result in a temporary variable, sum. */ - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); @@ -110,14 +110,14 @@ void arm_var_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples * and then store the result in a temporary variable, sum. */ - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sum += in; sumOfSquares += ((q63_t) (in) * (in)); @@ -127,7 +127,7 @@ void arm_var_q31( /* Compute Mean of squares of the input samples * and then store the result in a temporary variable, meanOfSquares. */ - meanOfSquares = sumOfSquares / (q63_t)(blockSize - 1u); + meanOfSquares = sumOfSquares / (q63_t)(blockSize - 1U); #else /* Run the below code for Cortex-M0 */ @@ -135,12 +135,12 @@ void arm_var_q31( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1]) */ /* Compute Sum of squares of the input samples * and then store the result in a temporary variable, sumOfSquares. */ - in = *pSrc++ >> 8u; + in = *pSrc++ >> 8U; sumOfSquares += ((q63_t) (in) * (in)); /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ @@ -153,15 +153,15 @@ void arm_var_q31( /* Compute Mean of squares of the input samples * and then store the result in a temporary variable, meanOfSquares. */ - meanOfSquares = sumOfSquares / (q63_t)(blockSize - 1u); + meanOfSquares = sumOfSquares / (q63_t)(blockSize - 1U); #endif /* #if defined (ARM_MATH_DSP) */ /* Compute square of mean */ - squareOfMean = sum * sum / (q63_t)(blockSize * (blockSize - 1u)); + squareOfMean = sum * sum / (q63_t)(blockSize * (blockSize - 1U)); /* Compute standard deviation and then store the result to the destination */ - *pResult = (meanOfSquares - squareOfMean) >> 15u; + *pResult = (meanOfSquares - squareOfMean) >> 15U; } /** diff --git a/Source/SupportFunctions/arm_copy_f32.c b/Source/SupportFunctions/arm_copy_f32.c index 328696dd..1e2b5cfc 100644 --- a/Source/SupportFunctions/arm_copy_f32.c +++ b/Source/SupportFunctions/arm_copy_f32.c @@ -72,11 +72,11 @@ void arm_copy_f32( float32_t in1, in2, in3, in4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A */ /* Copy and then store the results in the destination buffer */ @@ -96,7 +96,7 @@ void arm_copy_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -107,7 +107,7 @@ void arm_copy_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A */ /* Copy and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_copy_q15.c b/Source/SupportFunctions/arm_copy_q15.c index f0d01599..0d2fffbb 100644 --- a/Source/SupportFunctions/arm_copy_q15.c +++ b/Source/SupportFunctions/arm_copy_q15.c @@ -57,11 +57,11 @@ void arm_copy_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A */ /* Read two inputs */ @@ -74,7 +74,7 @@ void arm_copy_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -86,7 +86,7 @@ void arm_copy_q15( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A */ /* Copy and then store the value in the destination buffer */ diff --git a/Source/SupportFunctions/arm_copy_q31.c b/Source/SupportFunctions/arm_copy_q31.c index 50d5aac2..5bf89348 100644 --- a/Source/SupportFunctions/arm_copy_q31.c +++ b/Source/SupportFunctions/arm_copy_q31.c @@ -60,11 +60,11 @@ void arm_copy_q31( q31_t in1, in2, in3, in4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A */ /* Copy and then store the values in the destination buffer */ @@ -84,7 +84,7 @@ void arm_copy_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -95,7 +95,7 @@ void arm_copy_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A */ /* Copy and then store the value in the destination buffer */ diff --git a/Source/SupportFunctions/arm_copy_q7.c b/Source/SupportFunctions/arm_copy_q7.c index 040ef1e6..5c737cd7 100644 --- a/Source/SupportFunctions/arm_copy_q7.c +++ b/Source/SupportFunctions/arm_copy_q7.c @@ -58,11 +58,11 @@ void arm_copy_q7( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A */ /* Copy and then store the results in the destination buffer */ @@ -75,7 +75,7 @@ void arm_copy_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -87,7 +87,7 @@ void arm_copy_q7( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = A */ /* Copy and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_fill_f32.c b/Source/SupportFunctions/arm_fill_f32.c index a26a6dc8..be749c8d 100644 --- a/Source/SupportFunctions/arm_fill_f32.c +++ b/Source/SupportFunctions/arm_fill_f32.c @@ -75,11 +75,11 @@ void arm_fill_f32( float32_t in4 = value; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = value */ /* Fill the value in the destination buffer */ @@ -94,7 +94,7 @@ void arm_fill_f32( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -106,7 +106,7 @@ void arm_fill_f32( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = value */ /* Fill the value in the destination buffer */ diff --git a/Source/SupportFunctions/arm_fill_q15.c b/Source/SupportFunctions/arm_fill_q15.c index 324a346b..27eb42c7 100644 --- a/Source/SupportFunctions/arm_fill_q15.c +++ b/Source/SupportFunctions/arm_fill_q15.c @@ -61,14 +61,14 @@ void arm_fill_q15( /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* Packing two 16 bit values to 32 bit value in order to use SIMD */ - packedValue = __PKHBT(value, value, 16u); + packedValue = __PKHBT(value, value, 16U); /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = value */ /* Fill the value in the destination buffer */ @@ -81,7 +81,7 @@ void arm_fill_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -92,7 +92,7 @@ void arm_fill_q15( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = value */ /* Fill the value in the destination buffer */ diff --git a/Source/SupportFunctions/arm_fill_q31.c b/Source/SupportFunctions/arm_fill_q31.c index 18de6390..397a7b5b 100644 --- a/Source/SupportFunctions/arm_fill_q31.c +++ b/Source/SupportFunctions/arm_fill_q31.c @@ -63,11 +63,11 @@ void arm_fill_q31( q31_t in4 = value; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = value */ /* Fill the value in the destination buffer */ @@ -82,7 +82,7 @@ void arm_fill_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -93,7 +93,7 @@ void arm_fill_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = value */ /* Fill the value in the destination buffer */ diff --git a/Source/SupportFunctions/arm_fill_q7.c b/Source/SupportFunctions/arm_fill_q7.c index 9f1ccd03..dffdf970 100644 --- a/Source/SupportFunctions/arm_fill_q7.c +++ b/Source/SupportFunctions/arm_fill_q7.c @@ -60,14 +60,14 @@ void arm_fill_q7( q31_t packedValue; /* value packed to 32 bits */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* Packing four 8 bit values to 32 bit value in order to use SIMD */ packedValue = __PACKq7(value, value, value, value); /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = value */ /* Fill the value in the destination buffer */ @@ -79,7 +79,7 @@ void arm_fill_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -90,7 +90,7 @@ void arm_fill_q7( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = value */ /* Fill the value in the destination buffer */ diff --git a/Source/SupportFunctions/arm_float_to_q15.c b/Source/SupportFunctions/arm_float_to_q15.c index 69fb1e2e..0aa20f1c 100644 --- a/Source/SupportFunctions/arm_float_to_q15.c +++ b/Source/SupportFunctions/arm_float_to_q15.c @@ -80,11 +80,11 @@ void arm_float_to_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { #ifdef ARM_MATH_ROUNDING @@ -127,9 +127,9 @@ void arm_float_to_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { #ifdef ARM_MATH_ROUNDING @@ -160,7 +160,7 @@ void arm_float_to_q15( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { #ifdef ARM_MATH_ROUNDING diff --git a/Source/SupportFunctions/arm_float_to_q31.c b/Source/SupportFunctions/arm_float_to_q31.c index bbba3352..d17cc3ad 100644 --- a/Source/SupportFunctions/arm_float_to_q31.c +++ b/Source/SupportFunctions/arm_float_to_q31.c @@ -84,11 +84,11 @@ void arm_float_to_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { #ifdef ARM_MATH_ROUNDING @@ -132,9 +132,9 @@ void arm_float_to_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { #ifdef ARM_MATH_ROUNDING @@ -166,7 +166,7 @@ void arm_float_to_q31( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { #ifdef ARM_MATH_ROUNDING diff --git a/Source/SupportFunctions/arm_float_to_q7.c b/Source/SupportFunctions/arm_float_to_q7.c index 6a232a87..6629a697 100644 --- a/Source/SupportFunctions/arm_float_to_q7.c +++ b/Source/SupportFunctions/arm_float_to_q7.c @@ -79,11 +79,11 @@ void arm_float_to_q7( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { #ifdef ARM_MATH_ROUNDING @@ -126,9 +126,9 @@ void arm_float_to_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; - while (blkCnt > 0u) + while (blkCnt > 0U) { #ifdef ARM_MATH_ROUNDING @@ -160,7 +160,7 @@ void arm_float_to_q7( /* Loop over blockSize number of values */ blkCnt = blockSize; - while (blkCnt > 0u) + while (blkCnt > 0U) { #ifdef ARM_MATH_ROUNDING /* C = A * 128 */ diff --git a/Source/SupportFunctions/arm_q15_to_float.c b/Source/SupportFunctions/arm_q15_to_float.c index 5394a4c2..48ef9477 100644 --- a/Source/SupportFunctions/arm_q15_to_float.c +++ b/Source/SupportFunctions/arm_q15_to_float.c @@ -76,11 +76,11 @@ void arm_q15_to_float( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (float32_t) A / 32768 */ /* convert from q15 to float and then store the results in the destination buffer */ @@ -95,7 +95,7 @@ void arm_q15_to_float( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -106,7 +106,7 @@ void arm_q15_to_float( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (float32_t) A / 32768 */ /* convert from q15 to float and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_q15_to_q31.c b/Source/SupportFunctions/arm_q15_to_q31.c index f6ba7876..bf139a81 100644 --- a/Source/SupportFunctions/arm_q15_to_q31.c +++ b/Source/SupportFunctions/arm_q15_to_q31.c @@ -70,11 +70,11 @@ void arm_q15_to_q31( q31_t out1, out2, out3, out4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q31_t)A << 16 */ /* convert from q15 to q31 and then store the results in the destination buffer */ @@ -84,11 +84,11 @@ void arm_q15_to_q31( #ifndef ARM_MATH_BIG_ENDIAN /* extract lower 16 bits to 32 bit result */ - out1 = in1 << 16u; + out1 = in1 << 16U; /* extract upper 16 bits to 32 bit result */ out2 = in1 & 0xFFFF0000; /* extract lower 16 bits to 32 bit result */ - out3 = in2 << 16u; + out3 = in2 << 16U; /* extract upper 16 bits to 32 bit result */ out4 = in2 & 0xFFFF0000; @@ -97,11 +97,11 @@ void arm_q15_to_q31( /* extract upper 16 bits to 32 bit result */ out1 = in1 & 0xFFFF0000; /* extract lower 16 bits to 32 bit result */ - out2 = in1 << 16u; + out2 = in1 << 16U; /* extract upper 16 bits to 32 bit result */ out3 = in2 & 0xFFFF0000; /* extract lower 16 bits to 32 bit result */ - out4 = in2 << 16u; + out4 = in2 << 16U; #endif // #ifndef ARM_MATH_BIG_ENDIAN @@ -116,7 +116,7 @@ void arm_q15_to_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -127,7 +127,7 @@ void arm_q15_to_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q31_t)A << 16 */ /* convert from q15 to q31 and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_q15_to_q7.c b/Source/SupportFunctions/arm_q15_to_q7.c index 6f19eecb..7a45e588 100644 --- a/Source/SupportFunctions/arm_q15_to_q7.c +++ b/Source/SupportFunctions/arm_q15_to_q7.c @@ -71,11 +71,11 @@ void arm_q15_to_q7( q31_t out1, out2; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q7_t) A >> 8 */ /* convert from q15 to q7 and then store the results in the destination buffer */ @@ -114,7 +114,7 @@ void arm_q15_to_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -125,7 +125,7 @@ void arm_q15_to_q7( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q7_t) A >> 8 */ /* convert from q15 to q7 and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_q31_to_float.c b/Source/SupportFunctions/arm_q31_to_float.c index 5a0360a9..d2d75052 100644 --- a/Source/SupportFunctions/arm_q31_to_float.c +++ b/Source/SupportFunctions/arm_q31_to_float.c @@ -73,11 +73,11 @@ void arm_q31_to_float( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (float32_t) A / 2147483648 */ /* convert from q31 to float and then store the results in the destination buffer */ @@ -92,7 +92,7 @@ void arm_q31_to_float( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -103,7 +103,7 @@ void arm_q31_to_float( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (float32_t) A / 2147483648 */ /* convert from q31 to float and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_q31_to_q15.c b/Source/SupportFunctions/arm_q31_to_q15.c index c2d1fafe..c460fe78 100644 --- a/Source/SupportFunctions/arm_q31_to_q15.c +++ b/Source/SupportFunctions/arm_q31_to_q15.c @@ -70,11 +70,11 @@ void arm_q31_to_q15( q31_t out1, out2; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q15_t) A >> 16 */ /* convert from q31 to q15 and then store the results in the destination buffer */ @@ -105,7 +105,7 @@ void arm_q31_to_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -116,7 +116,7 @@ void arm_q31_to_q15( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q15_t) A >> 16 */ /* convert from q31 to q15 and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_q31_to_q7.c b/Source/SupportFunctions/arm_q31_to_q7.c index 04d328d1..f092bed1 100644 --- a/Source/SupportFunctions/arm_q31_to_q7.c +++ b/Source/SupportFunctions/arm_q31_to_q7.c @@ -70,11 +70,11 @@ void arm_q31_to_q7( q7_t out1, out2, out3, out4; /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q7_t) A >> 24 */ /* convert from q31 to q7 and then store the results in the destination buffer */ @@ -96,7 +96,7 @@ void arm_q31_to_q7( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -107,7 +107,7 @@ void arm_q31_to_q7( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q7_t) A >> 24 */ /* convert from q31 to q7 and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_q7_to_float.c b/Source/SupportFunctions/arm_q7_to_float.c index 9238ba29..ace437fc 100644 --- a/Source/SupportFunctions/arm_q7_to_float.c +++ b/Source/SupportFunctions/arm_q7_to_float.c @@ -73,11 +73,11 @@ void arm_q7_to_float( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (float32_t) A / 128 */ /* convert from q7 to float and then store the results in the destination buffer */ @@ -92,7 +92,7 @@ void arm_q7_to_float( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -103,7 +103,7 @@ void arm_q7_to_float( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (float32_t) A / 128 */ /* convert from q7 to float and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_q7_to_q15.c b/Source/SupportFunctions/arm_q7_to_q15.c index 4651ee9c..53481943 100644 --- a/Source/SupportFunctions/arm_q7_to_q15.c +++ b/Source/SupportFunctions/arm_q7_to_q15.c @@ -74,11 +74,11 @@ void arm_q7_to_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q15_t) A << 8 */ /* convert from q7 to q15 and then store the results in the destination buffer */ @@ -90,8 +90,8 @@ void arm_q7_to_q15( /* extend remainig two q7_t values to q15_t values */ in2 = __SXTB16(in); - in1 = in1 << 8u; - in2 = in2 << 8u; + in1 = in1 << 8U; + in2 = in2 << 8U; in1 = in1 & 0xFF00FF00; in2 = in2 & 0xFF00FF00; @@ -117,7 +117,7 @@ void arm_q7_to_q15( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -128,7 +128,7 @@ void arm_q7_to_q15( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q15_t) A << 8 */ /* convert from q7 to q15 and then store the results in the destination buffer */ diff --git a/Source/SupportFunctions/arm_q7_to_q31.c b/Source/SupportFunctions/arm_q7_to_q31.c index 6fafc8f2..27d0952a 100644 --- a/Source/SupportFunctions/arm_q7_to_q31.c +++ b/Source/SupportFunctions/arm_q7_to_q31.c @@ -70,11 +70,11 @@ void arm_q7_to_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /*loop Unrolling */ - blkCnt = blockSize >> 2u; + blkCnt = blockSize >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q31_t) A << 24 */ /* convert from q7 to q31 and then store the results in the destination buffer */ @@ -102,7 +102,7 @@ void arm_q7_to_q31( /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - blkCnt = blockSize % 0x4u; + blkCnt = blockSize % 0x4U; #else @@ -113,7 +113,7 @@ void arm_q7_to_q31( #endif /* #if defined (ARM_MATH_DSP) */ - while (blkCnt > 0u) + while (blkCnt > 0U) { /* C = (q31_t) A << 24 */ /* convert from q7 to q31 and then store the results in the destination buffer */ diff --git a/Source/TransformFunctions/arm_bitreversal.c b/Source/TransformFunctions/arm_bitreversal.c index 206e409c..cea48212 100644 --- a/Source/TransformFunctions/arm_bitreversal.c +++ b/Source/TransformFunctions/arm_bitreversal.c @@ -49,47 +49,47 @@ uint16_t * pBitRevTab) float32_t in; /* Initializations */ - j = 0u; - fftLenBy2 = fftSize >> 1u; - fftLenBy2p1 = (fftSize >> 1u) + 1u; + j = 0U; + fftLenBy2 = fftSize >> 1U; + fftLenBy2p1 = (fftSize >> 1U) + 1U; /* Bit Reversal Implementation */ - for (i = 0u; i <= (fftLenBy2 - 2u); i += 2u) + for (i = 0U; i <= (fftLenBy2 - 2U); i += 2U) { if (i < j) { /* pSrc[i] <-> pSrc[j]; */ - in = pSrc[2u * i]; - pSrc[2u * i] = pSrc[2u * j]; - pSrc[2u * j] = in; + in = pSrc[2U * i]; + pSrc[2U * i] = pSrc[2U * j]; + pSrc[2U * j] = in; - /* pSrc[i+1u] <-> pSrc[j+1u] */ - in = pSrc[(2u * i) + 1u]; - pSrc[(2u * i) + 1u] = pSrc[(2u * j) + 1u]; - pSrc[(2u * j) + 1u] = in; + /* pSrc[i+1U] <-> pSrc[j+1U] */ + in = pSrc[(2U * i) + 1U]; + pSrc[(2U * i) + 1U] = pSrc[(2U * j) + 1U]; + pSrc[(2U * j) + 1U] = in; /* pSrc[i+fftLenBy2p1] <-> pSrc[j+fftLenBy2p1] */ - in = pSrc[2u * (i + fftLenBy2p1)]; - pSrc[2u * (i + fftLenBy2p1)] = pSrc[2u * (j + fftLenBy2p1)]; - pSrc[2u * (j + fftLenBy2p1)] = in; + in = pSrc[2U * (i + fftLenBy2p1)]; + pSrc[2U * (i + fftLenBy2p1)] = pSrc[2U * (j + fftLenBy2p1)]; + pSrc[2U * (j + fftLenBy2p1)] = in; - /* pSrc[i+fftLenBy2p1+1u] <-> pSrc[j+fftLenBy2p1+1u] */ - in = pSrc[(2u * (i + fftLenBy2p1)) + 1u]; - pSrc[(2u * (i + fftLenBy2p1)) + 1u] = - pSrc[(2u * (j + fftLenBy2p1)) + 1u]; - pSrc[(2u * (j + fftLenBy2p1)) + 1u] = in; + /* pSrc[i+fftLenBy2p1+1U] <-> pSrc[j+fftLenBy2p1+1U] */ + in = pSrc[(2U * (i + fftLenBy2p1)) + 1U]; + pSrc[(2U * (i + fftLenBy2p1)) + 1U] = + pSrc[(2U * (j + fftLenBy2p1)) + 1U]; + pSrc[(2U * (j + fftLenBy2p1)) + 1U] = in; } - /* pSrc[i+1u] <-> pSrc[j+1u] */ - in = pSrc[2u * (i + 1u)]; - pSrc[2u * (i + 1u)] = pSrc[2u * (j + fftLenBy2)]; - pSrc[2u * (j + fftLenBy2)] = in; + /* pSrc[i+1U] <-> pSrc[j+1U] */ + in = pSrc[2U * (i + 1U)]; + pSrc[2U * (i + 1U)] = pSrc[2U * (j + fftLenBy2)]; + pSrc[2U * (j + fftLenBy2)] = in; - /* pSrc[i+2u] <-> pSrc[j+2u] */ - in = pSrc[(2u * (i + 1u)) + 1u]; - pSrc[(2u * (i + 1u)) + 1u] = pSrc[(2u * (j + fftLenBy2)) + 1u]; - pSrc[(2u * (j + fftLenBy2)) + 1u] = in; + /* pSrc[i+2U] <-> pSrc[j+2U] */ + in = pSrc[(2U * (i + 1U)) + 1U]; + pSrc[(2U * (i + 1U)) + 1U] = pSrc[(2U * (j + fftLenBy2)) + 1U]; + pSrc[(2U * (j + fftLenBy2)) + 1U] = in; /* Reading the index for the bit reversal */ j = *pBitRevTab; @@ -120,47 +120,47 @@ uint16_t * pBitRevTable) q31_t in; /* Initializations */ - j = 0u; - fftLenBy2 = fftLen / 2u; - fftLenBy2p1 = (fftLen / 2u) + 1u; + j = 0U; + fftLenBy2 = fftLen / 2U; + fftLenBy2p1 = (fftLen / 2U) + 1U; /* Bit Reversal Implementation */ - for (i = 0u; i <= (fftLenBy2 - 2u); i += 2u) + for (i = 0U; i <= (fftLenBy2 - 2U); i += 2U) { if (i < j) { /* pSrc[i] <-> pSrc[j]; */ - in = pSrc[2u * i]; - pSrc[2u * i] = pSrc[2u * j]; - pSrc[2u * j] = in; + in = pSrc[2U * i]; + pSrc[2U * i] = pSrc[2U * j]; + pSrc[2U * j] = in; - /* pSrc[i+1u] <-> pSrc[j+1u] */ - in = pSrc[(2u * i) + 1u]; - pSrc[(2u * i) + 1u] = pSrc[(2u * j) + 1u]; - pSrc[(2u * j) + 1u] = in; + /* pSrc[i+1U] <-> pSrc[j+1U] */ + in = pSrc[(2U * i) + 1U]; + pSrc[(2U * i) + 1U] = pSrc[(2U * j) + 1U]; + pSrc[(2U * j) + 1U] = in; /* pSrc[i+fftLenBy2p1] <-> pSrc[j+fftLenBy2p1] */ - in = pSrc[2u * (i + fftLenBy2p1)]; - pSrc[2u * (i + fftLenBy2p1)] = pSrc[2u * (j + fftLenBy2p1)]; - pSrc[2u * (j + fftLenBy2p1)] = in; + in = pSrc[2U * (i + fftLenBy2p1)]; + pSrc[2U * (i + fftLenBy2p1)] = pSrc[2U * (j + fftLenBy2p1)]; + pSrc[2U * (j + fftLenBy2p1)] = in; - /* pSrc[i+fftLenBy2p1+1u] <-> pSrc[j+fftLenBy2p1+1u] */ - in = pSrc[(2u * (i + fftLenBy2p1)) + 1u]; - pSrc[(2u * (i + fftLenBy2p1)) + 1u] = - pSrc[(2u * (j + fftLenBy2p1)) + 1u]; - pSrc[(2u * (j + fftLenBy2p1)) + 1u] = in; + /* pSrc[i+fftLenBy2p1+1U] <-> pSrc[j+fftLenBy2p1+1U] */ + in = pSrc[(2U * (i + fftLenBy2p1)) + 1U]; + pSrc[(2U * (i + fftLenBy2p1)) + 1U] = + pSrc[(2U * (j + fftLenBy2p1)) + 1U]; + pSrc[(2U * (j + fftLenBy2p1)) + 1U] = in; } - /* pSrc[i+1u] <-> pSrc[j+1u] */ - in = pSrc[2u * (i + 1u)]; - pSrc[2u * (i + 1u)] = pSrc[2u * (j + fftLenBy2)]; - pSrc[2u * (j + fftLenBy2)] = in; + /* pSrc[i+1U] <-> pSrc[j+1U] */ + in = pSrc[2U * (i + 1U)]; + pSrc[2U * (i + 1U)] = pSrc[2U * (j + fftLenBy2)]; + pSrc[2U * (j + fftLenBy2)] = in; - /* pSrc[i+2u] <-> pSrc[j+2u] */ - in = pSrc[(2u * (i + 1u)) + 1u]; - pSrc[(2u * (i + 1u)) + 1u] = pSrc[(2u * (j + fftLenBy2)) + 1u]; - pSrc[(2u * (j + fftLenBy2)) + 1u] = in; + /* pSrc[i+2U] <-> pSrc[j+2U] */ + in = pSrc[(2U * (i + 1U)) + 1U]; + pSrc[(2U * (i + 1U)) + 1U] = pSrc[(2U * (j + fftLenBy2)) + 1U]; + pSrc[(2U * (j + fftLenBy2)) + 1U] = in; /* Reading the index for the bit reversal */ j = *pBitRevTable; @@ -193,32 +193,32 @@ uint16_t * pBitRevTab) uint32_t i, j; /* Initializations */ - j = 0u; - fftLenBy2 = fftLen / 2u; - fftLenBy2p1 = (fftLen / 2u) + 1u; + j = 0U; + fftLenBy2 = fftLen / 2U; + fftLenBy2p1 = (fftLen / 2U) + 1U; /* Bit Reversal Implementation */ - for (i = 0u; i <= (fftLenBy2 - 2u); i += 2u) + for (i = 0U; i <= (fftLenBy2 - 2U); i += 2U) { if (i < j) { /* pSrc[i] <-> pSrc[j]; */ - /* pSrc[i+1u] <-> pSrc[j+1u] */ + /* pSrc[i+1U] <-> pSrc[j+1U] */ in = pSrc[i]; pSrc[i] = pSrc[j]; pSrc[j] = in; /* pSrc[i + fftLenBy2p1] <-> pSrc[j + fftLenBy2p1]; */ - /* pSrc[i + fftLenBy2p1+1u] <-> pSrc[j + fftLenBy2p1+1u] */ + /* pSrc[i + fftLenBy2p1+1U] <-> pSrc[j + fftLenBy2p1+1U] */ in = pSrc[i + fftLenBy2p1]; pSrc[i + fftLenBy2p1] = pSrc[j + fftLenBy2p1]; pSrc[j + fftLenBy2p1] = in; } - /* pSrc[i+1u] <-> pSrc[j+fftLenBy2]; */ - /* pSrc[i+2] <-> pSrc[j+fftLenBy2+1u] */ - in = pSrc[i + 1u]; - pSrc[i + 1u] = pSrc[j + fftLenBy2]; + /* pSrc[i+1U] <-> pSrc[j+fftLenBy2]; */ + /* pSrc[i+2] <-> pSrc[j+fftLenBy2+1U] */ + in = pSrc[i + 1U]; + pSrc[i + 1U] = pSrc[j + fftLenBy2]; pSrc[j + fftLenBy2] = in; /* Reading the index for the bit reversal */ diff --git a/Source/TransformFunctions/arm_cfft_f32.c b/Source/TransformFunctions/arm_cfft_f32.c index f16b473f..4abb6f59 100644 --- a/Source/TransformFunctions/arm_cfft_f32.c +++ b/Source/TransformFunctions/arm_cfft_f32.c @@ -299,9 +299,9 @@ void arm_cfft_radix8by2_f32( arm_cfft_instance_f32 * S, float32_t * p1) } // first col - arm_radix8_butterfly_f32( pCol1, L, (float32_t *) S->pTwiddle, 2u); + arm_radix8_butterfly_f32( pCol1, L, (float32_t *) S->pTwiddle, 2U); // second col - arm_radix8_butterfly_f32( pCol2, L, (float32_t *) S->pTwiddle, 2u); + arm_radix8_butterfly_f32( pCol2, L, (float32_t *) S->pTwiddle, 2U); } void arm_cfft_radix8by4_f32( arm_cfft_instance_f32 * S, float32_t * p1) @@ -535,13 +535,13 @@ void arm_cfft_radix8by4_f32( arm_cfft_instance_f32 * S, float32_t * p1) *p4++ = m2 - m3; // first col - arm_radix8_butterfly_f32( pCol1, L, (float32_t *) S->pTwiddle, 4u); + arm_radix8_butterfly_f32( pCol1, L, (float32_t *) S->pTwiddle, 4U); // second col - arm_radix8_butterfly_f32( pCol2, L, (float32_t *) S->pTwiddle, 4u); + arm_radix8_butterfly_f32( pCol2, L, (float32_t *) S->pTwiddle, 4U); // third col - arm_radix8_butterfly_f32( pCol3, L, (float32_t *) S->pTwiddle, 4u); + arm_radix8_butterfly_f32( pCol3, L, (float32_t *) S->pTwiddle, 4U); // fourth col - arm_radix8_butterfly_f32( pCol4, L, (float32_t *) S->pTwiddle, 4u); + arm_radix8_butterfly_f32( pCol4, L, (float32_t *) S->pTwiddle, 4U); } /** @@ -568,7 +568,7 @@ void arm_cfft_f32( uint32_t L = S->fftLen, l; float32_t invL, * pSrc; - if (ifftFlag == 1u) + if (ifftFlag == 1U) { /* Conjugate input data */ pSrc = p1 + 1; @@ -601,7 +601,7 @@ void arm_cfft_f32( if ( bitReverseFlag ) arm_bitreversal_32((uint32_t*)p1,S->bitRevLength,S->pBitRevTable); - if (ifftFlag == 1u) + if (ifftFlag == 1U) { invL = 1.0f/(float32_t)L; /* Conjugate and scale output data */ diff --git a/Source/TransformFunctions/arm_cfft_q15.c b/Source/TransformFunctions/arm_cfft_q15.c index 2cd3605c..da76ddcc 100644 --- a/Source/TransformFunctions/arm_cfft_q15.c +++ b/Source/TransformFunctions/arm_cfft_q15.c @@ -82,7 +82,7 @@ void arm_cfft_q15( { uint32_t L = S->fftLen; - if (ifftFlag == 1u) + if (ifftFlag == 1U) { switch (L) { @@ -177,7 +177,7 @@ void arm_cfft_radix4by2_q15( #else - out1 = __SMUSDX(R, coeff) >> 16u; + out1 = __SMUSDX(R, coeff) >> 16U; out2 = __SMUAD(coeff, R); #endif // #ifndef ARM_MATH_BIG_ENDIAN @@ -198,26 +198,26 @@ void arm_cfft_radix4by2_q15( l = i + n2; - xt = (pSrc[2 * i] >> 1u) - (pSrc[2 * l] >> 1u); - pSrc[2 * i] = ((pSrc[2 * i] >> 1u) + (pSrc[2 * l] >> 1u)) >> 1u; + xt = (pSrc[2 * i] >> 1U) - (pSrc[2 * l] >> 1U); + pSrc[2 * i] = ((pSrc[2 * i] >> 1U) + (pSrc[2 * l] >> 1U)) >> 1U; - yt = (pSrc[2 * i + 1] >> 1u) - (pSrc[2 * l + 1] >> 1u); + yt = (pSrc[2 * i + 1] >> 1U) - (pSrc[2 * l + 1] >> 1U); pSrc[2 * i + 1] = - ((pSrc[2 * l + 1] >> 1u) + (pSrc[2 * i + 1] >> 1u)) >> 1u; + ((pSrc[2 * l + 1] >> 1U) + (pSrc[2 * i + 1] >> 1U)) >> 1U; - pSrc[2u * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) + + pSrc[2U * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) + ((int16_t) (((q31_t) yt * sinVal) >> 16))); - pSrc[2u * l + 1u] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) - + pSrc[2U * l + 1U] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) - ((int16_t) (((q31_t) xt * sinVal) >> 16))); } #endif // #if defined (ARM_MATH_DSP) // first col - arm_radix4_butterfly_q15( pSrc, n2, (q15_t*)pCoef, 2u); + arm_radix4_butterfly_q15( pSrc, n2, (q15_t*)pCoef, 2U); // second col - arm_radix4_butterfly_q15( pSrc + fftLen, n2, (q15_t*)pCoef, 2u); + arm_radix4_butterfly_q15( pSrc + fftLen, n2, (q15_t*)pCoef, 2U); for (i = 0; i < fftLen >> 1; i++) { @@ -283,7 +283,7 @@ void arm_cfft_radix4by2_inverse_q15( out2 = __SMUADX(coeff, R); #else - out1 = __SMUADX(R, coeff) >> 16u; + out1 = __SMUADX(R, coeff) >> 16U; out2 = __SMUSD(__QSUB(0, coeff), R); #endif // #ifndef ARM_MATH_BIG_ENDIAN @@ -303,26 +303,26 @@ void arm_cfft_radix4by2_inverse_q15( ia++; l = i + n2; - xt = (pSrc[2 * i] >> 1u) - (pSrc[2 * l] >> 1u); - pSrc[2 * i] = ((pSrc[2 * i] >> 1u) + (pSrc[2 * l] >> 1u)) >> 1u; + xt = (pSrc[2 * i] >> 1U) - (pSrc[2 * l] >> 1U); + pSrc[2 * i] = ((pSrc[2 * i] >> 1U) + (pSrc[2 * l] >> 1U)) >> 1U; - yt = (pSrc[2 * i + 1] >> 1u) - (pSrc[2 * l + 1] >> 1u); + yt = (pSrc[2 * i + 1] >> 1U) - (pSrc[2 * l + 1] >> 1U); pSrc[2 * i + 1] = - ((pSrc[2 * l + 1] >> 1u) + (pSrc[2 * i + 1] >> 1u)) >> 1u; + ((pSrc[2 * l + 1] >> 1U) + (pSrc[2 * i + 1] >> 1U)) >> 1U; - pSrc[2u * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) - + pSrc[2U * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) - ((int16_t) (((q31_t) yt * sinVal) >> 16))); - pSrc[2u * l + 1u] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) + + pSrc[2U * l + 1U] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) + ((int16_t) (((q31_t) xt * sinVal) >> 16))); } #endif // #if defined (ARM_MATH_DSP) // first col - arm_radix4_butterfly_inverse_q15( pSrc, n2, (q15_t*)pCoef, 2u); + arm_radix4_butterfly_inverse_q15( pSrc, n2, (q15_t*)pCoef, 2U); // second col - arm_radix4_butterfly_inverse_q15( pSrc + fftLen, n2, (q15_t*)pCoef, 2u); + arm_radix4_butterfly_inverse_q15( pSrc + fftLen, n2, (q15_t*)pCoef, 2U); for (i = 0; i < fftLen >> 1; i++) { diff --git a/Source/TransformFunctions/arm_cfft_q31.c b/Source/TransformFunctions/arm_cfft_q31.c index 6c1f0704..ff4ff947 100644 --- a/Source/TransformFunctions/arm_cfft_q31.c +++ b/Source/TransformFunctions/arm_cfft_q31.c @@ -82,7 +82,7 @@ void arm_cfft_q31( { uint32_t L = S->fftLen; - if (ifftFlag == 1u) + if (ifftFlag == 1U) { switch (L) { @@ -161,15 +161,15 @@ void arm_cfft_radix4by2_q31( multAcc_32x32_keep32_R(p0, yt, sinVal); multSub_32x32_keep32_R(p1, xt, sinVal); - pSrc[2u * l] = p0 << 1; - pSrc[2u * l + 1u] = p1 << 1; + pSrc[2U * l] = p0 << 1; + pSrc[2U * l + 1U] = p1 << 1; } // first col - arm_radix4_butterfly_q31( pSrc, n2, (q31_t*)pCoef, 2u); + arm_radix4_butterfly_q31( pSrc, n2, (q31_t*)pCoef, 2U); // second col - arm_radix4_butterfly_q31( pSrc + fftLen, n2, (q31_t*)pCoef, 2u); + arm_radix4_butterfly_q31( pSrc + fftLen, n2, (q31_t*)pCoef, 2U); for (i = 0; i < fftLen >> 1; i++) { @@ -221,15 +221,15 @@ void arm_cfft_radix4by2_inverse_q31( multSub_32x32_keep32_R(p0, yt, sinVal); multAcc_32x32_keep32_R(p1, xt, sinVal); - pSrc[2u * l] = p0 << 1; - pSrc[2u * l + 1u] = p1 << 1; + pSrc[2U * l] = p0 << 1; + pSrc[2U * l + 1U] = p1 << 1; } // first col - arm_radix4_butterfly_inverse_q31( pSrc, n2, (q31_t*)pCoef, 2u); + arm_radix4_butterfly_inverse_q31( pSrc, n2, (q31_t*)pCoef, 2U); // second col - arm_radix4_butterfly_inverse_q31( pSrc + fftLen, n2, (q31_t*)pCoef, 2u); + arm_radix4_butterfly_inverse_q31( pSrc + fftLen, n2, (q31_t*)pCoef, 2U); for (i = 0; i < fftLen >> 1; i++) { diff --git a/Source/TransformFunctions/arm_cfft_radix2_f32.c b/Source/TransformFunctions/arm_cfft_radix2_f32.c index d880debb..d35988df 100644 --- a/Source/TransformFunctions/arm_cfft_radix2_f32.c +++ b/Source/TransformFunctions/arm_cfft_radix2_f32.c @@ -71,7 +71,7 @@ const arm_cfft_radix2_instance_f32 * S, float32_t * pSrc) { - if (S->ifftFlag == 1u) + if (S->ifftFlag == 1U) { /* Complex IFFT radix-2 */ arm_radix2_butterfly_inverse_f32(pSrc, S->fftLen, S->pTwiddle, @@ -84,7 +84,7 @@ float32_t * pSrc) S->twidCoefModifier); } - if (S->bitReverseFlag == 1u) + if (S->bitReverseFlag == 1U) { /* Bit Reversal */ arm_bitreversal_f32(pSrc, S->fftLen, S->bitRevFactor, S->pBitRevTable); @@ -166,7 +166,7 @@ uint16_t twidCoefModifier) i++; } // groups loop end - twidCoefModifier <<= 1u; + twidCoefModifier <<= 1U; // loop for stage for (k = n2; k > 2; k = k >> 1) @@ -209,7 +209,7 @@ uint16_t twidCoefModifier) } while ( i < fftLen ); // butterfly loop end j++; } while ( j < n2); // groups loop end - twidCoefModifier <<= 1u; + twidCoefModifier <<= 1U; } // stages loop end // loop for butterfly @@ -272,7 +272,7 @@ uint16_t twidCoefModifier) } while (i < fftLen); j++; } while (j < n2); - twidCoefModifier <<= 1u; + twidCoefModifier <<= 1U; } #endif // #if defined (ARM_MATH_DSP) @@ -325,7 +325,7 @@ float32_t onebyfftLen) pSrc[2 * l + 1] = p2 + p3; } // groups loop end - twidCoefModifier <<= 1u; + twidCoefModifier <<= 1U; // loop for stage for (k = fftLen / 2; k > 2; k = k >> 1) @@ -369,7 +369,7 @@ float32_t onebyfftLen) j++; } while (j < n2); // groups loop end - twidCoefModifier <<= 1u; + twidCoefModifier <<= 1U; } // stages loop end // loop for butterfly @@ -438,7 +438,7 @@ float32_t onebyfftLen) j++; } while ( j < n2 ); // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; } // stages loop end n1 = n2; @@ -461,10 +461,10 @@ float32_t onebyfftLen) p3 = yt * onebyfftLen; pSrc[2 * i] = p0; - pSrc[2u * l] = p2; + pSrc[2U * l] = p2; pSrc[2 * i + 1] = p1; - pSrc[2u * l + 1u] = p3; + pSrc[2U * l + 1U] = p3; } // butterfly loop end #endif // #if defined (ARM_MATH_DSP) diff --git a/Source/TransformFunctions/arm_cfft_radix2_init_f32.c b/Source/TransformFunctions/arm_cfft_radix2_init_f32.c index 4b965eb4..fdfa63e1 100644 --- a/Source/TransformFunctions/arm_cfft_radix2_init_f32.c +++ b/Source/TransformFunctions/arm_cfft_radix2_init_f32.c @@ -85,94 +85,94 @@ arm_status arm_cfft_radix2_init_f32( switch (S->fftLen) { - case 4096u: + case 4096U: /* Initializations of structure parameters for 4096 point FFT */ /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 1u; + S->twidCoefModifier = 1U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 1u; + S->bitRevFactor = 1U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) armBitRevTable; /* Initialise the 1/fftLen Value */ S->onebyfftLen = 0.000244140625; break; - case 2048u: + case 2048U: /* Initializations of structure parameters for 2048 point FFT */ /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 2u; + S->twidCoefModifier = 2U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 2u; + S->bitRevFactor = 2U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) & armBitRevTable[1]; /* Initialise the 1/fftLen Value */ S->onebyfftLen = 0.00048828125; break; - case 1024u: + case 1024U: /* Initializations of structure parameters for 1024 point FFT */ /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 4u; + S->twidCoefModifier = 4U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 4u; + S->bitRevFactor = 4U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) & armBitRevTable[3]; /* Initialise the 1/fftLen Value */ S->onebyfftLen = 0.0009765625f; break; - case 512u: + case 512U: /* Initializations of structure parameters for 512 point FFT */ /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 8u; + S->twidCoefModifier = 8U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 8u; + S->bitRevFactor = 8U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) & armBitRevTable[7]; /* Initialise the 1/fftLen Value */ S->onebyfftLen = 0.001953125; break; - case 256u: + case 256U: /* Initializations of structure parameters for 256 point FFT */ - S->twidCoefModifier = 16u; - S->bitRevFactor = 16u; + S->twidCoefModifier = 16U; + S->bitRevFactor = 16U; S->pBitRevTable = (uint16_t *) & armBitRevTable[15]; S->onebyfftLen = 0.00390625f; break; - case 128u: + case 128U: /* Initializations of structure parameters for 128 point FFT */ - S->twidCoefModifier = 32u; - S->bitRevFactor = 32u; + S->twidCoefModifier = 32U; + S->bitRevFactor = 32U; S->pBitRevTable = (uint16_t *) & armBitRevTable[31]; S->onebyfftLen = 0.0078125; break; - case 64u: + case 64U: /* Initializations of structure parameters for 64 point FFT */ - S->twidCoefModifier = 64u; - S->bitRevFactor = 64u; + S->twidCoefModifier = 64U; + S->bitRevFactor = 64U; S->pBitRevTable = (uint16_t *) & armBitRevTable[63]; S->onebyfftLen = 0.015625f; break; - case 32u: + case 32U: /* Initializations of structure parameters for 64 point FFT */ - S->twidCoefModifier = 128u; - S->bitRevFactor = 128u; + S->twidCoefModifier = 128U; + S->bitRevFactor = 128U; S->pBitRevTable = (uint16_t *) & armBitRevTable[127]; S->onebyfftLen = 0.03125; break; - case 16u: + case 16U: /* Initializations of structure parameters for 16 point FFT */ - S->twidCoefModifier = 256u; - S->bitRevFactor = 256u; + S->twidCoefModifier = 256U; + S->bitRevFactor = 256U; S->pBitRevTable = (uint16_t *) & armBitRevTable[255]; S->onebyfftLen = 0.0625f; break; diff --git a/Source/TransformFunctions/arm_cfft_radix2_init_q15.c b/Source/TransformFunctions/arm_cfft_radix2_init_q15.c index 42bf40a8..2646374d 100644 --- a/Source/TransformFunctions/arm_cfft_radix2_init_q15.c +++ b/Source/TransformFunctions/arm_cfft_radix2_init_q15.c @@ -83,82 +83,82 @@ arm_status arm_cfft_radix2_init_q15( /* Initializations of structure parameters depending on the FFT length */ switch (S->fftLen) { - case 4096u: + case 4096U: /* Initializations of structure parameters for 4096 point FFT */ /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 1u; + S->twidCoefModifier = 1U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 1u; + S->bitRevFactor = 1U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) armBitRevTable; break; - case 2048u: + case 2048U: /* Initializations of structure parameters for 2048 point FFT */ /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 2u; + S->twidCoefModifier = 2U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 2u; + S->bitRevFactor = 2U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) & armBitRevTable[1]; break; - case 1024u: + case 1024U: /* Initializations of structure parameters for 1024 point FFT */ - S->twidCoefModifier = 4u; - S->bitRevFactor = 4u; + S->twidCoefModifier = 4U; + S->bitRevFactor = 4U; S->pBitRevTable = (uint16_t *) & armBitRevTable[3]; break; - case 512u: + case 512U: /* Initializations of structure parameters for 512 point FFT */ - S->twidCoefModifier = 8u; - S->bitRevFactor = 8u; + S->twidCoefModifier = 8U; + S->bitRevFactor = 8U; S->pBitRevTable = (uint16_t *) & armBitRevTable[7]; break; - case 256u: + case 256U: /* Initializations of structure parameters for 256 point FFT */ - S->twidCoefModifier = 16u; - S->bitRevFactor = 16u; + S->twidCoefModifier = 16U; + S->bitRevFactor = 16U; S->pBitRevTable = (uint16_t *) & armBitRevTable[15]; break; - case 128u: + case 128U: /* Initializations of structure parameters for 128 point FFT */ - S->twidCoefModifier = 32u; - S->bitRevFactor = 32u; + S->twidCoefModifier = 32U; + S->bitRevFactor = 32U; S->pBitRevTable = (uint16_t *) & armBitRevTable[31]; break; - case 64u: + case 64U: /* Initializations of structure parameters for 64 point FFT */ - S->twidCoefModifier = 64u; - S->bitRevFactor = 64u; + S->twidCoefModifier = 64U; + S->bitRevFactor = 64U; S->pBitRevTable = (uint16_t *) & armBitRevTable[63]; break; - case 32u: + case 32U: /* Initializations of structure parameters for 32 point FFT */ - S->twidCoefModifier = 128u; - S->bitRevFactor = 128u; + S->twidCoefModifier = 128U; + S->bitRevFactor = 128U; S->pBitRevTable = (uint16_t *) & armBitRevTable[127]; break; - case 16u: + case 16U: /* Initializations of structure parameters for 16 point FFT */ - S->twidCoefModifier = 256u; - S->bitRevFactor = 256u; + S->twidCoefModifier = 256U; + S->bitRevFactor = 256U; S->pBitRevTable = (uint16_t *) & armBitRevTable[255]; break; diff --git a/Source/TransformFunctions/arm_cfft_radix2_init_q31.c b/Source/TransformFunctions/arm_cfft_radix2_init_q31.c index 6005e9c0..56fff4b5 100644 --- a/Source/TransformFunctions/arm_cfft_radix2_init_q31.c +++ b/Source/TransformFunctions/arm_cfft_radix2_init_q31.c @@ -85,77 +85,77 @@ arm_status arm_cfft_radix2_init_q31( switch (S->fftLen) { /* Initializations of structure parameters for 4096 point FFT */ - case 4096u: + case 4096U: /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 1u; + S->twidCoefModifier = 1U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 1u; + S->bitRevFactor = 1U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) armBitRevTable; break; /* Initializations of structure parameters for 2048 point FFT */ - case 2048u: + case 2048U: /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 2u; + S->twidCoefModifier = 2U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 2u; + S->bitRevFactor = 2U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) & armBitRevTable[1]; break; /* Initializations of structure parameters for 1024 point FFT */ - case 1024u: + case 1024U: /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 4u; + S->twidCoefModifier = 4U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 4u; + S->bitRevFactor = 4U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) & armBitRevTable[3]; break; /* Initializations of structure parameters for 512 point FFT */ - case 512u: + case 512U: /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 8u; + S->twidCoefModifier = 8U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 8u; + S->bitRevFactor = 8U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) & armBitRevTable[7]; break; - case 256u: + case 256U: /* Initializations of structure parameters for 256 point FFT */ - S->twidCoefModifier = 16u; - S->bitRevFactor = 16u; + S->twidCoefModifier = 16U; + S->bitRevFactor = 16U; S->pBitRevTable = (uint16_t *) & armBitRevTable[15]; break; - case 128u: + case 128U: /* Initializations of structure parameters for 128 point FFT */ - S->twidCoefModifier = 32u; - S->bitRevFactor = 32u; + S->twidCoefModifier = 32U; + S->bitRevFactor = 32U; S->pBitRevTable = (uint16_t *) & armBitRevTable[31]; break; - case 64u: + case 64U: /* Initializations of structure parameters for 64 point FFT */ - S->twidCoefModifier = 64u; - S->bitRevFactor = 64u; + S->twidCoefModifier = 64U; + S->bitRevFactor = 64U; S->pBitRevTable = (uint16_t *) & armBitRevTable[63]; break; - case 32u: + case 32U: /* Initializations of structure parameters for 32 point FFT */ - S->twidCoefModifier = 128u; - S->bitRevFactor = 128u; + S->twidCoefModifier = 128U; + S->bitRevFactor = 128U; S->pBitRevTable = (uint16_t *) & armBitRevTable[127]; break; - case 16u: + case 16U: /* Initializations of structure parameters for 16 point FFT */ - S->twidCoefModifier = 256u; - S->bitRevFactor = 256u; + S->twidCoefModifier = 256U; + S->bitRevFactor = 256U; S->pBitRevTable = (uint16_t *) & armBitRevTable[255]; break; diff --git a/Source/TransformFunctions/arm_cfft_radix2_q15.c b/Source/TransformFunctions/arm_cfft_radix2_q15.c index 2e737fdb..8880ab9c 100644 --- a/Source/TransformFunctions/arm_cfft_radix2_q15.c +++ b/Source/TransformFunctions/arm_cfft_radix2_q15.c @@ -69,7 +69,7 @@ void arm_cfft_radix2_q15( q15_t * pSrc) { - if (S->ifftFlag == 1u) + if (S->ifftFlag == 1U) { arm_radix2_butterfly_inverse_q15(pSrc, S->fftLen, S->pTwiddle, S->twidCoefModifier); @@ -111,7 +111,7 @@ void arm_radix2_butterfly_q15( // loop for groups for (i = 0; i < n2; i++) { - coeff = _SIMD32_OFFSET(pCoef + (ia * 2u)); + coeff = _SIMD32_OFFSET(pCoef + (ia * 2U)); ia = ia + twidCoefModifier; @@ -136,15 +136,15 @@ void arm_radix2_butterfly_q15( #else - out1 = __SMUSDX(R, coeff) >> 16u; + out1 = __SMUSDX(R, coeff) >> 16U; out2 = __SMUAD(coeff, R); #endif // #ifndef ARM_MATH_BIG_ENDIAN - _SIMD32_OFFSET(pSrc + (2u * l)) = + _SIMD32_OFFSET(pSrc + (2U * l)) = (q31_t) ((out2) & 0xFFFF0000) | (out1 & 0x0000FFFF); - coeff = _SIMD32_OFFSET(pCoef + (ia * 2u)); + coeff = _SIMD32_OFFSET(pCoef + (ia * 2U)); ia = ia + twidCoefModifier; @@ -171,17 +171,17 @@ void arm_radix2_butterfly_q15( #else - out1 = __SMUSDX(R, coeff) >> 16u; + out1 = __SMUSDX(R, coeff) >> 16U; out2 = __SMUAD(coeff, R); #endif // #ifndef ARM_MATH_BIG_ENDIAN - _SIMD32_OFFSET(pSrc + (2u * l)) = + _SIMD32_OFFSET(pSrc + (2U * l)) = (q31_t) ((out2) & 0xFFFF0000) | (out1 & 0x0000FFFF); } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; // loop for stage for (k = fftLen / 2; k > 2; k = k >> 1) @@ -193,7 +193,7 @@ void arm_radix2_butterfly_q15( // loop for groups for (j = 0; j < n2; j++) { - coeff = _SIMD32_OFFSET(pCoef + (ia * 2u)); + coeff = _SIMD32_OFFSET(pCoef + (ia * 2U)); ia = ia + twidCoefModifier; @@ -217,12 +217,12 @@ void arm_radix2_butterfly_q15( #else - out1 = __SMUSDX(R, coeff) >> 16u; + out1 = __SMUSDX(R, coeff) >> 16U; out2 = __SMUAD(coeff, R); #endif // #ifndef ARM_MATH_BIG_ENDIAN - _SIMD32_OFFSET(pSrc + (2u * l)) = + _SIMD32_OFFSET(pSrc + (2U * l)) = (q31_t) ((out2) & 0xFFFF0000) | (out1 & 0x0000FFFF); i += n1; @@ -244,26 +244,26 @@ void arm_radix2_butterfly_q15( #else - out1 = __SMUSDX(R, coeff) >> 16u; + out1 = __SMUSDX(R, coeff) >> 16U; out2 = __SMUAD(coeff, R); #endif // #ifndef ARM_MATH_BIG_ENDIAN - _SIMD32_OFFSET(pSrc + (2u * l)) = + _SIMD32_OFFSET(pSrc + (2U * l)) = (q31_t) ((out2) & 0xFFFF0000) | (out1 & 0x0000FFFF); } // butterfly loop end } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; } // stages loop end n1 = n2; n2 = n2 >> 1; ia = 0; - coeff = _SIMD32_OFFSET(pCoef + (ia * 2u)); + coeff = _SIMD32_OFFSET(pCoef + (ia * 2U)); ia = ia + twidCoefModifier; @@ -280,7 +280,7 @@ void arm_radix2_butterfly_q15( _SIMD32_OFFSET(pSrc + (2 * i)) = __QADD16(T, S); - _SIMD32_OFFSET(pSrc + (2u * l)) = R; + _SIMD32_OFFSET(pSrc + (2U * l)) = R; i += n1; l = i + n2; @@ -293,7 +293,7 @@ void arm_radix2_butterfly_q15( _SIMD32_OFFSET(pSrc + (2 * i)) = __QADD16(T, S); - _SIMD32_OFFSET(pSrc + (2u * l)) = R; + _SIMD32_OFFSET(pSrc + (2U * l)) = R; } // groups loop end @@ -323,24 +323,24 @@ void arm_radix2_butterfly_q15( for (i = j; i < fftLen; i += n1) { l = i + n2; - xt = (pSrc[2 * i] >> 1u) - (pSrc[2 * l] >> 1u); - pSrc[2 * i] = ((pSrc[2 * i] >> 1u) + (pSrc[2 * l] >> 1u)) >> 1u; + xt = (pSrc[2 * i] >> 1U) - (pSrc[2 * l] >> 1U); + pSrc[2 * i] = ((pSrc[2 * i] >> 1U) + (pSrc[2 * l] >> 1U)) >> 1U; - yt = (pSrc[2 * i + 1] >> 1u) - (pSrc[2 * l + 1] >> 1u); + yt = (pSrc[2 * i + 1] >> 1U) - (pSrc[2 * l + 1] >> 1U); pSrc[2 * i + 1] = - ((pSrc[2 * l + 1] >> 1u) + (pSrc[2 * i + 1] >> 1u)) >> 1u; + ((pSrc[2 * l + 1] >> 1U) + (pSrc[2 * i + 1] >> 1U)) >> 1U; - pSrc[2u * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) + + pSrc[2U * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) + ((int16_t) (((q31_t) yt * sinVal) >> 16))); - pSrc[2u * l + 1u] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) - + pSrc[2U * l + 1U] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) - ((int16_t) (((q31_t) xt * sinVal) >> 16))); } // butterfly loop end } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; // loop for stage for (k = fftLen / 2; k > 2; k = k >> 1) @@ -361,22 +361,22 @@ void arm_radix2_butterfly_q15( { l = i + n2; xt = pSrc[2 * i] - pSrc[2 * l]; - pSrc[2 * i] = (pSrc[2 * i] + pSrc[2 * l]) >> 1u; + pSrc[2 * i] = (pSrc[2 * i] + pSrc[2 * l]) >> 1U; yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; - pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]) >> 1u; + pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]) >> 1U; - pSrc[2u * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) + + pSrc[2U * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) + ((int16_t) (((q31_t) yt * sinVal) >> 16))); - pSrc[2u * l + 1u] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) - + pSrc[2U * l + 1U] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) - ((int16_t) (((q31_t) xt * sinVal) >> 16))); } // butterfly loop end } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; } // stages loop end n1 = n2; @@ -401,15 +401,15 @@ void arm_radix2_butterfly_q15( yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]); - pSrc[2u * l] = xt; + pSrc[2U * l] = xt; - pSrc[2u * l + 1u] = yt; + pSrc[2U * l + 1U] = yt; } // butterfly loop end } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; #endif // #if defined (ARM_MATH_DSP) @@ -440,7 +440,7 @@ void arm_radix2_butterfly_inverse_q15( // loop for groups for (i = 0; i < n2; i++) { - coeff = _SIMD32_OFFSET(pCoef + (ia * 2u)); + coeff = _SIMD32_OFFSET(pCoef + (ia * 2U)); ia = ia + twidCoefModifier; @@ -464,15 +464,15 @@ void arm_radix2_butterfly_inverse_q15( out2 = __SMUADX(coeff, R); #else - out1 = __SMUADX(R, coeff) >> 16u; + out1 = __SMUADX(R, coeff) >> 16U; out2 = __SMUSD(__QSUB(0, coeff), R); #endif // #ifndef ARM_MATH_BIG_ENDIAN - _SIMD32_OFFSET(pSrc + (2u * l)) = + _SIMD32_OFFSET(pSrc + (2U * l)) = (q31_t) ((out2) & 0xFFFF0000) | (out1 & 0x0000FFFF); - coeff = _SIMD32_OFFSET(pCoef + (ia * 2u)); + coeff = _SIMD32_OFFSET(pCoef + (ia * 2U)); ia = ia + twidCoefModifier; @@ -498,17 +498,17 @@ void arm_radix2_butterfly_inverse_q15( out2 = __SMUADX(coeff, R); #else - out1 = __SMUADX(R, coeff) >> 16u; + out1 = __SMUADX(R, coeff) >> 16U; out2 = __SMUSD(__QSUB(0, coeff), R); #endif // #ifndef ARM_MATH_BIG_ENDIAN - _SIMD32_OFFSET(pSrc + (2u * l)) = + _SIMD32_OFFSET(pSrc + (2U * l)) = (q31_t) ((out2) & 0xFFFF0000) | (out1 & 0x0000FFFF); } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; // loop for stage for (k = fftLen / 2; k > 2; k = k >> 1) @@ -520,7 +520,7 @@ void arm_radix2_butterfly_inverse_q15( // loop for groups for (j = 0; j < n2; j++) { - coeff = _SIMD32_OFFSET(pCoef + (ia * 2u)); + coeff = _SIMD32_OFFSET(pCoef + (ia * 2U)); ia = ia + twidCoefModifier; @@ -544,12 +544,12 @@ void arm_radix2_butterfly_inverse_q15( #else - out1 = __SMUADX(R, coeff) >> 16u; + out1 = __SMUADX(R, coeff) >> 16U; out2 = __SMUSD(__QSUB(0, coeff), R); #endif // #ifndef ARM_MATH_BIG_ENDIAN - _SIMD32_OFFSET(pSrc + (2u * l)) = + _SIMD32_OFFSET(pSrc + (2U * l)) = (q31_t) ((out2) & 0xFFFF0000) | (out1 & 0x0000FFFF); i += n1; @@ -570,19 +570,19 @@ void arm_radix2_butterfly_inverse_q15( out2 = __SMUADX(coeff, R); #else - out1 = __SMUADX(R, coeff) >> 16u; + out1 = __SMUADX(R, coeff) >> 16U; out2 = __SMUSD(__QSUB(0, coeff), R); #endif // #ifndef ARM_MATH_BIG_ENDIAN - _SIMD32_OFFSET(pSrc + (2u * l)) = + _SIMD32_OFFSET(pSrc + (2U * l)) = (q31_t) ((out2) & 0xFFFF0000) | (out1 & 0x0000FFFF); } // butterfly loop end } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; } // stages loop end n1 = n2; @@ -592,7 +592,7 @@ void arm_radix2_butterfly_inverse_q15( // loop for groups for (j = 0; j < n2; j++) { - coeff = _SIMD32_OFFSET(pCoef + (ia * 2u)); + coeff = _SIMD32_OFFSET(pCoef + (ia * 2U)); ia = ia + twidCoefModifier; @@ -609,13 +609,13 @@ void arm_radix2_butterfly_inverse_q15( _SIMD32_OFFSET(pSrc + (2 * i)) = __QADD16(T, S); - _SIMD32_OFFSET(pSrc + (2u * l)) = R; + _SIMD32_OFFSET(pSrc + (2U * l)) = R; } // butterfly loop end } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; #else @@ -642,24 +642,24 @@ void arm_radix2_butterfly_inverse_q15( for (i = j; i < fftLen; i += n1) { l = i + n2; - xt = (pSrc[2 * i] >> 1u) - (pSrc[2 * l] >> 1u); - pSrc[2 * i] = ((pSrc[2 * i] >> 1u) + (pSrc[2 * l] >> 1u)) >> 1u; + xt = (pSrc[2 * i] >> 1U) - (pSrc[2 * l] >> 1U); + pSrc[2 * i] = ((pSrc[2 * i] >> 1U) + (pSrc[2 * l] >> 1U)) >> 1U; - yt = (pSrc[2 * i + 1] >> 1u) - (pSrc[2 * l + 1] >> 1u); + yt = (pSrc[2 * i + 1] >> 1U) - (pSrc[2 * l + 1] >> 1U); pSrc[2 * i + 1] = - ((pSrc[2 * l + 1] >> 1u) + (pSrc[2 * i + 1] >> 1u)) >> 1u; + ((pSrc[2 * l + 1] >> 1U) + (pSrc[2 * i + 1] >> 1U)) >> 1U; - pSrc[2u * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) - + pSrc[2U * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) - ((int16_t) (((q31_t) yt * sinVal) >> 16))); - pSrc[2u * l + 1u] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) + + pSrc[2U * l + 1U] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) + ((int16_t) (((q31_t) xt * sinVal) >> 16))); } // butterfly loop end } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; // loop for stage for (k = fftLen / 2; k > 2; k = k >> 1) @@ -680,22 +680,22 @@ void arm_radix2_butterfly_inverse_q15( { l = i + n2; xt = pSrc[2 * i] - pSrc[2 * l]; - pSrc[2 * i] = (pSrc[2 * i] + pSrc[2 * l]) >> 1u; + pSrc[2 * i] = (pSrc[2 * i] + pSrc[2 * l]) >> 1U; yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; - pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]) >> 1u; + pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]) >> 1U; - pSrc[2u * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) - + pSrc[2U * l] = (((int16_t) (((q31_t) xt * cosVal) >> 16)) - ((int16_t) (((q31_t) yt * sinVal) >> 16))); - pSrc[2u * l + 1u] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) + + pSrc[2U * l + 1U] = (((int16_t) (((q31_t) yt * cosVal) >> 16)) + ((int16_t) (((q31_t) xt * sinVal) >> 16))); } // butterfly loop end } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; } // stages loop end n1 = n2; @@ -717,9 +717,9 @@ void arm_radix2_butterfly_inverse_q15( yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]); - pSrc[2u * l] = xt; + pSrc[2U * l] = xt; - pSrc[2u * l + 1u] = yt; + pSrc[2U * l + 1U] = yt; } // groups loop end diff --git a/Source/TransformFunctions/arm_cfft_radix2_q31.c b/Source/TransformFunctions/arm_cfft_radix2_q31.c index e43dd325..c9b15371 100644 --- a/Source/TransformFunctions/arm_cfft_radix2_q31.c +++ b/Source/TransformFunctions/arm_cfft_radix2_q31.c @@ -69,7 +69,7 @@ const arm_cfft_radix2_instance_q31 * S, q31_t * pSrc) { - if (S->ifftFlag == 1u) + if (S->ifftFlag == 1U) { arm_radix2_butterfly_inverse_q31(pSrc, S->fftLen, S->pTwiddle, S->twidCoefModifier); @@ -114,24 +114,24 @@ uint16_t twidCoefModifier) ia = ia + twidCoefModifier; l = i + n2; - xt = (pSrc[2 * i] >> 1u) - (pSrc[2 * l] >> 1u); - pSrc[2 * i] = ((pSrc[2 * i] >> 1u) + (pSrc[2 * l] >> 1u)) >> 1u; + xt = (pSrc[2 * i] >> 1U) - (pSrc[2 * l] >> 1U); + pSrc[2 * i] = ((pSrc[2 * i] >> 1U) + (pSrc[2 * l] >> 1U)) >> 1U; - yt = (pSrc[2 * i + 1] >> 1u) - (pSrc[2 * l + 1] >> 1u); + yt = (pSrc[2 * i + 1] >> 1U) - (pSrc[2 * l + 1] >> 1U); pSrc[2 * i + 1] = - ((pSrc[2 * l + 1] >> 1u) + (pSrc[2 * i + 1] >> 1u)) >> 1u; + ((pSrc[2 * l + 1] >> 1U) + (pSrc[2 * i + 1] >> 1U)) >> 1U; mult_32x32_keep32_R(p0, xt, cosVal); mult_32x32_keep32_R(p1, yt, cosVal); multAcc_32x32_keep32_R(p0, yt, sinVal); multSub_32x32_keep32_R(p1, xt, sinVal); - pSrc[2u * l] = p0; - pSrc[2u * l + 1u] = p1; + pSrc[2U * l] = p0; + pSrc[2U * l + 1U] = p1; } // groups loop end - twidCoefModifier <<= 1u; + twidCoefModifier <<= 1U; // loop for stage for (k = fftLen / 2; k > 2; k = k >> 1) @@ -154,25 +154,25 @@ uint16_t twidCoefModifier) { l = i + n2; xt = pSrc[2 * i] - pSrc[2 * l]; - pSrc[2 * i] = (pSrc[2 * i] + pSrc[2 * l]) >> 1u; + pSrc[2 * i] = (pSrc[2 * i] + pSrc[2 * l]) >> 1U; yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; - pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]) >> 1u; + pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]) >> 1U; mult_32x32_keep32_R(p0, xt, cosVal); mult_32x32_keep32_R(p1, yt, cosVal); multAcc_32x32_keep32_R(p0, yt, sinVal); multSub_32x32_keep32_R(p1, xt, sinVal); - pSrc[2u * l] = p0; - pSrc[2u * l + 1u] = p1; + pSrc[2U * l] = p0; + pSrc[2U * l + 1U] = p1; i += n1; m--; } while ( m > 0); // butterfly loop end } // groups loop end - twidCoefModifier <<= 1u; + twidCoefModifier <<= 1U; } // stages loop end n1 = n2; @@ -193,9 +193,9 @@ uint16_t twidCoefModifier) yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]); - pSrc[2u * l] = xt; + pSrc[2U * l] = xt; - pSrc[2u * l + 1u] = yt; + pSrc[2U * l + 1U] = yt; i += n1; l = i + n2; @@ -206,9 +206,9 @@ uint16_t twidCoefModifier) yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]); - pSrc[2u * l] = xt; + pSrc[2U * l] = xt; - pSrc[2u * l + 1u] = yt; + pSrc[2U * l + 1U] = yt; } // butterfly loop end @@ -242,23 +242,23 @@ uint16_t twidCoefModifier) ia = ia + twidCoefModifier; l = i + n2; - xt = (pSrc[2 * i] >> 1u) - (pSrc[2 * l] >> 1u); - pSrc[2 * i] = ((pSrc[2 * i] >> 1u) + (pSrc[2 * l] >> 1u)) >> 1u; + xt = (pSrc[2 * i] >> 1U) - (pSrc[2 * l] >> 1U); + pSrc[2 * i] = ((pSrc[2 * i] >> 1U) + (pSrc[2 * l] >> 1U)) >> 1U; - yt = (pSrc[2 * i + 1] >> 1u) - (pSrc[2 * l + 1] >> 1u); + yt = (pSrc[2 * i + 1] >> 1U) - (pSrc[2 * l + 1] >> 1U); pSrc[2 * i + 1] = - ((pSrc[2 * l + 1] >> 1u) + (pSrc[2 * i + 1] >> 1u)) >> 1u; + ((pSrc[2 * l + 1] >> 1U) + (pSrc[2 * i + 1] >> 1U)) >> 1U; mult_32x32_keep32_R(p0, xt, cosVal); mult_32x32_keep32_R(p1, yt, cosVal); multSub_32x32_keep32_R(p0, yt, sinVal); multAcc_32x32_keep32_R(p1, xt, sinVal); - pSrc[2u * l] = p0; - pSrc[2u * l + 1u] = p1; + pSrc[2U * l] = p0; + pSrc[2U * l + 1U] = p1; } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; // loop for stage for (k = fftLen / 2; k > 2; k = k >> 1) @@ -279,23 +279,23 @@ uint16_t twidCoefModifier) { l = i + n2; xt = pSrc[2 * i] - pSrc[2 * l]; - pSrc[2 * i] = (pSrc[2 * i] + pSrc[2 * l]) >> 1u; + pSrc[2 * i] = (pSrc[2 * i] + pSrc[2 * l]) >> 1U; yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; - pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]) >> 1u; + pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]) >> 1U; mult_32x32_keep32_R(p0, xt, cosVal); mult_32x32_keep32_R(p1, yt, cosVal); multSub_32x32_keep32_R(p0, yt, sinVal); multAcc_32x32_keep32_R(p1, xt, sinVal); - pSrc[2u * l] = p0; - pSrc[2u * l + 1u] = p1; + pSrc[2U * l] = p0; + pSrc[2U * l + 1U] = p1; } // butterfly loop end } // groups loop end - twidCoefModifier = twidCoefModifier << 1u; + twidCoefModifier = twidCoefModifier << 1U; } // stages loop end n1 = n2; @@ -316,9 +316,9 @@ uint16_t twidCoefModifier) yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]); - pSrc[2u * l] = xt; + pSrc[2U * l] = xt; - pSrc[2u * l + 1u] = yt; + pSrc[2U * l + 1U] = yt; i += n1; l = i + n2; @@ -329,9 +329,9 @@ uint16_t twidCoefModifier) yt = pSrc[2 * i + 1] - pSrc[2 * l + 1]; pSrc[2 * i + 1] = (pSrc[2 * l + 1] + pSrc[2 * i + 1]); - pSrc[2u * l] = xt; + pSrc[2U * l] = xt; - pSrc[2u * l + 1u] = yt; + pSrc[2U * l + 1U] = yt; } // butterfly loop end diff --git a/Source/TransformFunctions/arm_cfft_radix4_f32.c b/Source/TransformFunctions/arm_cfft_radix4_f32.c index 00bc097e..d6f66aeb 100644 --- a/Source/TransformFunctions/arm_cfft_radix4_f32.c +++ b/Source/TransformFunctions/arm_cfft_radix4_f32.c @@ -71,7 +71,7 @@ void arm_cfft_radix4_f32( const arm_cfft_radix4_instance_f32 * S, float32_t * pSrc) { - if (S->ifftFlag == 1u) + if (S->ifftFlag == 1U) { /* Complex IFFT radix-4 */ arm_radix4_butterfly_inverse_f32(pSrc, S->fftLen, S->pTwiddle, S->twidCoefModifier, S->onebyfftLen); @@ -82,7 +82,7 @@ void arm_cfft_radix4_f32( arm_radix4_butterfly_f32(pSrc, S->fftLen, S->pTwiddle, S->twidCoefModifier); } - if (S->bitReverseFlag == 1u) + if (S->bitReverseFlag == 1U) { /* Bit Reversal */ arm_bitreversal_f32(pSrc, S->fftLen, S->bitRevFactor, S->pBitRevTable); @@ -137,9 +137,9 @@ uint16_t twidCoefModifier) n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; - i0 = 0u; - ia1 = 0u; + n2 >>= 2U; + i0 = 0U; + ia1 = 0U; j = n2; @@ -152,17 +152,17 @@ uint16_t twidCoefModifier) i2 = i1 + n2; i3 = i2 + n2; - xaIn = pSrc[(2u * i0)]; - yaIn = pSrc[(2u * i0) + 1u]; + xaIn = pSrc[(2U * i0)]; + yaIn = pSrc[(2U * i0) + 1U]; - xbIn = pSrc[(2u * i1)]; - ybIn = pSrc[(2u * i1) + 1u]; + xbIn = pSrc[(2U * i1)]; + ybIn = pSrc[(2U * i1) + 1U]; - xcIn = pSrc[(2u * i2)]; - ycIn = pSrc[(2u * i2) + 1u]; + xcIn = pSrc[(2U * i2)]; + ycIn = pSrc[(2U * i2) + 1U]; - xdIn = pSrc[(2u * i3)]; - ydIn = pSrc[(2u * i3) + 1u]; + xdIn = pSrc[(2U * i3)]; + ydIn = pSrc[(2U * i3) + 1U]; /* xa + xc */ Xaplusc = xaIn + xcIn; @@ -175,8 +175,8 @@ uint16_t twidCoefModifier) /* index calculation for the coefficients */ ia2 = ia1 + ia1; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; /* xa - xc */ Xaminusc = xaIn - xcIn; @@ -188,9 +188,9 @@ uint16_t twidCoefModifier) Ybminusd = ybIn - ydIn; /* xa' = xa + xb + xc + xd */ - pSrc[(2u * i0)] = Xaplusc + Xbplusd; + pSrc[(2U * i0)] = Xaplusc + Xbplusd; /* ya' = ya + yb + yc + yd */ - pSrc[(2u * i0) + 1u] = Yaplusc + Ybplusd; + pSrc[(2U * i0) + 1U] = Yaplusc + Ybplusd; /* (xa - xc) + (yb - yd) */ Xb12C_out = (Xaminusc + Ybminusd); @@ -205,13 +205,13 @@ uint16_t twidCoefModifier) /* (ya - yc) + (xb - xd) */ Yd12C_out = (Xbminusd + Yaminusc); - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; /* index calculation for the coefficients */ ia3 = ia2 + ia1; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; Xb12_out = Xb12C_out * co1; Yb12_out = Yb12C_out * co1; @@ -247,22 +247,22 @@ uint16_t twidCoefModifier) Yd12_out -= p5; /* xc' = (xa-xb+xc-xd)co2 + (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = Xc12_out; + pSrc[2U * i1] = Xc12_out; /* yc' = (ya-yb+yc-yd)co2 - (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = Yc12_out; + pSrc[(2U * i1) + 1U] = Yc12_out; /* xb' = (xa+yb-xc-yd)co1 + (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = Xb12_out; + pSrc[2U * i2] = Xb12_out; /* yb' = (ya-xb-yc+xd)co1 - (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = Yb12_out; + pSrc[(2U * i2) + 1U] = Yb12_out; /* xd' = (xa-yb-xc+yd)co3 + (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = Xd12_out; + pSrc[2U * i3] = Xd12_out; /* yd' = (ya+xb-yc-xd)co3 - (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = Yd12_out; + pSrc[(2U * i3) + 1U] = Yd12_out; /* Twiddle coefficients index modifier */ ia1 += twidCoefModifier; @@ -273,15 +273,15 @@ uint16_t twidCoefModifier) } while (--j); - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; /* Calculation of second stage to excluding last stage */ - for (k = fftLen >> 2u; k > 4u; k >>= 2u) + for (k = fftLen >> 2U; k > 4U; k >>= 2U) { /* Initializations for the first stage */ n1 = n2; - n2 >>= 2u; - ia1 = 0u; + n2 >>= 2U; + ia1 = 0U; /* Calculation of first stage */ j = 0; @@ -290,12 +290,12 @@ uint16_t twidCoefModifier) /* index calculation for the coefficients */ ia2 = ia1 + ia1; ia3 = ia2 + ia1; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* Twiddle coefficients index modifier */ ia1 += twidCoefModifier; @@ -309,17 +309,17 @@ uint16_t twidCoefModifier) i2 = i1 + n2; i3 = i2 + n2; - xaIn = pSrc[(2u * i0)]; - yaIn = pSrc[(2u * i0) + 1u]; + xaIn = pSrc[(2U * i0)]; + yaIn = pSrc[(2U * i0) + 1U]; - xbIn = pSrc[(2u * i1)]; - ybIn = pSrc[(2u * i1) + 1u]; + xbIn = pSrc[(2U * i1)]; + ybIn = pSrc[(2U * i1) + 1U]; - xcIn = pSrc[(2u * i2)]; - ycIn = pSrc[(2u * i2) + 1u]; + xcIn = pSrc[(2U * i2)]; + ycIn = pSrc[(2U * i2) + 1U]; - xdIn = pSrc[(2u * i3)]; - ydIn = pSrc[(2u * i3) + 1u]; + xdIn = pSrc[(2U * i3)]; + ydIn = pSrc[(2U * i3) + 1U]; /* xa - xc */ Xaminusc = xaIn - xcIn; @@ -352,8 +352,8 @@ uint16_t twidCoefModifier) /* (ya - yc) + (xb - xd) */ Yd12C_out = (Xbminusd + Yaminusc); - pSrc[(2u * i0)] = Xaplusc + Xbplusd; - pSrc[(2u * i0) + 1u] = Yaplusc + Ybplusd; + pSrc[(2U * i0)] = Xaplusc + Xbplusd; + pSrc[(2U * i0) + 1U] = Yaplusc + Ybplusd; Xb12_out = Xb12C_out * co1; Yb12_out = Yb12C_out * co1; @@ -389,28 +389,28 @@ uint16_t twidCoefModifier) Yd12_out -= p5; /* xc' = (xa-xb+xc-xd)co2 + (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = Xc12_out; + pSrc[2U * i1] = Xc12_out; /* yc' = (ya-yb+yc-yd)co2 - (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = Yc12_out; + pSrc[(2U * i1) + 1U] = Yc12_out; /* xb' = (xa+yb-xc-yd)co1 + (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = Xb12_out; + pSrc[2U * i2] = Xb12_out; /* yb' = (ya-xb-yc+xd)co1 - (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = Yb12_out; + pSrc[(2U * i2) + 1U] = Yb12_out; /* xd' = (xa-yb-xc+yd)co3 + (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = Xd12_out; + pSrc[2U * i3] = Xd12_out; /* yd' = (ya+xb-yc-xd)co3 - (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = Yd12_out; + pSrc[(2U * i3) + 1U] = Yd12_out; i0 += n1; } while (i0 < fftLen); j++; - } while (j <= (n2 - 1u)); - twidCoefModifier <<= 2u; + } while (j <= (n2 - 1U)); + twidCoefModifier <<= 2U; } j = fftLen >> 2; @@ -479,7 +479,7 @@ uint16_t twidCoefModifier) ptr1[7] = a7; /* increment pointer by 8 */ - ptr1 += 8u; + ptr1 += 8U; } while (--j); #else @@ -491,12 +491,12 @@ uint16_t twidCoefModifier) /* Initializations for the fft calculation */ n2 = fftLen; n1 = n2; - for (k = fftLen; k > 1u; k >>= 2u) + for (k = fftLen; k > 1U; k >>= 2U) { /* Initializations for the fft calculation */ n1 = n2; - n2 >>= 2u; - ia1 = 0u; + n2 >>= 2U; + ia1 = 0U; /* FFT Calculation */ j = 0; @@ -505,12 +505,12 @@ uint16_t twidCoefModifier) /* index calculation for the coefficients */ ia2 = ia1 + ia1; ia3 = ia2 + ia1; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; @@ -525,46 +525,46 @@ uint16_t twidCoefModifier) i3 = i2 + n2; /* xa + xc */ - r1 = pSrc[(2u * i0)] + pSrc[(2u * i2)]; + r1 = pSrc[(2U * i0)] + pSrc[(2U * i2)]; /* xa - xc */ - r2 = pSrc[(2u * i0)] - pSrc[(2u * i2)]; + r2 = pSrc[(2U * i0)] - pSrc[(2U * i2)]; /* ya + yc */ - s1 = pSrc[(2u * i0) + 1u] + pSrc[(2u * i2) + 1u]; + s1 = pSrc[(2U * i0) + 1U] + pSrc[(2U * i2) + 1U]; /* ya - yc */ - s2 = pSrc[(2u * i0) + 1u] - pSrc[(2u * i2) + 1u]; + s2 = pSrc[(2U * i0) + 1U] - pSrc[(2U * i2) + 1U]; /* xb + xd */ - t1 = pSrc[2u * i1] + pSrc[2u * i3]; + t1 = pSrc[2U * i1] + pSrc[2U * i3]; /* xa' = xa + xb + xc + xd */ - pSrc[2u * i0] = r1 + t1; + pSrc[2U * i0] = r1 + t1; /* xa + xc -(xb + xd) */ r1 = r1 - t1; /* yb + yd */ - t2 = pSrc[(2u * i1) + 1u] + pSrc[(2u * i3) + 1u]; + t2 = pSrc[(2U * i1) + 1U] + pSrc[(2U * i3) + 1U]; /* ya' = ya + yb + yc + yd */ - pSrc[(2u * i0) + 1u] = s1 + t2; + pSrc[(2U * i0) + 1U] = s1 + t2; /* (ya + yc) - (yb + yd) */ s1 = s1 - t2; /* (yb - yd) */ - t1 = pSrc[(2u * i1) + 1u] - pSrc[(2u * i3) + 1u]; + t1 = pSrc[(2U * i1) + 1U] - pSrc[(2U * i3) + 1U]; /* (xb - xd) */ - t2 = pSrc[2u * i1] - pSrc[2u * i3]; + t2 = pSrc[2U * i1] - pSrc[2U * i3]; /* xc' = (xa-xb+xc-xd)co2 + (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = (r1 * co2) + (s1 * si2); + pSrc[2U * i1] = (r1 * co2) + (s1 * si2); /* yc' = (ya-yb+yc-yd)co2 - (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = (s1 * co2) - (r1 * si2); + pSrc[(2U * i1) + 1U] = (s1 * co2) - (r1 * si2); /* (xa - xc) + (yb - yd) */ r1 = r2 + t1; @@ -579,22 +579,22 @@ uint16_t twidCoefModifier) s2 = s2 + t2; /* xb' = (xa+yb-xc-yd)co1 + (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = (r1 * co1) + (s1 * si1); + pSrc[2U * i2] = (r1 * co1) + (s1 * si1); /* yb' = (ya-xb-yc+xd)co1 - (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = (s1 * co1) - (r1 * si1); + pSrc[(2U * i2) + 1U] = (s1 * co1) - (r1 * si1); /* xd' = (xa-yb-xc+yd)co3 + (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = (r2 * co3) + (s2 * si3); + pSrc[2U * i3] = (r2 * co3) + (s2 * si3); /* yd' = (ya+xb-yc-xd)co3 - (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = (s2 * co3) - (r2 * si3); + pSrc[(2U * i3) + 1U] = (s2 * co3) - (r2 * si3); i0 += n1; } while ( i0 < fftLen); j++; - } while (j <= (n2 - 1u)); - twidCoefModifier <<= 2u; + } while (j <= (n2 - 1U)); + twidCoefModifier <<= 2U; } #endif /* #if defined (ARM_MATH_DSP) */ @@ -640,9 +640,9 @@ float32_t onebyfftLen) n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; - i0 = 0u; - ia1 = 0u; + n2 >>= 2U; + i0 = 0U; + ia1 = 0U; j = n2; @@ -656,17 +656,17 @@ float32_t onebyfftLen) i3 = i2 + n2; /* Butterfly implementation */ - xaIn = pSrc[(2u * i0)]; - yaIn = pSrc[(2u * i0) + 1u]; + xaIn = pSrc[(2U * i0)]; + yaIn = pSrc[(2U * i0) + 1U]; - xcIn = pSrc[(2u * i2)]; - ycIn = pSrc[(2u * i2) + 1u]; + xcIn = pSrc[(2U * i2)]; + ycIn = pSrc[(2U * i2) + 1U]; - xbIn = pSrc[(2u * i1)]; - ybIn = pSrc[(2u * i1) + 1u]; + xbIn = pSrc[(2U * i1)]; + ybIn = pSrc[(2U * i1) + 1U]; - xdIn = pSrc[(2u * i3)]; - ydIn = pSrc[(2u * i3) + 1u]; + xdIn = pSrc[(2U * i3)]; + ydIn = pSrc[(2U * i3) + 1U]; /* xa + xc */ Xaplusc = xaIn + xcIn; @@ -679,8 +679,8 @@ float32_t onebyfftLen) /* index calculation for the coefficients */ ia2 = ia1 + ia1; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; /* xa - xc */ Xaminusc = xaIn - xcIn; @@ -692,10 +692,10 @@ float32_t onebyfftLen) Ybminusd = ybIn - ydIn; /* xa' = xa + xb + xc + xd */ - pSrc[(2u * i0)] = Xaplusc + Xbplusd; + pSrc[(2U * i0)] = Xaplusc + Xbplusd; /* ya' = ya + yb + yc + yd */ - pSrc[(2u * i0) + 1u] = Yaplusc + Ybplusd; + pSrc[(2U * i0) + 1U] = Yaplusc + Ybplusd; /* (xa - xc) - (yb - yd) */ Xb12C_out = (Xaminusc - Ybminusd); @@ -710,13 +710,13 @@ float32_t onebyfftLen) /* (ya - yc) - (xb - xd) */ Yd12C_out = (Yaminusc - Xbminusd); - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; /* index calculation for the coefficients */ ia3 = ia2 + ia1; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; Xb12_out = Xb12C_out * co1; Yb12_out = Yb12C_out * co1; @@ -752,40 +752,40 @@ float32_t onebyfftLen) Yd12_out += p5; /* xc' = (xa-xb+xc-xd)co2 - (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = Xc12_out; + pSrc[2U * i1] = Xc12_out; /* yc' = (ya-yb+yc-yd)co2 + (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = Yc12_out; + pSrc[(2U * i1) + 1U] = Yc12_out; /* xb' = (xa+yb-xc-yd)co1 - (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = Xb12_out; + pSrc[2U * i2] = Xb12_out; /* yb' = (ya-xb-yc+xd)co1 + (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = Yb12_out; + pSrc[(2U * i2) + 1U] = Yb12_out; /* xd' = (xa-yb-xc+yd)co3 - (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = Xd12_out; + pSrc[2U * i3] = Xd12_out; /* yd' = (ya+xb-yc-xd)co3 + (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = Yd12_out; + pSrc[(2U * i3) + 1U] = Yd12_out; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; /* Updating input index */ - i0 = i0 + 1u; + i0 = i0 + 1U; } while (--j); - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; /* Calculation of second stage to excluding last stage */ - for (k = fftLen >> 2u; k > 4u; k >>= 2u) + for (k = fftLen >> 2U; k > 4U; k >>= 2U) { /* Initializations for the first stage */ n1 = n2; - n2 >>= 2u; - ia1 = 0u; + n2 >>= 2U; + ia1 = 0U; /* Calculation of first stage */ j = 0; @@ -794,12 +794,12 @@ float32_t onebyfftLen) /* index calculation for the coefficients */ ia2 = ia1 + ia1; ia3 = ia2 + ia1; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; @@ -813,17 +813,17 @@ float32_t onebyfftLen) i2 = i1 + n2; i3 = i2 + n2; - xaIn = pSrc[(2u * i0)]; - yaIn = pSrc[(2u * i0) + 1u]; + xaIn = pSrc[(2U * i0)]; + yaIn = pSrc[(2U * i0) + 1U]; - xbIn = pSrc[(2u * i1)]; - ybIn = pSrc[(2u * i1) + 1u]; + xbIn = pSrc[(2U * i1)]; + ybIn = pSrc[(2U * i1) + 1U]; - xcIn = pSrc[(2u * i2)]; - ycIn = pSrc[(2u * i2) + 1u]; + xcIn = pSrc[(2U * i2)]; + ycIn = pSrc[(2U * i2) + 1U]; - xdIn = pSrc[(2u * i3)]; - ydIn = pSrc[(2u * i3) + 1u]; + xdIn = pSrc[(2U * i3)]; + ydIn = pSrc[(2U * i3) + 1U]; /* xa - xc */ Xaminusc = xaIn - xcIn; @@ -856,8 +856,8 @@ float32_t onebyfftLen) /* (ya - yc) - (xb - xd) */ Yd12C_out = (Yaminusc - Xbminusd); - pSrc[(2u * i0)] = Xaplusc + Xbplusd; - pSrc[(2u * i0) + 1u] = Yaplusc + Ybplusd; + pSrc[(2U * i0)] = Xaplusc + Xbplusd; + pSrc[(2U * i0) + 1U] = Yaplusc + Ybplusd; Xb12_out = Xb12C_out * co1; Yb12_out = Yb12C_out * co1; @@ -893,28 +893,28 @@ float32_t onebyfftLen) Yd12_out += p5; /* xc' = (xa-xb+xc-xd)co2 - (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = Xc12_out; + pSrc[2U * i1] = Xc12_out; /* yc' = (ya-yb+yc-yd)co2 + (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = Yc12_out; + pSrc[(2U * i1) + 1U] = Yc12_out; /* xb' = (xa+yb-xc-yd)co1 - (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = Xb12_out; + pSrc[2U * i2] = Xb12_out; /* yb' = (ya-xb-yc+xd)co1 + (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = Yb12_out; + pSrc[(2U * i2) + 1U] = Yb12_out; /* xd' = (xa-yb-xc+yd)co3 - (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = Xd12_out; + pSrc[2U * i3] = Xd12_out; /* yd' = (ya+xb-yc-xd)co3 + (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = Yd12_out; + pSrc[(2U * i3) + 1U] = Yd12_out; i0 += n1; } while (i0 < fftLen); j++; - } while (j <= (n2 - 1u)); - twidCoefModifier <<= 2u; + } while (j <= (n2 - 1U)); + twidCoefModifier <<= 2U; } /* Initializations of last stage */ @@ -1002,7 +1002,7 @@ float32_t onebyfftLen) ptr1[7] = p7; /* increment source pointer by 8 for next calculations */ - ptr1 = ptr1 + 8u; + ptr1 = ptr1 + 8U; } while (--j); @@ -1017,12 +1017,12 @@ float32_t onebyfftLen) n1 = n2; /* Calculation of first stage */ - for (k = fftLen; k > 4u; k >>= 2u) + for (k = fftLen; k > 4U; k >>= 2U) { /* Initializations for the first stage */ n1 = n2; - n2 >>= 2u; - ia1 = 0u; + n2 >>= 2U; + ia1 = 0U; /* Calculation of first stage */ j = 0; @@ -1031,12 +1031,12 @@ float32_t onebyfftLen) /* index calculation for the coefficients */ ia2 = ia1 + ia1; ia3 = ia2 + ia1; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; @@ -1051,46 +1051,46 @@ float32_t onebyfftLen) i3 = i2 + n2; /* xa + xc */ - r1 = pSrc[(2u * i0)] + pSrc[(2u * i2)]; + r1 = pSrc[(2U * i0)] + pSrc[(2U * i2)]; /* xa - xc */ - r2 = pSrc[(2u * i0)] - pSrc[(2u * i2)]; + r2 = pSrc[(2U * i0)] - pSrc[(2U * i2)]; /* ya + yc */ - s1 = pSrc[(2u * i0) + 1u] + pSrc[(2u * i2) + 1u]; + s1 = pSrc[(2U * i0) + 1U] + pSrc[(2U * i2) + 1U]; /* ya - yc */ - s2 = pSrc[(2u * i0) + 1u] - pSrc[(2u * i2) + 1u]; + s2 = pSrc[(2U * i0) + 1U] - pSrc[(2U * i2) + 1U]; /* xb + xd */ - t1 = pSrc[2u * i1] + pSrc[2u * i3]; + t1 = pSrc[2U * i1] + pSrc[2U * i3]; /* xa' = xa + xb + xc + xd */ - pSrc[2u * i0] = r1 + t1; + pSrc[2U * i0] = r1 + t1; /* xa + xc -(xb + xd) */ r1 = r1 - t1; /* yb + yd */ - t2 = pSrc[(2u * i1) + 1u] + pSrc[(2u * i3) + 1u]; + t2 = pSrc[(2U * i1) + 1U] + pSrc[(2U * i3) + 1U]; /* ya' = ya + yb + yc + yd */ - pSrc[(2u * i0) + 1u] = s1 + t2; + pSrc[(2U * i0) + 1U] = s1 + t2; /* (ya + yc) - (yb + yd) */ s1 = s1 - t2; /* (yb - yd) */ - t1 = pSrc[(2u * i1) + 1u] - pSrc[(2u * i3) + 1u]; + t1 = pSrc[(2U * i1) + 1U] - pSrc[(2U * i3) + 1U]; /* (xb - xd) */ - t2 = pSrc[2u * i1] - pSrc[2u * i3]; + t2 = pSrc[2U * i1] - pSrc[2U * i3]; /* xc' = (xa-xb+xc-xd)co2 - (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = (r1 * co2) - (s1 * si2); + pSrc[2U * i1] = (r1 * co2) - (s1 * si2); /* yc' = (ya-yb+yc-yd)co2 + (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = (s1 * co2) + (r1 * si2); + pSrc[(2U * i1) + 1U] = (s1 * co2) + (r1 * si2); /* (xa - xc) - (yb - yd) */ r1 = r2 - t1; @@ -1105,29 +1105,29 @@ float32_t onebyfftLen) s2 = s2 - t2; /* xb' = (xa+yb-xc-yd)co1 - (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = (r1 * co1) - (s1 * si1); + pSrc[2U * i2] = (r1 * co1) - (s1 * si1); /* yb' = (ya-xb-yc+xd)co1 + (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = (s1 * co1) + (r1 * si1); + pSrc[(2U * i2) + 1U] = (s1 * co1) + (r1 * si1); /* xd' = (xa-yb-xc+yd)co3 - (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = (r2 * co3) - (s2 * si3); + pSrc[2U * i3] = (r2 * co3) - (s2 * si3); /* yd' = (ya+xb-yc-xd)co3 + (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = (s2 * co3) + (r2 * si3); + pSrc[(2U * i3) + 1U] = (s2 * co3) + (r2 * si3); i0 += n1; } while ( i0 < fftLen); j++; - } while (j <= (n2 - 1u)); - twidCoefModifier <<= 2u; + } while (j <= (n2 - 1U)); + twidCoefModifier <<= 2U; } /* Initializations of last stage */ n1 = n2; - n2 >>= 2u; + n2 >>= 2U; /* Calculations of last stage */ - for (i0 = 0u; i0 <= (fftLen - n1); i0 += n1) + for (i0 = 0U; i0 <= (fftLen - n1); i0 += n1) { /* index calculation for the input as, */ /* pSrc[i0 + 0], pSrc[i0 + fftLen/4], pSrc[i0 + fftLen/2], pSrc[i0 + 3fftLen/4] */ @@ -1137,46 +1137,46 @@ float32_t onebyfftLen) /* Butterfly implementation */ /* xa + xc */ - r1 = pSrc[2u * i0] + pSrc[2u * i2]; + r1 = pSrc[2U * i0] + pSrc[2U * i2]; /* xa - xc */ - r2 = pSrc[2u * i0] - pSrc[2u * i2]; + r2 = pSrc[2U * i0] - pSrc[2U * i2]; /* ya + yc */ - s1 = pSrc[(2u * i0) + 1u] + pSrc[(2u * i2) + 1u]; + s1 = pSrc[(2U * i0) + 1U] + pSrc[(2U * i2) + 1U]; /* ya - yc */ - s2 = pSrc[(2u * i0) + 1u] - pSrc[(2u * i2) + 1u]; + s2 = pSrc[(2U * i0) + 1U] - pSrc[(2U * i2) + 1U]; /* xc + xd */ - t1 = pSrc[2u * i1] + pSrc[2u * i3]; + t1 = pSrc[2U * i1] + pSrc[2U * i3]; /* xa' = xa + xb + xc + xd */ - pSrc[2u * i0] = (r1 + t1) * onebyfftLen; + pSrc[2U * i0] = (r1 + t1) * onebyfftLen; /* (xa + xb) - (xc + xd) */ r1 = r1 - t1; /* yb + yd */ - t2 = pSrc[(2u * i1) + 1u] + pSrc[(2u * i3) + 1u]; + t2 = pSrc[(2U * i1) + 1U] + pSrc[(2U * i3) + 1U]; /* ya' = ya + yb + yc + yd */ - pSrc[(2u * i0) + 1u] = (s1 + t2) * onebyfftLen; + pSrc[(2U * i0) + 1U] = (s1 + t2) * onebyfftLen; /* (ya + yc) - (yb + yd) */ s1 = s1 - t2; /* (yb-yd) */ - t1 = pSrc[(2u * i1) + 1u] - pSrc[(2u * i3) + 1u]; + t1 = pSrc[(2U * i1) + 1U] - pSrc[(2U * i3) + 1U]; /* (xb-xd) */ - t2 = pSrc[2u * i1] - pSrc[2u * i3]; + t2 = pSrc[2U * i1] - pSrc[2U * i3]; /* xc' = (xa-xb+xc-xd)co2 - (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = r1 * onebyfftLen; + pSrc[2U * i1] = r1 * onebyfftLen; /* yc' = (ya-yb+yc-yd)co2 + (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = s1 * onebyfftLen; + pSrc[(2U * i1) + 1U] = s1 * onebyfftLen; /* (xa - xc) - (yb-yd) */ r1 = r2 - t1; @@ -1191,16 +1191,16 @@ float32_t onebyfftLen) s2 = s2 - t2; /* xb' = (xa+yb-xc-yd)co1 - (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = r1 * onebyfftLen; + pSrc[2U * i2] = r1 * onebyfftLen; /* yb' = (ya-xb-yc+xd)co1 + (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = s1 * onebyfftLen; + pSrc[(2U * i2) + 1U] = s1 * onebyfftLen; /* xd' = (xa-yb-xc+yd)co3 - (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = r2 * onebyfftLen; + pSrc[2U * i3] = r2 * onebyfftLen; /* yd' = (ya+xb-yc-xd)co3 + (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = s2 * onebyfftLen; + pSrc[(2U * i3) + 1U] = s2 * onebyfftLen; } #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/TransformFunctions/arm_cfft_radix4_init_f32.c b/Source/TransformFunctions/arm_cfft_radix4_init_f32.c index 3979cabd..14ea487e 100644 --- a/Source/TransformFunctions/arm_cfft_radix4_init_f32.c +++ b/Source/TransformFunctions/arm_cfft_radix4_init_f32.c @@ -86,26 +86,26 @@ arm_status arm_cfft_radix4_init_f32( switch (S->fftLen) { - case 4096u: + case 4096U: /* Initializations of structure parameters for 4096 point FFT */ /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 1u; + S->twidCoefModifier = 1U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 1u; + S->bitRevFactor = 1U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) armBitRevTable; /* Initialise the 1/fftLen Value */ S->onebyfftLen = 0.000244140625; break; - case 1024u: + case 1024U: /* Initializations of structure parameters for 1024 point FFT */ /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 4u; + S->twidCoefModifier = 4U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 4u; + S->bitRevFactor = 4U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) & armBitRevTable[3]; /* Initialise the 1/fftLen Value */ @@ -113,26 +113,26 @@ arm_status arm_cfft_radix4_init_f32( break; - case 256u: + case 256U: /* Initializations of structure parameters for 256 point FFT */ - S->twidCoefModifier = 16u; - S->bitRevFactor = 16u; + S->twidCoefModifier = 16U; + S->bitRevFactor = 16U; S->pBitRevTable = (uint16_t *) & armBitRevTable[15]; S->onebyfftLen = 0.00390625f; break; - case 64u: + case 64U: /* Initializations of structure parameters for 64 point FFT */ - S->twidCoefModifier = 64u; - S->bitRevFactor = 64u; + S->twidCoefModifier = 64U; + S->bitRevFactor = 64U; S->pBitRevTable = (uint16_t *) & armBitRevTable[63]; S->onebyfftLen = 0.015625f; break; - case 16u: + case 16U: /* Initializations of structure parameters for 16 point FFT */ - S->twidCoefModifier = 256u; - S->bitRevFactor = 256u; + S->twidCoefModifier = 256U; + S->bitRevFactor = 256U; S->pBitRevTable = (uint16_t *) & armBitRevTable[255]; S->onebyfftLen = 0.0625f; break; diff --git a/Source/TransformFunctions/arm_cfft_radix4_init_q15.c b/Source/TransformFunctions/arm_cfft_radix4_init_q15.c index 0407319b..ed782366 100644 --- a/Source/TransformFunctions/arm_cfft_radix4_init_q15.c +++ b/Source/TransformFunctions/arm_cfft_radix4_init_q15.c @@ -82,46 +82,46 @@ arm_status arm_cfft_radix4_init_q15( /* Initializations of structure parameters depending on the FFT length */ switch (S->fftLen) { - case 4096u: + case 4096U: /* Initializations of structure parameters for 4096 point FFT */ /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 1u; + S->twidCoefModifier = 1U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 1u; + S->bitRevFactor = 1U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) armBitRevTable; break; - case 1024u: + case 1024U: /* Initializations of structure parameters for 1024 point FFT */ - S->twidCoefModifier = 4u; - S->bitRevFactor = 4u; + S->twidCoefModifier = 4U; + S->bitRevFactor = 4U; S->pBitRevTable = (uint16_t *) & armBitRevTable[3]; break; - case 256u: + case 256U: /* Initializations of structure parameters for 256 point FFT */ - S->twidCoefModifier = 16u; - S->bitRevFactor = 16u; + S->twidCoefModifier = 16U; + S->bitRevFactor = 16U; S->pBitRevTable = (uint16_t *) & armBitRevTable[15]; break; - case 64u: + case 64U: /* Initializations of structure parameters for 64 point FFT */ - S->twidCoefModifier = 64u; - S->bitRevFactor = 64u; + S->twidCoefModifier = 64U; + S->bitRevFactor = 64U; S->pBitRevTable = (uint16_t *) & armBitRevTable[63]; break; - case 16u: + case 16U: /* Initializations of structure parameters for 16 point FFT */ - S->twidCoefModifier = 256u; - S->bitRevFactor = 256u; + S->twidCoefModifier = 256U; + S->bitRevFactor = 256U; S->pBitRevTable = (uint16_t *) & armBitRevTable[255]; break; diff --git a/Source/TransformFunctions/arm_cfft_radix4_init_q31.c b/Source/TransformFunctions/arm_cfft_radix4_init_q31.c index 8d0cfd2d..6f11763c 100644 --- a/Source/TransformFunctions/arm_cfft_radix4_init_q31.c +++ b/Source/TransformFunctions/arm_cfft_radix4_init_q31.c @@ -82,43 +82,43 @@ arm_status arm_cfft_radix4_init_q31( switch (S->fftLen) { /* Initializations of structure parameters for 4096 point FFT */ - case 4096u: + case 4096U: /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 1u; + S->twidCoefModifier = 1U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 1u; + S->bitRevFactor = 1U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) armBitRevTable; break; /* Initializations of structure parameters for 1024 point FFT */ - case 1024u: + case 1024U: /* Initialise the twiddle coef modifier value */ - S->twidCoefModifier = 4u; + S->twidCoefModifier = 4U; /* Initialise the bit reversal table modifier */ - S->bitRevFactor = 4u; + S->bitRevFactor = 4U; /* Initialise the bit reversal table pointer */ S->pBitRevTable = (uint16_t *) & armBitRevTable[3]; break; - case 256u: + case 256U: /* Initializations of structure parameters for 256 point FFT */ - S->twidCoefModifier = 16u; - S->bitRevFactor = 16u; + S->twidCoefModifier = 16U; + S->bitRevFactor = 16U; S->pBitRevTable = (uint16_t *) & armBitRevTable[15]; break; - case 64u: + case 64U: /* Initializations of structure parameters for 64 point FFT */ - S->twidCoefModifier = 64u; - S->bitRevFactor = 64u; + S->twidCoefModifier = 64U; + S->bitRevFactor = 64U; S->pBitRevTable = (uint16_t *) & armBitRevTable[63]; break; - case 16u: + case 16U: /* Initializations of structure parameters for 16 point FFT */ - S->twidCoefModifier = 256u; - S->bitRevFactor = 256u; + S->twidCoefModifier = 256U; + S->bitRevFactor = 256U; S->pBitRevTable = (uint16_t *) & armBitRevTable[255]; break; diff --git a/Source/TransformFunctions/arm_cfft_radix4_q15.c b/Source/TransformFunctions/arm_cfft_radix4_q15.c index eb652610..f3451f74 100644 --- a/Source/TransformFunctions/arm_cfft_radix4_q15.c +++ b/Source/TransformFunctions/arm_cfft_radix4_q15.c @@ -80,7 +80,7 @@ void arm_cfft_radix4_q15( const arm_cfft_radix4_instance_q15 * S, q15_t * pSrc) { - if (S->ifftFlag == 1u) + if (S->ifftFlag == 1U) { /* Complex IFFT radix-4 */ arm_radix4_butterfly_inverse_q15(pSrc, S->fftLen, S->pTwiddle, S->twidCoefModifier); @@ -91,7 +91,7 @@ void arm_cfft_radix4_q15( arm_radix4_butterfly_q15(pSrc, S->fftLen, S->pTwiddle, S->twidCoefModifier); } - if (S->bitReverseFlag == 1u) + if (S->bitReverseFlag == 1U) { /* Bit Reversal */ arm_bitreversal_q15(pSrc, S->fftLen, S->bitRevFactor, S->pBitRevTable); @@ -178,10 +178,10 @@ void arm_radix4_butterfly_q15( n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; + n2 >>= 2U; /* Index for twiddle coefficient */ - ic = 0u; + ic = 0U; /* Index for input read and output write */ j = n2; @@ -241,19 +241,19 @@ void arm_radix4_butterfly_q15( R = __QSUB16(R, T); /* co2 & si2 are read from SIMD Coefficient pointer */ - C2 = _SIMD32_OFFSET(pCoef16 + (4u * ic)); + C2 = _SIMD32_OFFSET(pCoef16 + (4U * ic)); #ifndef ARM_MATH_BIG_ENDIAN /* xc' = (xa-xb+xc-xd)* co2 + (ya-yb+yc-yd)* (si2) */ - out1 = __SMUAD(C2, R) >> 16u; + out1 = __SMUAD(C2, R) >> 16U; /* yc' = (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ out2 = __SMUSDX(C2, R); #else /* xc' = (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ - out1 = __SMUSDX(R, C2) >> 16u; + out1 = __SMUSDX(R, C2) >> 16U; /* yc' = (xa-xb+xc-xd)* co2 + (ya-yb+yc-yd)* (si2) */ out2 = __SMUAD(C2, R); @@ -297,20 +297,20 @@ void arm_radix4_butterfly_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* co1 & si1 are read from SIMD Coefficient pointer */ - C1 = _SIMD32_OFFSET(pCoef16 + (2u * ic)); + C1 = _SIMD32_OFFSET(pCoef16 + (2U * ic)); /* Butterfly process for the i0+fftLen/2 sample */ #ifndef ARM_MATH_BIG_ENDIAN /* xb' = (xa+yb-xc-yd)* co1 + (ya-xb-yc+xd)* (si1) */ - out1 = __SMUAD(C1, S) >> 16u; + out1 = __SMUAD(C1, S) >> 16U; /* yb' = (ya-xb-yc+xd)* co1 - (xa+yb-xc-yd)* (si1) */ out2 = __SMUSDX(C1, S); #else /* xb' = (ya-xb-yc+xd)* co1 - (xa+yb-xc-yd)* (si1) */ - out1 = __SMUSDX(S, C1) >> 16u; + out1 = __SMUSDX(S, C1) >> 16U; /* yb' = (xa+yb-xc-yd)* co1 + (ya-xb-yc+xd)* (si1) */ out2 = __SMUAD(C1, S); @@ -323,20 +323,20 @@ void arm_radix4_butterfly_q15( /* co3 & si3 are read from SIMD Coefficient pointer */ - C3 = _SIMD32_OFFSET(pCoef16 + (6u * ic)); + C3 = _SIMD32_OFFSET(pCoef16 + (6U * ic)); /* Butterfly process for the i0+3fftLen/4 sample */ #ifndef ARM_MATH_BIG_ENDIAN /* xd' = (xa-yb-xc+yd)* co3 + (ya+xb-yc-xd)* (si3) */ - out1 = __SMUAD(C3, R) >> 16u; + out1 = __SMUAD(C3, R) >> 16U; /* yd' = (ya+xb-yc-xd)* co3 - (xa-yb-xc+yd)* (si3) */ out2 = __SMUSDX(C3, R); #else /* xd' = (ya+xb-yc-xd)* co3 - (xa-yb-xc+yd)* (si3) */ - out1 = __SMUSDX(R, C3) >> 16u; + out1 = __SMUSDX(R, C3) >> 16U; /* yd' = (xa-yb-xc+yd)* co3 + (ya+xb-yc-xd)* (si3) */ out2 = __SMUAD(C3, R); @@ -359,22 +359,22 @@ void arm_radix4_butterfly_q15( /* start of middle stage process */ /* Twiddle coefficients index modifier */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; /* Calculation of Middle stage */ - for (k = fftLen / 4u; k > 4u; k >>= 2u) + for (k = fftLen / 4U; k > 4U; k >>= 2U) { /* Initializations for the middle stage */ n1 = n2; - n2 >>= 2u; - ic = 0u; + n2 >>= 2U; + ic = 0U; - for (j = 0u; j <= (n2 - 1u); j++) + for (j = 0U; j <= (n2 - 1U); j++) { /* index calculation for the coefficients */ - C1 = _SIMD32_OFFSET(pCoef16 + (2u * ic)); - C2 = _SIMD32_OFFSET(pCoef16 + (4u * ic)); - C3 = _SIMD32_OFFSET(pCoef16 + (6u * ic)); + C1 = _SIMD32_OFFSET(pCoef16 + (2U * ic)); + C2 = _SIMD32_OFFSET(pCoef16 + (4U * ic)); + C3 = _SIMD32_OFFSET(pCoef16 + (6U * ic)); /* Twiddle coefficients index modifier */ ic = ic + twidCoefModifier; @@ -425,7 +425,7 @@ void arm_radix4_butterfly_q15( #ifndef ARM_MATH_BIG_ENDIAN /* (ya-yb+yc-yd)* (si2) + (xa-xb+xc-xd)* co2 */ - out1 = __SMUAD(C2, R) >> 16u; + out1 = __SMUAD(C2, R) >> 16U; /* (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ out2 = __SMUSDX(C2, R); @@ -433,7 +433,7 @@ void arm_radix4_butterfly_q15( #else /* (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ - out1 = __SMUSDX(R, C2) >> 16u; + out1 = __SMUSDX(R, C2) >> 16U; /* (ya-yb+yc-yd)* (si2) + (xa-xb+xc-xd)* co2 */ out2 = __SMUAD(C2, R); @@ -469,7 +469,7 @@ void arm_radix4_butterfly_q15( /* Butterfly process for the i0+fftLen/2 sample */ - out1 = __SMUAD(C1, S) >> 16u; + out1 = __SMUAD(C1, S) >> 16U; out2 = __SMUSDX(C1, S); #else @@ -482,7 +482,7 @@ void arm_radix4_butterfly_q15( /* Butterfly process for the i0+fftLen/2 sample */ - out1 = __SMUSDX(S, C1) >> 16u; + out1 = __SMUSDX(S, C1) >> 16U; out2 = __SMUAD(C1, S); #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ @@ -497,12 +497,12 @@ void arm_radix4_butterfly_q15( #ifndef ARM_MATH_BIG_ENDIAN - out1 = __SMUAD(C3, R) >> 16u; + out1 = __SMUAD(C3, R) >> 16U; out2 = __SMUSDX(C3, R); #else - out1 = __SMUSDX(R, C3) >> 16u; + out1 = __SMUSDX(R, C3) >> 16U; out2 = __SMUAD(C3, R); #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ @@ -515,7 +515,7 @@ void arm_radix4_butterfly_q15( } } /* Twiddle coefficients index modifier */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; } /* end of middle stage process */ @@ -554,7 +554,7 @@ void arm_radix4_butterfly_q15( T = __QADD16(xbyb, xdyd); /* pointer updation for writing */ - ptr1 = ptr1 - 8u; + ptr1 = ptr1 - 8U; /* xa' = xa + xb + xc + xd */ @@ -626,13 +626,13 @@ void arm_radix4_butterfly_q15( n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; + n2 >>= 2U; /* Index for twiddle coefficient */ - ic = 0u; + ic = 0U; /* Index for input read and output write */ - i0 = 0u; + i0 = 0U; j = n2; /* Input is in 1.15(q15) format */ @@ -652,18 +652,18 @@ void arm_radix4_butterfly_q15( /* input is down scale by 4 to avoid overflow */ /* Read ya (real), xa(imag) input */ - T0 = pSrc16[i0 * 2u] >> 2u; - T1 = pSrc16[(i0 * 2u) + 1u] >> 2u; + T0 = pSrc16[i0 * 2U] >> 2U; + T1 = pSrc16[(i0 * 2U) + 1U] >> 2U; /* input is down scale by 4 to avoid overflow */ /* Read yc (real), xc(imag) input */ - S0 = pSrc16[i2 * 2u] >> 2u; - S1 = pSrc16[(i2 * 2u) + 1u] >> 2u; + S0 = pSrc16[i2 * 2U] >> 2U; + S1 = pSrc16[(i2 * 2U) + 1U] >> 2U; /* R0 = (ya + yc) */ - R0 = __SSAT(T0 + S0, 16u); + R0 = __SSAT(T0 + S0, 16U); /* R1 = (xa + xc) */ - R1 = __SSAT(T1 + S1, 16u); + R1 = __SSAT(T1 + S1, 16U); /* S0 = (ya - yc) */ S0 = __SSAT(T0 - S0, 16); @@ -673,55 +673,55 @@ void arm_radix4_butterfly_q15( /* Reading i0+fftLen/4 , i0+3fftLen/4 inputs */ /* input is down scale by 4 to avoid overflow */ /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u] >> 2u; - T1 = pSrc16[(i1 * 2u) + 1u] >> 2u; + T0 = pSrc16[i1 * 2U] >> 2U; + T1 = pSrc16[(i1 * 2U) + 1U] >> 2U; /* input is down scale by 4 to avoid overflow */ /* Read yd (real), xd(imag) input */ - U0 = pSrc16[i3 * 2u] >> 2u; - U1 = pSrc16[(i3 * 2u) + 1] >> 2u; + U0 = pSrc16[i3 * 2U] >> 2U; + U1 = pSrc16[(i3 * 2U) + 1] >> 2U; /* T0 = (yb + yd) */ - T0 = __SSAT(T0 + U0, 16u); + T0 = __SSAT(T0 + U0, 16U); /* T1 = (xb + xd) */ - T1 = __SSAT(T1 + U1, 16u); + T1 = __SSAT(T1 + U1, 16U); /* writing the butterfly processed i0 sample */ /* ya' = ya + yb + yc + yd */ /* xa' = xa + xb + xc + xd */ - pSrc16[i0 * 2u] = (R0 >> 1u) + (T0 >> 1u); - pSrc16[(i0 * 2u) + 1u] = (R1 >> 1u) + (T1 >> 1u); + pSrc16[i0 * 2U] = (R0 >> 1U) + (T0 >> 1U); + pSrc16[(i0 * 2U) + 1U] = (R1 >> 1U) + (T1 >> 1U); /* R0 = (ya + yc) - (yb + yd) */ /* R1 = (xa + xc) - (xb + xd) */ - R0 = __SSAT(R0 - T0, 16u); - R1 = __SSAT(R1 - T1, 16u); + R0 = __SSAT(R0 - T0, 16U); + R1 = __SSAT(R1 - T1, 16U); /* co2 & si2 are read from Coefficient pointer */ - Co2 = pCoef16[2u * ic * 2u]; - Si2 = pCoef16[(2u * ic * 2u) + 1]; + Co2 = pCoef16[2U * ic * 2U]; + Si2 = pCoef16[(2U * ic * 2U) + 1]; /* xc' = (xa-xb+xc-xd)* co2 + (ya-yb+yc-yd)* (si2) */ - out1 = (q15_t) ((Co2 * R0 + Si2 * R1) >> 16u); + out1 = (q15_t) ((Co2 * R0 + Si2 * R1) >> 16U); /* yc' = (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ - out2 = (q15_t) ((-Si2 * R0 + Co2 * R1) >> 16u); + out2 = (q15_t) ((-Si2 * R0 + Co2 * R1) >> 16U); /* Reading i0+fftLen/4 */ /* input is down scale by 4 to avoid overflow */ /* T0 = yb, T1 = xb */ - T0 = pSrc16[i1 * 2u] >> 2; - T1 = pSrc16[(i1 * 2u) + 1] >> 2; + T0 = pSrc16[i1 * 2U] >> 2; + T1 = pSrc16[(i1 * 2U) + 1] >> 2; /* writing the butterfly processed i0 + fftLen/4 sample */ /* writing output(xc', yc') in little endian format */ - pSrc16[i1 * 2u] = out1; - pSrc16[(i1 * 2u) + 1] = out2; + pSrc16[i1 * 2U] = out1; + pSrc16[(i1 * 2U) + 1] = out2; /* Butterfly calculations */ /* input is down scale by 4 to avoid overflow */ /* U0 = yd, U1 = xd */ - U0 = pSrc16[i3 * 2u] >> 2; - U1 = pSrc16[(i3 * 2u) + 1] >> 2; + U0 = pSrc16[i3 * 2U] >> 2; + U1 = pSrc16[(i3 * 2U) + 1] >> 2; /* T0 = yb-yd */ T0 = __SSAT(T0 - U0, 16); /* T1 = xb-xd */ @@ -732,12 +732,12 @@ void arm_radix4_butterfly_q15( R1 = (q15_t) __SSAT((q31_t) (S1 + T0), 16); /* S1 = (ya-yc) - (xb- xd), S0 = (xa-xc) + (yb-yd)) */ - S0 = (q15_t) __SSAT(((q31_t) S0 + T1), 16u); - S1 = (q15_t) __SSAT(((q31_t) S1 - T0), 16u); + S0 = (q15_t) __SSAT(((q31_t) S0 + T1), 16U); + S1 = (q15_t) __SSAT(((q31_t) S1 - T0), 16U); /* co1 & si1 are read from Coefficient pointer */ - Co1 = pCoef16[ic * 2u]; - Si1 = pCoef16[(ic * 2u) + 1]; + Co1 = pCoef16[ic * 2U]; + Si1 = pCoef16[(ic * 2U) + 1]; /* Butterfly process for the i0+fftLen/2 sample */ /* xb' = (xa+yb-xc-yd)* co1 + (ya-xb-yc+xd)* (si1) */ out1 = (q15_t) ((Si1 * S1 + Co1 * S0) >> 16); @@ -745,26 +745,26 @@ void arm_radix4_butterfly_q15( out2 = (q15_t) ((-Si1 * S0 + Co1 * S1) >> 16); /* writing output(xb', yb') in little endian format */ - pSrc16[i2 * 2u] = out1; - pSrc16[(i2 * 2u) + 1] = out2; + pSrc16[i2 * 2U] = out1; + pSrc16[(i2 * 2U) + 1] = out2; /* Co3 & si3 are read from Coefficient pointer */ - Co3 = pCoef16[3u * (ic * 2u)]; - Si3 = pCoef16[(3u * (ic * 2u)) + 1]; + Co3 = pCoef16[3U * (ic * 2U)]; + Si3 = pCoef16[(3U * (ic * 2U)) + 1]; /* Butterfly process for the i0+3fftLen/4 sample */ /* xd' = (xa-yb-xc+yd)* Co3 + (ya+xb-yc-xd)* (si3) */ - out1 = (q15_t) ((Si3 * R1 + Co3 * R0) >> 16u); + out1 = (q15_t) ((Si3 * R1 + Co3 * R0) >> 16U); /* yd' = (ya+xb-yc-xd)* Co3 - (xa-yb-xc+yd)* (si3) */ - out2 = (q15_t) ((-Si3 * R0 + Co3 * R1) >> 16u); + out2 = (q15_t) ((-Si3 * R0 + Co3 * R1) >> 16U); /* writing output(xd', yd') in little endian format */ - pSrc16[i3 * 2u] = out1; - pSrc16[(i3 * 2u) + 1] = out2; + pSrc16[i3 * 2U] = out1; + pSrc16[(i3 * 2U) + 1] = out2; /* Twiddle coefficients index modifier */ ic = ic + twidCoefModifier; /* Updating input index */ - i0 = i0 + 1u; + i0 = i0 + 1U; } while (--j); /* data is in 4.11(q11) format */ @@ -775,25 +775,25 @@ void arm_radix4_butterfly_q15( /* start of middle stage process */ /* Twiddle coefficients index modifier */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; /* Calculation of Middle stage */ - for (k = fftLen / 4u; k > 4u; k >>= 2u) + for (k = fftLen / 4U; k > 4U; k >>= 2U) { /* Initializations for the middle stage */ n1 = n2; - n2 >>= 2u; - ic = 0u; + n2 >>= 2U; + ic = 0U; - for (j = 0u; j <= (n2 - 1u); j++) + for (j = 0U; j <= (n2 - 1U); j++) { /* index calculation for the coefficients */ - Co1 = pCoef16[ic * 2u]; - Si1 = pCoef16[(ic * 2u) + 1u]; - Co2 = pCoef16[2u * (ic * 2u)]; - Si2 = pCoef16[(2u * (ic * 2u)) + 1u]; - Co3 = pCoef16[3u * (ic * 2u)]; - Si3 = pCoef16[(3u * (ic * 2u)) + 1u]; + Co1 = pCoef16[ic * 2U]; + Si1 = pCoef16[(ic * 2U) + 1U]; + Co2 = pCoef16[2U * (ic * 2U)]; + Si2 = pCoef16[(2U * (ic * 2U)) + 1U]; + Co3 = pCoef16[3U * (ic * 2U)]; + Si3 = pCoef16[(3U * (ic * 2U)) + 1U]; /* Twiddle coefficients index modifier */ ic = ic + twidCoefModifier; @@ -809,12 +809,12 @@ void arm_radix4_butterfly_q15( /* Reading i0, i0+fftLen/2 inputs */ /* Read ya (real), xa(imag) input */ - T0 = pSrc16[i0 * 2u]; - T1 = pSrc16[(i0 * 2u) + 1u]; + T0 = pSrc16[i0 * 2U]; + T1 = pSrc16[(i0 * 2U) + 1U]; /* Read yc (real), xc(imag) input */ - S0 = pSrc16[i2 * 2u]; - S1 = pSrc16[(i2 * 2u) + 1u]; + S0 = pSrc16[i2 * 2U]; + S1 = pSrc16[(i2 * 2U) + 1U]; /* R0 = (ya + yc), R1 = (xa + xc) */ R0 = __SSAT(T0 + S0, 16); @@ -826,12 +826,12 @@ void arm_radix4_butterfly_q15( /* Reading i0+fftLen/4 , i0+3fftLen/4 inputs */ /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u]; - T1 = pSrc16[(i1 * 2u) + 1u]; + T0 = pSrc16[i1 * 2U]; + T1 = pSrc16[(i1 * 2U) + 1U]; /* Read yd (real), xd(imag) input */ - U0 = pSrc16[i3 * 2u]; - U1 = pSrc16[(i3 * 2u) + 1u]; + U0 = pSrc16[i3 * 2U]; + U1 = pSrc16[(i3 * 2U) + 1U]; /* T0 = (yb + yd), T1 = (xb + xd) */ @@ -842,73 +842,73 @@ void arm_radix4_butterfly_q15( /* xa' = xa + xb + xc + xd */ /* ya' = ya + yb + yc + yd */ - out1 = ((R0 >> 1u) + (T0 >> 1u)) >> 1u; - out2 = ((R1 >> 1u) + (T1 >> 1u)) >> 1u; + out1 = ((R0 >> 1U) + (T0 >> 1U)) >> 1U; + out2 = ((R1 >> 1U) + (T1 >> 1U)) >> 1U; - pSrc16[i0 * 2u] = out1; - pSrc16[(2u * i0) + 1u] = out2; + pSrc16[i0 * 2U] = out1; + pSrc16[(2U * i0) + 1U] = out2; /* R0 = (ya + yc) - (yb + yd), R1 = (xa + xc) - (xb + xd) */ - R0 = (R0 >> 1u) - (T0 >> 1u); - R1 = (R1 >> 1u) - (T1 >> 1u); + R0 = (R0 >> 1U) - (T0 >> 1U); + R1 = (R1 >> 1U) - (T1 >> 1U); /* (ya-yb+yc-yd)* (si2) + (xa-xb+xc-xd)* co2 */ - out1 = (q15_t) ((Co2 * R0 + Si2 * R1) >> 16u); + out1 = (q15_t) ((Co2 * R0 + Si2 * R1) >> 16U); /* (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ - out2 = (q15_t) ((-Si2 * R0 + Co2 * R1) >> 16u); + out2 = (q15_t) ((-Si2 * R0 + Co2 * R1) >> 16U); /* Reading i0+3fftLen/4 */ /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u]; - T1 = pSrc16[(i1 * 2u) + 1u]; + T0 = pSrc16[i1 * 2U]; + T1 = pSrc16[(i1 * 2U) + 1U]; /* writing the butterfly processed i0 + fftLen/4 sample */ /* xc' = (xa-xb+xc-xd)* co2 + (ya-yb+yc-yd)* (si2) */ /* yc' = (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ - pSrc16[i1 * 2u] = out1; - pSrc16[(i1 * 2u) + 1u] = out2; + pSrc16[i1 * 2U] = out1; + pSrc16[(i1 * 2U) + 1U] = out2; /* Butterfly calculations */ /* Read yd (real), xd(imag) input */ - U0 = pSrc16[i3 * 2u]; - U1 = pSrc16[(i3 * 2u) + 1u]; + U0 = pSrc16[i3 * 2U]; + U1 = pSrc16[(i3 * 2U) + 1U]; /* T0 = yb-yd, T1 = xb-xd */ T0 = __SSAT(T0 - U0, 16); T1 = __SSAT(T1 - U1, 16); /* R0 = (ya-yc) + (xb- xd), R1 = (xa-xc) - (yb-yd)) */ - R0 = (S0 >> 1u) - (T1 >> 1u); - R1 = (S1 >> 1u) + (T0 >> 1u); + R0 = (S0 >> 1U) - (T1 >> 1U); + R1 = (S1 >> 1U) + (T0 >> 1U); /* S0 = (ya-yc) - (xb- xd), S1 = (xa-xc) + (yb-yd)) */ - S0 = (S0 >> 1u) + (T1 >> 1u); - S1 = (S1 >> 1u) - (T0 >> 1u); + S0 = (S0 >> 1U) + (T1 >> 1U); + S1 = (S1 >> 1U) - (T0 >> 1U); /* Butterfly process for the i0+fftLen/2 sample */ - out1 = (q15_t) ((Co1 * S0 + Si1 * S1) >> 16u); + out1 = (q15_t) ((Co1 * S0 + Si1 * S1) >> 16U); - out2 = (q15_t) ((-Si1 * S0 + Co1 * S1) >> 16u); + out2 = (q15_t) ((-Si1 * S0 + Co1 * S1) >> 16U); /* xb' = (xa+yb-xc-yd)* co1 + (ya-xb-yc+xd)* (si1) */ /* yb' = (ya-xb-yc+xd)* co1 - (xa+yb-xc-yd)* (si1) */ - pSrc16[i2 * 2u] = out1; - pSrc16[(i2 * 2u) + 1u] = out2; + pSrc16[i2 * 2U] = out1; + pSrc16[(i2 * 2U) + 1U] = out2; /* Butterfly process for the i0+3fftLen/4 sample */ - out1 = (q15_t) ((Si3 * R1 + Co3 * R0) >> 16u); + out1 = (q15_t) ((Si3 * R1 + Co3 * R0) >> 16U); - out2 = (q15_t) ((-Si3 * R0 + Co3 * R1) >> 16u); + out2 = (q15_t) ((-Si3 * R0 + Co3 * R1) >> 16U); /* xd' = (xa-yb-xc+yd)* Co3 + (ya+xb-yc-xd)* (si3) */ /* yd' = (ya+xb-yc-xd)* Co3 - (xa-yb-xc+yd)* (si3) */ - pSrc16[i3 * 2u] = out1; - pSrc16[(i3 * 2u) + 1u] = out2; + pSrc16[i3 * 2U] = out1; + pSrc16[(i3 * 2U) + 1U] = out2; } } /* Twiddle coefficients index modifier */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; } /* end of middle stage process */ @@ -920,12 +920,12 @@ void arm_radix4_butterfly_q15( /* Initializations for the last stage */ n1 = n2; - n2 >>= 2u; + n2 >>= 2U; /* start of last stage process */ /* Butterfly implementation */ - for (i0 = 0u; i0 <= (fftLen - n1); i0 += n1) + for (i0 = 0U; i0 <= (fftLen - n1); i0 += n1) { /* index calculation for the input as, */ /* pSrc16[i0 + 0], pSrc16[i0 + fftLen/4], pSrc16[i0 + fftLen/2], pSrc16[i0 + 3fftLen/4] */ @@ -935,70 +935,70 @@ void arm_radix4_butterfly_q15( /* Reading i0, i0+fftLen/2 inputs */ /* Read ya (real), xa(imag) input */ - T0 = pSrc16[i0 * 2u]; - T1 = pSrc16[(i0 * 2u) + 1u]; + T0 = pSrc16[i0 * 2U]; + T1 = pSrc16[(i0 * 2U) + 1U]; /* Read yc (real), xc(imag) input */ - S0 = pSrc16[i2 * 2u]; - S1 = pSrc16[(i2 * 2u) + 1u]; + S0 = pSrc16[i2 * 2U]; + S1 = pSrc16[(i2 * 2U) + 1U]; /* R0 = (ya + yc), R1 = (xa + xc) */ - R0 = __SSAT(T0 + S0, 16u); - R1 = __SSAT(T1 + S1, 16u); + R0 = __SSAT(T0 + S0, 16U); + R1 = __SSAT(T1 + S1, 16U); /* S0 = (ya - yc), S1 = (xa - xc) */ - S0 = __SSAT(T0 - S0, 16u); - S1 = __SSAT(T1 - S1, 16u); + S0 = __SSAT(T0 - S0, 16U); + S1 = __SSAT(T1 - S1, 16U); /* Reading i0+fftLen/4 , i0+3fftLen/4 inputs */ /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u]; - T1 = pSrc16[(i1 * 2u) + 1u]; + T0 = pSrc16[i1 * 2U]; + T1 = pSrc16[(i1 * 2U) + 1U]; /* Read yd (real), xd(imag) input */ - U0 = pSrc16[i3 * 2u]; - U1 = pSrc16[(i3 * 2u) + 1u]; + U0 = pSrc16[i3 * 2U]; + U1 = pSrc16[(i3 * 2U) + 1U]; /* T0 = (yb + yd), T1 = (xb + xd)) */ - T0 = __SSAT(T0 + U0, 16u); - T1 = __SSAT(T1 + U1, 16u); + T0 = __SSAT(T0 + U0, 16U); + T1 = __SSAT(T1 + U1, 16U); /* writing the butterfly processed i0 sample */ /* xa' = xa + xb + xc + xd */ /* ya' = ya + yb + yc + yd */ - pSrc16[i0 * 2u] = (R0 >> 1u) + (T0 >> 1u); - pSrc16[(i0 * 2u) + 1u] = (R1 >> 1u) + (T1 >> 1u); + pSrc16[i0 * 2U] = (R0 >> 1U) + (T0 >> 1U); + pSrc16[(i0 * 2U) + 1U] = (R1 >> 1U) + (T1 >> 1U); /* R0 = (ya + yc) - (yb + yd), R1 = (xa + xc) - (xb + xd) */ - R0 = (R0 >> 1u) - (T0 >> 1u); - R1 = (R1 >> 1u) - (T1 >> 1u); + R0 = (R0 >> 1U) - (T0 >> 1U); + R1 = (R1 >> 1U) - (T1 >> 1U); /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u]; - T1 = pSrc16[(i1 * 2u) + 1u]; + T0 = pSrc16[i1 * 2U]; + T1 = pSrc16[(i1 * 2U) + 1U]; /* writing the butterfly processed i0 + fftLen/4 sample */ /* xc' = (xa-xb+xc-xd) */ /* yc' = (ya-yb+yc-yd) */ - pSrc16[i1 * 2u] = R0; - pSrc16[(i1 * 2u) + 1u] = R1; + pSrc16[i1 * 2U] = R0; + pSrc16[(i1 * 2U) + 1U] = R1; /* Read yd (real), xd(imag) input */ - U0 = pSrc16[i3 * 2u]; - U1 = pSrc16[(i3 * 2u) + 1u]; + U0 = pSrc16[i3 * 2U]; + U1 = pSrc16[(i3 * 2U) + 1U]; /* T0 = (yb - yd), T1 = (xb - xd) */ - T0 = __SSAT(T0 - U0, 16u); - T1 = __SSAT(T1 - U1, 16u); + T0 = __SSAT(T0 - U0, 16U); + T1 = __SSAT(T1 - U1, 16U); /* writing the butterfly processed i0 + fftLen/2 sample */ /* xb' = (xa+yb-xc-yd) */ /* yb' = (ya-xb-yc+xd) */ - pSrc16[i2 * 2u] = (S0 >> 1u) + (T1 >> 1u); - pSrc16[(i2 * 2u) + 1u] = (S1 >> 1u) - (T0 >> 1u); + pSrc16[i2 * 2U] = (S0 >> 1U) + (T1 >> 1U); + pSrc16[(i2 * 2U) + 1U] = (S1 >> 1U) - (T0 >> 1U); /* writing the butterfly processed i0 + 3fftLen/4 sample */ /* xd' = (xa-yb-xc+yd) */ /* yd' = (ya+xb-yc-xd) */ - pSrc16[i3 * 2u] = (S0 >> 1u) - (T1 >> 1u); - pSrc16[(i3 * 2u) + 1u] = (S1 >> 1u) + (T0 >> 1u); + pSrc16[i3 * 2U] = (S0 >> 1U) - (T1 >> 1U); + pSrc16[(i3 * 2U) + 1U] = (S1 >> 1U) + (T0 >> 1U); } @@ -1095,10 +1095,10 @@ void arm_radix4_butterfly_inverse_q15( n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; + n2 >>= 2U; /* Index for twiddle coefficient */ - ic = 0u; + ic = 0U; /* Index for input read and output write */ j = n2; @@ -1156,19 +1156,19 @@ void arm_radix4_butterfly_inverse_q15( R = __QSUB16(R, T); /* co2 & si2 are read from SIMD Coefficient pointer */ - C2 = _SIMD32_OFFSET(pCoef16 + (4u * ic)); + C2 = _SIMD32_OFFSET(pCoef16 + (4U * ic)); #ifndef ARM_MATH_BIG_ENDIAN /* xc' = (xa-xb+xc-xd)* co2 + (ya-yb+yc-yd)* (si2) */ - out1 = __SMUSD(C2, R) >> 16u; + out1 = __SMUSD(C2, R) >> 16U; /* yc' = (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ out2 = __SMUADX(C2, R); #else /* xc' = (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ - out1 = __SMUADX(C2, R) >> 16u; + out1 = __SMUADX(C2, R) >> 16U; /* yc' = (xa-xb+xc-xd)* co2 + (ya-yb+yc-yd)* (si2) */ out2 = __SMUSD(__QSUB16(0, C2), R); @@ -1212,20 +1212,20 @@ void arm_radix4_butterfly_inverse_q15( #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* co1 & si1 are read from SIMD Coefficient pointer */ - C1 = _SIMD32_OFFSET(pCoef16 + (2u * ic)); + C1 = _SIMD32_OFFSET(pCoef16 + (2U * ic)); /* Butterfly process for the i0+fftLen/2 sample */ #ifndef ARM_MATH_BIG_ENDIAN /* xb' = (xa+yb-xc-yd)* co1 + (ya-xb-yc+xd)* (si1) */ - out1 = __SMUSD(C1, S) >> 16u; + out1 = __SMUSD(C1, S) >> 16U; /* yb' = (ya-xb-yc+xd)* co1 - (xa+yb-xc-yd)* (si1) */ out2 = __SMUADX(C1, S); #else /* xb' = (ya-xb-yc+xd)* co1 - (xa+yb-xc-yd)* (si1) */ - out1 = __SMUADX(C1, S) >> 16u; + out1 = __SMUADX(C1, S) >> 16U; /* yb' = (xa+yb-xc-yd)* co1 + (ya-xb-yc+xd)* (si1) */ out2 = __SMUSD(__QSUB16(0, C1), S); @@ -1238,20 +1238,20 @@ void arm_radix4_butterfly_inverse_q15( /* co3 & si3 are read from SIMD Coefficient pointer */ - C3 = _SIMD32_OFFSET(pCoef16 + (6u * ic)); + C3 = _SIMD32_OFFSET(pCoef16 + (6U * ic)); /* Butterfly process for the i0+3fftLen/4 sample */ #ifndef ARM_MATH_BIG_ENDIAN /* xd' = (xa-yb-xc+yd)* co3 + (ya+xb-yc-xd)* (si3) */ - out1 = __SMUSD(C3, R) >> 16u; + out1 = __SMUSD(C3, R) >> 16U; /* yd' = (ya+xb-yc-xd)* co3 - (xa-yb-xc+yd)* (si3) */ out2 = __SMUADX(C3, R); #else /* xd' = (ya+xb-yc-xd)* co3 - (xa-yb-xc+yd)* (si3) */ - out1 = __SMUADX(C3, R) >> 16u; + out1 = __SMUADX(C3, R) >> 16U; /* yd' = (xa-yb-xc+yd)* co3 + (ya+xb-yc-xd)* (si3) */ out2 = __SMUSD(__QSUB16(0, C3), R); @@ -1274,22 +1274,22 @@ void arm_radix4_butterfly_inverse_q15( /* start of middle stage process */ /* Twiddle coefficients index modifier */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; /* Calculation of Middle stage */ - for (k = fftLen / 4u; k > 4u; k >>= 2u) + for (k = fftLen / 4U; k > 4U; k >>= 2U) { /* Initializations for the middle stage */ n1 = n2; - n2 >>= 2u; - ic = 0u; + n2 >>= 2U; + ic = 0U; - for (j = 0u; j <= (n2 - 1u); j++) + for (j = 0U; j <= (n2 - 1U); j++) { /* index calculation for the coefficients */ - C1 = _SIMD32_OFFSET(pCoef16 + (2u * ic)); - C2 = _SIMD32_OFFSET(pCoef16 + (4u * ic)); - C3 = _SIMD32_OFFSET(pCoef16 + (6u * ic)); + C1 = _SIMD32_OFFSET(pCoef16 + (2U * ic)); + C2 = _SIMD32_OFFSET(pCoef16 + (4U * ic)); + C3 = _SIMD32_OFFSET(pCoef16 + (6U * ic)); /* Twiddle coefficients index modifier */ ic = ic + twidCoefModifier; @@ -1340,7 +1340,7 @@ void arm_radix4_butterfly_inverse_q15( #ifndef ARM_MATH_BIG_ENDIAN /* (ya-yb+yc-yd)* (si2) + (xa-xb+xc-xd)* co2 */ - out1 = __SMUSD(C2, R) >> 16u; + out1 = __SMUSD(C2, R) >> 16U; /* (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ out2 = __SMUADX(C2, R); @@ -1348,7 +1348,7 @@ void arm_radix4_butterfly_inverse_q15( #else /* (ya-yb+yc-yd)* co2 - (xa-xb+xc-xd)* (si2) */ - out1 = __SMUADX(R, C2) >> 16u; + out1 = __SMUADX(R, C2) >> 16U; /* (ya-yb+yc-yd)* (si2) + (xa-xb+xc-xd)* co2 */ out2 = __SMUSD(__QSUB16(0, C2), R); @@ -1384,7 +1384,7 @@ void arm_radix4_butterfly_inverse_q15( /* Butterfly process for the i0+fftLen/2 sample */ - out1 = __SMUSD(C1, S) >> 16u; + out1 = __SMUSD(C1, S) >> 16U; out2 = __SMUADX(C1, S); #else @@ -1397,7 +1397,7 @@ void arm_radix4_butterfly_inverse_q15( /* Butterfly process for the i0+fftLen/2 sample */ - out1 = __SMUADX(S, C1) >> 16u; + out1 = __SMUADX(S, C1) >> 16U; out2 = __SMUSD(__QSUB16(0, C1), S); #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ @@ -1412,12 +1412,12 @@ void arm_radix4_butterfly_inverse_q15( #ifndef ARM_MATH_BIG_ENDIAN - out1 = __SMUSD(C3, R) >> 16u; + out1 = __SMUSD(C3, R) >> 16U; out2 = __SMUADX(C3, R); #else - out1 = __SMUADX(C3, R) >> 16u; + out1 = __SMUADX(C3, R) >> 16U; out2 = __SMUSD(__QSUB16(0, C3), R); #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ @@ -1430,7 +1430,7 @@ void arm_radix4_butterfly_inverse_q15( } } /* Twiddle coefficients index modifier */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; } /* end of middle stage process */ @@ -1468,7 +1468,7 @@ void arm_radix4_butterfly_inverse_q15( T = __QADD16(xbyb, xdyd); /* pointer updation for writing */ - ptr1 = ptr1 - 8u; + ptr1 = ptr1 - 8U; /* xa' = xa + xb + xc + xd */ @@ -1541,13 +1541,13 @@ void arm_radix4_butterfly_inverse_q15( n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; + n2 >>= 2U; /* Index for twiddle coefficient */ - ic = 0u; + ic = 0U; /* Index for input read and output write */ - i0 = 0u; + i0 = 0U; j = n2; @@ -1567,71 +1567,71 @@ void arm_radix4_butterfly_inverse_q15( /* Reading i0, i0+fftLen/2 inputs */ /* input is down scale by 4 to avoid overflow */ /* Read ya (real), xa(imag) input */ - T0 = pSrc16[i0 * 2u] >> 2u; - T1 = pSrc16[(i0 * 2u) + 1u] >> 2u; + T0 = pSrc16[i0 * 2U] >> 2U; + T1 = pSrc16[(i0 * 2U) + 1U] >> 2U; /* input is down scale by 4 to avoid overflow */ /* Read yc (real), xc(imag) input */ - S0 = pSrc16[i2 * 2u] >> 2u; - S1 = pSrc16[(i2 * 2u) + 1u] >> 2u; + S0 = pSrc16[i2 * 2U] >> 2U; + S1 = pSrc16[(i2 * 2U) + 1U] >> 2U; /* R0 = (ya + yc), R1 = (xa + xc) */ - R0 = __SSAT(T0 + S0, 16u); - R1 = __SSAT(T1 + S1, 16u); + R0 = __SSAT(T0 + S0, 16U); + R1 = __SSAT(T1 + S1, 16U); /* S0 = (ya - yc), S1 = (xa - xc) */ - S0 = __SSAT(T0 - S0, 16u); - S1 = __SSAT(T1 - S1, 16u); + S0 = __SSAT(T0 - S0, 16U); + S1 = __SSAT(T1 - S1, 16U); /* Reading i0+fftLen/4 , i0+3fftLen/4 inputs */ /* input is down scale by 4 to avoid overflow */ /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u] >> 2u; - T1 = pSrc16[(i1 * 2u) + 1u] >> 2u; + T0 = pSrc16[i1 * 2U] >> 2U; + T1 = pSrc16[(i1 * 2U) + 1U] >> 2U; /* Read yd (real), xd(imag) input */ /* input is down scale by 4 to avoid overflow */ - U0 = pSrc16[i3 * 2u] >> 2u; - U1 = pSrc16[(i3 * 2u) + 1u] >> 2u; + U0 = pSrc16[i3 * 2U] >> 2U; + U1 = pSrc16[(i3 * 2U) + 1U] >> 2U; /* T0 = (yb + yd), T1 = (xb + xd) */ - T0 = __SSAT(T0 + U0, 16u); - T1 = __SSAT(T1 + U1, 16u); + T0 = __SSAT(T0 + U0, 16U); + T1 = __SSAT(T1 + U1, 16U); /* writing the butterfly processed i0 sample */ /* xa' = xa + xb + xc + xd */ /* ya' = ya + yb + yc + yd */ - pSrc16[i0 * 2u] = (R0 >> 1u) + (T0 >> 1u); - pSrc16[(i0 * 2u) + 1u] = (R1 >> 1u) + (T1 >> 1u); + pSrc16[i0 * 2U] = (R0 >> 1U) + (T0 >> 1U); + pSrc16[(i0 * 2U) + 1U] = (R1 >> 1U) + (T1 >> 1U); /* R0 = (ya + yc) - (yb + yd), R1 = (xa + xc)- (xb + xd) */ - R0 = __SSAT(R0 - T0, 16u); - R1 = __SSAT(R1 - T1, 16u); + R0 = __SSAT(R0 - T0, 16U); + R1 = __SSAT(R1 - T1, 16U); /* co2 & si2 are read from Coefficient pointer */ - Co2 = pCoef16[2u * ic * 2u]; - Si2 = pCoef16[(2u * ic * 2u) + 1u]; + Co2 = pCoef16[2U * ic * 2U]; + Si2 = pCoef16[(2U * ic * 2U) + 1U]; /* xc' = (xa-xb+xc-xd)* co2 - (ya-yb+yc-yd)* (si2) */ - out1 = (q15_t) ((Co2 * R0 - Si2 * R1) >> 16u); + out1 = (q15_t) ((Co2 * R0 - Si2 * R1) >> 16U); /* yc' = (ya-yb+yc-yd)* co2 + (xa-xb+xc-xd)* (si2) */ - out2 = (q15_t) ((Si2 * R0 + Co2 * R1) >> 16u); + out2 = (q15_t) ((Si2 * R0 + Co2 * R1) >> 16U); /* Reading i0+fftLen/4 */ /* input is down scale by 4 to avoid overflow */ /* T0 = yb, T1 = xb */ - T0 = pSrc16[i1 * 2u] >> 2u; - T1 = pSrc16[(i1 * 2u) + 1u] >> 2u; + T0 = pSrc16[i1 * 2U] >> 2U; + T1 = pSrc16[(i1 * 2U) + 1U] >> 2U; /* writing the butterfly processed i0 + fftLen/4 sample */ /* writing output(xc', yc') in little endian format */ - pSrc16[i1 * 2u] = out1; - pSrc16[(i1 * 2u) + 1u] = out2; + pSrc16[i1 * 2U] = out1; + pSrc16[(i1 * 2U) + 1U] = out2; /* Butterfly calculations */ /* input is down scale by 4 to avoid overflow */ /* U0 = yd, U1 = xd) */ - U0 = pSrc16[i3 * 2u] >> 2u; - U1 = pSrc16[(i3 * 2u) + 1u] >> 2u; + U0 = pSrc16[i3 * 2U] >> 2U; + U1 = pSrc16[(i3 * 2U) + 1U] >> 2U; /* T0 = yb-yd, T1 = xb-xd) */ - T0 = __SSAT(T0 - U0, 16u); - T1 = __SSAT(T1 - U1, 16u); + T0 = __SSAT(T0 - U0, 16U); + T1 = __SSAT(T1 - U1, 16U); /* R0 = (ya-yc) - (xb- xd) , R1 = (xa-xc) + (yb-yd) */ R0 = (q15_t) __SSAT((q31_t) (S0 + T1), 16); R1 = (q15_t) __SSAT((q31_t) (S1 - T0), 16); @@ -1640,34 +1640,34 @@ void arm_radix4_butterfly_inverse_q15( S1 = (q15_t) __SSAT((q31_t) (S1 + T0), 16); /* co1 & si1 are read from Coefficient pointer */ - Co1 = pCoef16[ic * 2u]; - Si1 = pCoef16[(ic * 2u) + 1u]; + Co1 = pCoef16[ic * 2U]; + Si1 = pCoef16[(ic * 2U) + 1U]; /* Butterfly process for the i0+fftLen/2 sample */ /* xb' = (xa-yb-xc+yd)* co1 - (ya+xb-yc-xd)* (si1) */ - out1 = (q15_t) ((Co1 * S0 - Si1 * S1) >> 16u); + out1 = (q15_t) ((Co1 * S0 - Si1 * S1) >> 16U); /* yb' = (ya+xb-yc-xd)* co1 + (xa-yb-xc+yd)* (si1) */ - out2 = (q15_t) ((Si1 * S0 + Co1 * S1) >> 16u); + out2 = (q15_t) ((Si1 * S0 + Co1 * S1) >> 16U); /* writing output(xb', yb') in little endian format */ - pSrc16[i2 * 2u] = out1; - pSrc16[(i2 * 2u) + 1u] = out2; + pSrc16[i2 * 2U] = out1; + pSrc16[(i2 * 2U) + 1U] = out2; /* Co3 & si3 are read from Coefficient pointer */ - Co3 = pCoef16[3u * ic * 2u]; - Si3 = pCoef16[(3u * ic * 2u) + 1u]; + Co3 = pCoef16[3U * ic * 2U]; + Si3 = pCoef16[(3U * ic * 2U) + 1U]; /* Butterfly process for the i0+3fftLen/4 sample */ /* xd' = (xa+yb-xc-yd)* Co3 - (ya-xb-yc+xd)* (si3) */ - out1 = (q15_t) ((Co3 * R0 - Si3 * R1) >> 16u); + out1 = (q15_t) ((Co3 * R0 - Si3 * R1) >> 16U); /* yd' = (ya-xb-yc+xd)* Co3 + (xa+yb-xc-yd)* (si3) */ - out2 = (q15_t) ((Si3 * R0 + Co3 * R1) >> 16u); + out2 = (q15_t) ((Si3 * R0 + Co3 * R1) >> 16U); /* writing output(xd', yd') in little endian format */ - pSrc16[i3 * 2u] = out1; - pSrc16[(i3 * 2u) + 1u] = out2; + pSrc16[i3 * 2U] = out1; + pSrc16[(i3 * 2U) + 1U] = out2; /* Twiddle coefficients index modifier */ ic = ic + twidCoefModifier; /* Updating input index */ - i0 = i0 + 1u; + i0 = i0 + 1U; } while (--j); @@ -1679,25 +1679,25 @@ void arm_radix4_butterfly_inverse_q15( /* Start of Middle stage process */ /* Twiddle coefficients index modifier */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; /* Calculation of Middle stage */ - for (k = fftLen / 4u; k > 4u; k >>= 2u) + for (k = fftLen / 4U; k > 4U; k >>= 2U) { /* Initializations for the middle stage */ n1 = n2; - n2 >>= 2u; - ic = 0u; + n2 >>= 2U; + ic = 0U; - for (j = 0u; j <= (n2 - 1u); j++) + for (j = 0U; j <= (n2 - 1U); j++) { /* index calculation for the coefficients */ - Co1 = pCoef16[ic * 2u]; - Si1 = pCoef16[(ic * 2u) + 1u]; - Co2 = pCoef16[2u * ic * 2u]; - Si2 = pCoef16[2u * ic * 2u + 1u]; - Co3 = pCoef16[3u * ic * 2u]; - Si3 = pCoef16[(3u * ic * 2u) + 1u]; + Co1 = pCoef16[ic * 2U]; + Si1 = pCoef16[(ic * 2U) + 1U]; + Co2 = pCoef16[2U * ic * 2U]; + Si2 = pCoef16[2U * ic * 2U + 1U]; + Co3 = pCoef16[3U * ic * 2U]; + Si3 = pCoef16[(3U * ic * 2U) + 1U]; /* Twiddle coefficients index modifier */ ic = ic + twidCoefModifier; @@ -1713,43 +1713,43 @@ void arm_radix4_butterfly_inverse_q15( /* Reading i0, i0+fftLen/2 inputs */ /* Read ya (real), xa(imag) input */ - T0 = pSrc16[i0 * 2u]; - T1 = pSrc16[(i0 * 2u) + 1u]; + T0 = pSrc16[i0 * 2U]; + T1 = pSrc16[(i0 * 2U) + 1U]; /* Read yc (real), xc(imag) input */ - S0 = pSrc16[i2 * 2u]; - S1 = pSrc16[(i2 * 2u) + 1u]; + S0 = pSrc16[i2 * 2U]; + S1 = pSrc16[(i2 * 2U) + 1U]; /* R0 = (ya + yc), R1 = (xa + xc) */ - R0 = __SSAT(T0 + S0, 16u); - R1 = __SSAT(T1 + S1, 16u); + R0 = __SSAT(T0 + S0, 16U); + R1 = __SSAT(T1 + S1, 16U); /* S0 = (ya - yc), S1 = (xa - xc) */ - S0 = __SSAT(T0 - S0, 16u); - S1 = __SSAT(T1 - S1, 16u); + S0 = __SSAT(T0 - S0, 16U); + S1 = __SSAT(T1 - S1, 16U); /* Reading i0+fftLen/4 , i0+3fftLen/4 inputs */ /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u]; - T1 = pSrc16[(i1 * 2u) + 1u]; + T0 = pSrc16[i1 * 2U]; + T1 = pSrc16[(i1 * 2U) + 1U]; /* Read yd (real), xd(imag) input */ - U0 = pSrc16[i3 * 2u]; - U1 = pSrc16[(i3 * 2u) + 1u]; + U0 = pSrc16[i3 * 2U]; + U1 = pSrc16[(i3 * 2U) + 1U]; /* T0 = (yb + yd), T1 = (xb + xd) */ - T0 = __SSAT(T0 + U0, 16u); - T1 = __SSAT(T1 + U1, 16u); + T0 = __SSAT(T0 + U0, 16U); + T1 = __SSAT(T1 + U1, 16U); /* writing the butterfly processed i0 sample */ /* xa' = xa + xb + xc + xd */ /* ya' = ya + yb + yc + yd */ - pSrc16[i0 * 2u] = ((R0 >> 1u) + (T0 >> 1u)) >> 1u; - pSrc16[(i0 * 2u) + 1u] = ((R1 >> 1u) + (T1 >> 1u)) >> 1u; + pSrc16[i0 * 2U] = ((R0 >> 1U) + (T0 >> 1U)) >> 1U; + pSrc16[(i0 * 2U) + 1U] = ((R1 >> 1U) + (T1 >> 1U)) >> 1U; /* R0 = (ya + yc) - (yb + yd), R1 = (xa + xc) - (xb + xd) */ - R0 = (R0 >> 1u) - (T0 >> 1u); - R1 = (R1 >> 1u) - (T1 >> 1u); + R0 = (R0 >> 1U) - (T0 >> 1U); + R1 = (R1 >> 1U) - (T1 >> 1U); /* (ya-yb+yc-yd)* (si2) - (xa-xb+xc-xd)* co2 */ out1 = (q15_t) ((Co2 * R0 - Si2 * R1) >> 16); @@ -1758,54 +1758,54 @@ void arm_radix4_butterfly_inverse_q15( /* Reading i0+3fftLen/4 */ /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u]; - T1 = pSrc16[(i1 * 2u) + 1u]; + T0 = pSrc16[i1 * 2U]; + T1 = pSrc16[(i1 * 2U) + 1U]; /* writing the butterfly processed i0 + fftLen/4 sample */ /* xc' = (xa-xb+xc-xd)* co2 - (ya-yb+yc-yd)* (si2) */ /* yc' = (ya-yb+yc-yd)* co2 + (xa-xb+xc-xd)* (si2) */ - pSrc16[i1 * 2u] = out1; - pSrc16[(i1 * 2u) + 1u] = out2; + pSrc16[i1 * 2U] = out1; + pSrc16[(i1 * 2U) + 1U] = out2; /* Butterfly calculations */ /* Read yd (real), xd(imag) input */ - U0 = pSrc16[i3 * 2u]; - U1 = pSrc16[(i3 * 2u) + 1u]; + U0 = pSrc16[i3 * 2U]; + U1 = pSrc16[(i3 * 2U) + 1U]; /* T0 = yb-yd, T1 = xb-xd) */ - T0 = __SSAT(T0 - U0, 16u); - T1 = __SSAT(T1 - U1, 16u); + T0 = __SSAT(T0 - U0, 16U); + T1 = __SSAT(T1 - U1, 16U); /* R0 = (ya-yc) - (xb- xd) , R1 = (xa-xc) + (yb-yd) */ - R0 = (S0 >> 1u) + (T1 >> 1u); - R1 = (S1 >> 1u) - (T0 >> 1u); + R0 = (S0 >> 1U) + (T1 >> 1U); + R1 = (S1 >> 1U) - (T0 >> 1U); /* S1 = (ya-yc) + (xb- xd), S1 = (xa-xc) - (yb-yd) */ - S0 = (S0 >> 1u) - (T1 >> 1u); - S1 = (S1 >> 1u) + (T0 >> 1u); + S0 = (S0 >> 1U) - (T1 >> 1U); + S1 = (S1 >> 1U) + (T0 >> 1U); /* Butterfly process for the i0+fftLen/2 sample */ - out1 = (q15_t) ((Co1 * S0 - Si1 * S1) >> 16u); - out2 = (q15_t) ((Si1 * S0 + Co1 * S1) >> 16u); + out1 = (q15_t) ((Co1 * S0 - Si1 * S1) >> 16U); + out2 = (q15_t) ((Si1 * S0 + Co1 * S1) >> 16U); /* xb' = (xa-yb-xc+yd)* co1 - (ya+xb-yc-xd)* (si1) */ /* yb' = (ya+xb-yc-xd)* co1 + (xa-yb-xc+yd)* (si1) */ - pSrc16[i2 * 2u] = out1; - pSrc16[(i2 * 2u) + 1u] = out2; + pSrc16[i2 * 2U] = out1; + pSrc16[(i2 * 2U) + 1U] = out2; /* Butterfly process for the i0+3fftLen/4 sample */ - out1 = (q15_t) ((Co3 * R0 - Si3 * R1) >> 16u); + out1 = (q15_t) ((Co3 * R0 - Si3 * R1) >> 16U); - out2 = (q15_t) ((Si3 * R0 + Co3 * R1) >> 16u); + out2 = (q15_t) ((Si3 * R0 + Co3 * R1) >> 16U); /* xd' = (xa+yb-xc-yd)* Co3 - (ya-xb-yc+xd)* (si3) */ /* yd' = (ya-xb-yc+xd)* Co3 + (xa+yb-xc-yd)* (si3) */ - pSrc16[i3 * 2u] = out1; - pSrc16[(i3 * 2u) + 1u] = out2; + pSrc16[i3 * 2U] = out1; + pSrc16[(i3 * 2U) + 1U] = out2; } } /* Twiddle coefficients index modifier */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; } /* End of Middle stages process */ @@ -1820,10 +1820,10 @@ void arm_radix4_butterfly_inverse_q15( /* Initializations for the last stage */ n1 = n2; - n2 >>= 2u; + n2 >>= 2U; /* Butterfly implementation */ - for (i0 = 0u; i0 <= (fftLen - n1); i0 += n1) + for (i0 = 0U; i0 <= (fftLen - n1); i0 += n1) { /* index calculation for the input as, */ /* pSrc16[i0 + 0], pSrc16[i0 + fftLen/4], pSrc16[i0 + fftLen/2], pSrc16[i0 + 3fftLen/4] */ @@ -1833,70 +1833,70 @@ void arm_radix4_butterfly_inverse_q15( /* Reading i0, i0+fftLen/2 inputs */ /* Read ya (real), xa(imag) input */ - T0 = pSrc16[i0 * 2u]; - T1 = pSrc16[(i0 * 2u) + 1u]; + T0 = pSrc16[i0 * 2U]; + T1 = pSrc16[(i0 * 2U) + 1U]; /* Read yc (real), xc(imag) input */ - S0 = pSrc16[i2 * 2u]; - S1 = pSrc16[(i2 * 2u) + 1u]; + S0 = pSrc16[i2 * 2U]; + S1 = pSrc16[(i2 * 2U) + 1U]; /* R0 = (ya + yc), R1 = (xa + xc) */ - R0 = __SSAT(T0 + S0, 16u); - R1 = __SSAT(T1 + S1, 16u); + R0 = __SSAT(T0 + S0, 16U); + R1 = __SSAT(T1 + S1, 16U); /* S0 = (ya - yc), S1 = (xa - xc) */ - S0 = __SSAT(T0 - S0, 16u); - S1 = __SSAT(T1 - S1, 16u); + S0 = __SSAT(T0 - S0, 16U); + S1 = __SSAT(T1 - S1, 16U); /* Reading i0+fftLen/4 , i0+3fftLen/4 inputs */ /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u]; - T1 = pSrc16[(i1 * 2u) + 1u]; + T0 = pSrc16[i1 * 2U]; + T1 = pSrc16[(i1 * 2U) + 1U]; /* Read yd (real), xd(imag) input */ - U0 = pSrc16[i3 * 2u]; - U1 = pSrc16[(i3 * 2u) + 1u]; + U0 = pSrc16[i3 * 2U]; + U1 = pSrc16[(i3 * 2U) + 1U]; /* T0 = (yb + yd), T1 = (xb + xd) */ - T0 = __SSAT(T0 + U0, 16u); - T1 = __SSAT(T1 + U1, 16u); + T0 = __SSAT(T0 + U0, 16U); + T1 = __SSAT(T1 + U1, 16U); /* writing the butterfly processed i0 sample */ /* xa' = xa + xb + xc + xd */ /* ya' = ya + yb + yc + yd */ - pSrc16[i0 * 2u] = (R0 >> 1u) + (T0 >> 1u); - pSrc16[(i0 * 2u) + 1u] = (R1 >> 1u) + (T1 >> 1u); + pSrc16[i0 * 2U] = (R0 >> 1U) + (T0 >> 1U); + pSrc16[(i0 * 2U) + 1U] = (R1 >> 1U) + (T1 >> 1U); /* R0 = (ya + yc) - (yb + yd), R1 = (xa + xc) - (xb + xd) */ - R0 = (R0 >> 1u) - (T0 >> 1u); - R1 = (R1 >> 1u) - (T1 >> 1u); + R0 = (R0 >> 1U) - (T0 >> 1U); + R1 = (R1 >> 1U) - (T1 >> 1U); /* Read yb (real), xb(imag) input */ - T0 = pSrc16[i1 * 2u]; - T1 = pSrc16[(i1 * 2u) + 1u]; + T0 = pSrc16[i1 * 2U]; + T1 = pSrc16[(i1 * 2U) + 1U]; /* writing the butterfly processed i0 + fftLen/4 sample */ /* xc' = (xa-xb+xc-xd) */ /* yc' = (ya-yb+yc-yd) */ - pSrc16[i1 * 2u] = R0; - pSrc16[(i1 * 2u) + 1u] = R1; + pSrc16[i1 * 2U] = R0; + pSrc16[(i1 * 2U) + 1U] = R1; /* Read yd (real), xd(imag) input */ - U0 = pSrc16[i3 * 2u]; - U1 = pSrc16[(i3 * 2u) + 1u]; + U0 = pSrc16[i3 * 2U]; + U1 = pSrc16[(i3 * 2U) + 1U]; /* T0 = (yb - yd), T1 = (xb - xd) */ - T0 = __SSAT(T0 - U0, 16u); - T1 = __SSAT(T1 - U1, 16u); + T0 = __SSAT(T0 - U0, 16U); + T1 = __SSAT(T1 - U1, 16U); /* writing the butterfly processed i0 + fftLen/2 sample */ /* xb' = (xa-yb-xc+yd) */ /* yb' = (ya+xb-yc-xd) */ - pSrc16[i2 * 2u] = (S0 >> 1u) - (T1 >> 1u); - pSrc16[(i2 * 2u) + 1u] = (S1 >> 1u) + (T0 >> 1u); + pSrc16[i2 * 2U] = (S0 >> 1U) - (T1 >> 1U); + pSrc16[(i2 * 2U) + 1U] = (S1 >> 1U) + (T0 >> 1U); /* writing the butterfly processed i0 + 3fftLen/4 sample */ /* xd' = (xa+yb-xc-yd) */ /* yd' = (ya-xb-yc+xd) */ - pSrc16[i3 * 2u] = (S0 >> 1u) + (T1 >> 1u); - pSrc16[(i3 * 2u) + 1u] = (S1 >> 1u) - (T0 >> 1u); + pSrc16[i3 * 2U] = (S0 >> 1U) + (T1 >> 1U); + pSrc16[(i3 * 2U) + 1U] = (S1 >> 1U) - (T0 >> 1U); } /* end of last stage process */ diff --git a/Source/TransformFunctions/arm_cfft_radix4_q31.c b/Source/TransformFunctions/arm_cfft_radix4_q31.c index 7296312f..95292e46 100644 --- a/Source/TransformFunctions/arm_cfft_radix4_q31.c +++ b/Source/TransformFunctions/arm_cfft_radix4_q31.c @@ -79,7 +79,7 @@ void arm_cfft_radix4_q31( const arm_cfft_radix4_instance_q31 * S, q31_t * pSrc) { - if (S->ifftFlag == 1u) + if (S->ifftFlag == 1U) { /* Complex IFFT radix-4 */ arm_radix4_butterfly_inverse_q31(pSrc, S->fftLen, S->pTwiddle, S->twidCoefModifier); @@ -90,7 +90,7 @@ void arm_cfft_radix4_q31( arm_radix4_butterfly_q31(pSrc, S->fftLen, S->pTwiddle, S->twidCoefModifier); } - if (S->bitReverseFlag == 1u) + if (S->bitReverseFlag == 1U) { /* Bit Reversal */ arm_bitreversal_q31(pSrc, S->fftLen, S->bitRevFactor, S->pBitRevTable); @@ -173,9 +173,9 @@ void arm_radix4_butterfly_q31( n2 = fftLen; n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; - i0 = 0u; - ia1 = 0u; + n2 >>= 2U; + i0 = 0U; + ia1 = 0U; j = n2; @@ -183,7 +183,7 @@ void arm_radix4_butterfly_q31( do { /* index calculation for the input as, */ - /* pSrc[i0 + 0], pSrc[i0 + fftLen/4], pSrc[i0 + fftLen/2u], pSrc[i0 + 3fftLen/4] */ + /* pSrc[i0 + 0], pSrc[i0 + fftLen/4], pSrc[i0 + fftLen/2U], pSrc[i0 + 3fftLen/4] */ i1 = i0 + n2; i2 = i1 + n2; i3 = i2 + n2; @@ -192,48 +192,48 @@ void arm_radix4_butterfly_q31( /* Butterfly implementation */ /* xa + xc */ - r1 = (pSrc[(2u * i0)] >> 4u) + (pSrc[(2u * i2)] >> 4u); + r1 = (pSrc[(2U * i0)] >> 4U) + (pSrc[(2U * i2)] >> 4U); /* xa - xc */ - r2 = (pSrc[2u * i0] >> 4u) - (pSrc[2u * i2] >> 4u); + r2 = (pSrc[2U * i0] >> 4U) - (pSrc[2U * i2] >> 4U); /* xb + xd */ - t1 = (pSrc[2u * i1] >> 4u) + (pSrc[2u * i3] >> 4u); + t1 = (pSrc[2U * i1] >> 4U) + (pSrc[2U * i3] >> 4U); /* ya + yc */ - s1 = (pSrc[(2u * i0) + 1u] >> 4u) + (pSrc[(2u * i2) + 1u] >> 4u); + s1 = (pSrc[(2U * i0) + 1U] >> 4U) + (pSrc[(2U * i2) + 1U] >> 4U); /* ya - yc */ - s2 = (pSrc[(2u * i0) + 1u] >> 4u) - (pSrc[(2u * i2) + 1u] >> 4u); + s2 = (pSrc[(2U * i0) + 1U] >> 4U) - (pSrc[(2U * i2) + 1U] >> 4U); /* xa' = xa + xb + xc + xd */ - pSrc[2u * i0] = (r1 + t1); + pSrc[2U * i0] = (r1 + t1); /* (xa + xc) - (xb + xd) */ r1 = r1 - t1; /* yb + yd */ - t2 = (pSrc[(2u * i1) + 1u] >> 4u) + (pSrc[(2u * i3) + 1u] >> 4u); + t2 = (pSrc[(2U * i1) + 1U] >> 4U) + (pSrc[(2U * i3) + 1U] >> 4U); /* ya' = ya + yb + yc + yd */ - pSrc[(2u * i0) + 1u] = (s1 + t2); + pSrc[(2U * i0) + 1U] = (s1 + t2); /* (ya + yc) - (yb + yd) */ s1 = s1 - t2; /* yb - yd */ - t1 = (pSrc[(2u * i1) + 1u] >> 4u) - (pSrc[(2u * i3) + 1u] >> 4u); + t1 = (pSrc[(2U * i1) + 1U] >> 4U) - (pSrc[(2U * i3) + 1U] >> 4U); /* xb - xd */ - t2 = (pSrc[2u * i1] >> 4u) - (pSrc[2u * i3] >> 4u); + t2 = (pSrc[2U * i1] >> 4U) - (pSrc[2U * i3] >> 4U); /* index calculation for the coefficients */ - ia2 = 2u * ia1; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; + ia2 = 2U * ia1; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; /* xc' = (xa-xb+xc-xd)co2 + (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = (((int32_t) (((q63_t) r1 * co2) >> 32)) + - ((int32_t) (((q63_t) s1 * si2) >> 32))) << 1u; + pSrc[2U * i1] = (((int32_t) (((q63_t) r1 * co2) >> 32)) + + ((int32_t) (((q63_t) s1 * si2) >> 32))) << 1U; /* yc' = (ya-yb+yc-yd)co2 - (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = (((int32_t) (((q63_t) s1 * co2) >> 32)) - - ((int32_t) (((q63_t) r1 * si2) >> 32))) << 1u; + pSrc[(2U * i1) + 1U] = (((int32_t) (((q63_t) s1 * co2) >> 32)) - + ((int32_t) (((q63_t) r1 * si2) >> 32))) << 1U; /* (xa - xc) + (yb - yd) */ r1 = r2 + t1; @@ -245,35 +245,35 @@ void arm_radix4_butterfly_q31( /* (ya - yc) + (xb - xd) */ s2 = s2 + t2; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; /* xb' = (xa+yb-xc-yd)co1 + (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = (((int32_t) (((q63_t) r1 * co1) >> 32)) + - ((int32_t) (((q63_t) s1 * si1) >> 32))) << 1u; + pSrc[2U * i2] = (((int32_t) (((q63_t) r1 * co1) >> 32)) + + ((int32_t) (((q63_t) s1 * si1) >> 32))) << 1U; /* yb' = (ya-xb-yc+xd)co1 - (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = (((int32_t) (((q63_t) s1 * co1) >> 32)) - - ((int32_t) (((q63_t) r1 * si1) >> 32))) << 1u; + pSrc[(2U * i2) + 1U] = (((int32_t) (((q63_t) s1 * co1) >> 32)) - + ((int32_t) (((q63_t) r1 * si1) >> 32))) << 1U; /* index calculation for the coefficients */ - ia3 = 3u * ia1; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + ia3 = 3U * ia1; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* xd' = (xa-yb-xc+yd)co3 + (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = (((int32_t) (((q63_t) r2 * co3) >> 32)) + - ((int32_t) (((q63_t) s2 * si3) >> 32))) << 1u; + pSrc[2U * i3] = (((int32_t) (((q63_t) r2 * co3) >> 32)) + + ((int32_t) (((q63_t) s2 * si3) >> 32))) << 1U; /* yd' = (ya+xb-yc-xd)co3 - (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = (((int32_t) (((q63_t) s2 * co3) >> 32)) - - ((int32_t) (((q63_t) r2 * si3) >> 32))) << 1u; + pSrc[(2U * i3) + 1U] = (((int32_t) (((q63_t) s2 * co3) >> 32)) - + ((int32_t) (((q63_t) r2 * si3) >> 32))) << 1U; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; /* Updating input index */ - i0 = i0 + 1u; + i0 = i0 + 1U; } while (--j); @@ -287,78 +287,78 @@ void arm_radix4_butterfly_q31( /* each stage in middle stages provides two down scaling of the input */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; - for (k = fftLen / 4u; k > 4u; k >>= 2u) + for (k = fftLen / 4U; k > 4U; k >>= 2U) { /* Initializations for the first stage */ n1 = n2; - n2 >>= 2u; - ia1 = 0u; + n2 >>= 2U; + ia1 = 0U; /* Calculation of first stage */ - for (j = 0u; j <= (n2 - 1u); j++) + for (j = 0U; j <= (n2 - 1U); j++) { /* index calculation for the coefficients */ ia2 = ia1 + ia1; ia3 = ia2 + ia1; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; for (i0 = j; i0 < fftLen; i0 += n1) { /* index calculation for the input as, */ - /* pSrc[i0 + 0], pSrc[i0 + fftLen/4], pSrc[i0 + fftLen/2u], pSrc[i0 + 3fftLen/4] */ + /* pSrc[i0 + 0], pSrc[i0 + fftLen/4], pSrc[i0 + fftLen/2U], pSrc[i0 + 3fftLen/4] */ i1 = i0 + n2; i2 = i1 + n2; i3 = i2 + n2; /* Butterfly implementation */ /* xa + xc */ - r1 = pSrc[2u * i0] + pSrc[2u * i2]; + r1 = pSrc[2U * i0] + pSrc[2U * i2]; /* xa - xc */ - r2 = pSrc[2u * i0] - pSrc[2u * i2]; + r2 = pSrc[2U * i0] - pSrc[2U * i2]; /* ya + yc */ - s1 = pSrc[(2u * i0) + 1u] + pSrc[(2u * i2) + 1u]; + s1 = pSrc[(2U * i0) + 1U] + pSrc[(2U * i2) + 1U]; /* ya - yc */ - s2 = pSrc[(2u * i0) + 1u] - pSrc[(2u * i2) + 1u]; + s2 = pSrc[(2U * i0) + 1U] - pSrc[(2U * i2) + 1U]; /* xb + xd */ - t1 = pSrc[2u * i1] + pSrc[2u * i3]; + t1 = pSrc[2U * i1] + pSrc[2U * i3]; /* xa' = xa + xb + xc + xd */ - pSrc[2u * i0] = (r1 + t1) >> 2u; + pSrc[2U * i0] = (r1 + t1) >> 2U; /* xa + xc -(xb + xd) */ r1 = r1 - t1; /* yb + yd */ - t2 = pSrc[(2u * i1) + 1u] + pSrc[(2u * i3) + 1u]; + t2 = pSrc[(2U * i1) + 1U] + pSrc[(2U * i3) + 1U]; /* ya' = ya + yb + yc + yd */ - pSrc[(2u * i0) + 1u] = (s1 + t2) >> 2u; + pSrc[(2U * i0) + 1U] = (s1 + t2) >> 2U; /* (ya + yc) - (yb + yd) */ s1 = s1 - t2; /* (yb - yd) */ - t1 = pSrc[(2u * i1) + 1u] - pSrc[(2u * i3) + 1u]; + t1 = pSrc[(2U * i1) + 1U] - pSrc[(2U * i3) + 1U]; /* (xb - xd) */ - t2 = pSrc[2u * i1] - pSrc[2u * i3]; + t2 = pSrc[2U * i1] - pSrc[2U * i3]; /* xc' = (xa-xb+xc-xd)co2 + (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = (((int32_t) (((q63_t) r1 * co2) >> 32)) + - ((int32_t) (((q63_t) s1 * si2) >> 32))) >> 1u; + pSrc[2U * i1] = (((int32_t) (((q63_t) r1 * co2) >> 32)) + + ((int32_t) (((q63_t) s1 * si2) >> 32))) >> 1U; /* yc' = (ya-yb+yc-yd)co2 - (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = (((int32_t) (((q63_t) s1 * co2) >> 32)) - - ((int32_t) (((q63_t) r1 * si2) >> 32))) >> 1u; + pSrc[(2U * i1) + 1U] = (((int32_t) (((q63_t) s1 * co2) >> 32)) - + ((int32_t) (((q63_t) r1 * si2) >> 32))) >> 1U; /* (xa - xc) + (yb - yd) */ r1 = r2 + t1; @@ -371,23 +371,23 @@ void arm_radix4_butterfly_q31( s2 = s2 + t2; /* xb' = (xa+yb-xc-yd)co1 + (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = (((int32_t) (((q63_t) r1 * co1) >> 32)) + - ((int32_t) (((q63_t) s1 * si1) >> 32))) >> 1u; + pSrc[2U * i2] = (((int32_t) (((q63_t) r1 * co1) >> 32)) + + ((int32_t) (((q63_t) s1 * si1) >> 32))) >> 1U; /* yb' = (ya-xb-yc+xd)co1 - (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = (((int32_t) (((q63_t) s1 * co1) >> 32)) - - ((int32_t) (((q63_t) r1 * si1) >> 32))) >> 1u; + pSrc[(2U * i2) + 1U] = (((int32_t) (((q63_t) s1 * co1) >> 32)) - + ((int32_t) (((q63_t) r1 * si1) >> 32))) >> 1U; /* xd' = (xa-yb-xc+yd)co3 + (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = (((int32_t) (((q63_t) r2 * co3) >> 32)) + - ((int32_t) (((q63_t) s2 * si3) >> 32))) >> 1u; + pSrc[2U * i3] = (((int32_t) (((q63_t) r2 * co3) >> 32)) + + ((int32_t) (((q63_t) s2 * si3) >> 32))) >> 1U; /* yd' = (ya+xb-yc-xd)co3 - (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = (((int32_t) (((q63_t) s2 * co3) >> 32)) - - ((int32_t) (((q63_t) r2 * si3) >> 32))) >> 1u; + pSrc[(2U * i3) + 1U] = (((int32_t) (((q63_t) s2 * co3) >> 32)) - + ((int32_t) (((q63_t) r2 * si3) >> 32))) >> 1U; } } - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; } #else uint32_t n1, n2, ia1, ia2, ia3, i0, j, k; @@ -415,9 +415,9 @@ void arm_radix4_butterfly_q31( n2 = fftLen; n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; + n2 >>= 2U; - ia1 = 0u; + ia1 = 0U; j = n2; @@ -433,24 +433,24 @@ void arm_radix4_butterfly_q31( /* Butterfly implementation */ /* xa + xc */ - r1 = (pSi0[0] >> 4u) + (pSi2[0] >> 4u); + r1 = (pSi0[0] >> 4U) + (pSi2[0] >> 4U); /* xa - xc */ - r2 = (pSi0[0] >> 4u) - (pSi2[0] >> 4u); + r2 = (pSi0[0] >> 4U) - (pSi2[0] >> 4U); /* xb + xd */ - t1 = (pSi1[0] >> 4u) + (pSi3[0] >> 4u); + t1 = (pSi1[0] >> 4U) + (pSi3[0] >> 4U); /* ya + yc */ - s1 = (pSi0[1] >> 4u) + (pSi2[1] >> 4u); + s1 = (pSi0[1] >> 4U) + (pSi2[1] >> 4U); /* ya - yc */ - s2 = (pSi0[1] >> 4u) - (pSi2[1] >> 4u); + s2 = (pSi0[1] >> 4U) - (pSi2[1] >> 4U); /* xa' = xa + xb + xc + xd */ *pSi0++ = (r1 + t1); /* (xa + xc) - (xb + xd) */ r1 = r1 - t1; /* yb + yd */ - t2 = (pSi1[1] >> 4u) + (pSi3[1] >> 4u); + t2 = (pSi1[1] >> 4U) + (pSi3[1] >> 4U); /* ya' = ya + yb + yc + yd */ *pSi0++ = (s1 + t2); @@ -459,22 +459,22 @@ void arm_radix4_butterfly_q31( s1 = s1 - t2; /* yb - yd */ - t1 = (pSi1[1] >> 4u) - (pSi3[1] >> 4u); + t1 = (pSi1[1] >> 4U) - (pSi3[1] >> 4U); /* xb - xd */ - t2 = (pSi1[0] >> 4u) - (pSi3[0] >> 4u); + t2 = (pSi1[0] >> 4U) - (pSi3[0] >> 4U); /* index calculation for the coefficients */ - ia2 = 2u * ia1; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; + ia2 = 2U * ia1; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; /* xc' = (xa-xb+xc-xd)co2 + (ya-yb+yc-yd)(si2) */ *pSi1++ = (((int32_t) (((q63_t) r1 * co2) >> 32)) + - ((int32_t) (((q63_t) s1 * si2) >> 32))) << 1u; + ((int32_t) (((q63_t) s1 * si2) >> 32))) << 1U; /* yc' = (ya-yb+yc-yd)co2 - (xa-xb+xc-xd)(si2) */ *pSi1++ = (((int32_t) (((q63_t) s1 * co2) >> 32)) - - ((int32_t) (((q63_t) r1 * si2) >> 32))) << 1u; + ((int32_t) (((q63_t) r1 * si2) >> 32))) << 1U; /* (xa - xc) + (yb - yd) */ r1 = r2 + t1; @@ -486,29 +486,29 @@ void arm_radix4_butterfly_q31( /* (ya - yc) + (xb - xd) */ s2 = s2 + t2; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; /* xb' = (xa+yb-xc-yd)co1 + (ya-xb-yc+xd)(si1) */ *pSi2++ = (((int32_t) (((q63_t) r1 * co1) >> 32)) + - ((int32_t) (((q63_t) s1 * si1) >> 32))) << 1u; + ((int32_t) (((q63_t) s1 * si1) >> 32))) << 1U; /* yb' = (ya-xb-yc+xd)co1 - (xa+yb-xc-yd)(si1) */ *pSi2++ = (((int32_t) (((q63_t) s1 * co1) >> 32)) - - ((int32_t) (((q63_t) r1 * si1) >> 32))) << 1u; + ((int32_t) (((q63_t) r1 * si1) >> 32))) << 1U; /* index calculation for the coefficients */ - ia3 = 3u * ia1; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + ia3 = 3U * ia1; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* xd' = (xa-yb-xc+yd)co3 + (ya+xb-yc-xd)(si3) */ *pSi3++ = (((int32_t) (((q63_t) r2 * co3) >> 32)) + - ((int32_t) (((q63_t) s2 * si3) >> 32))) << 1u; + ((int32_t) (((q63_t) s2 * si3) >> 32))) << 1U; /* yd' = (ya+xb-yc-xd)co3 - (xa-yb-xc+yd)(si3) */ *pSi3++ = (((int32_t) (((q63_t) s2 * co3) >> 32)) - - ((int32_t) (((q63_t) r2 * si3) >> 32))) << 1u; + ((int32_t) (((q63_t) r2 * si3) >> 32))) << 1U; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; @@ -525,28 +525,28 @@ void arm_radix4_butterfly_q31( /* each stage in middle stages provides two down scaling of the input */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; - for (k = fftLen / 4u; k > 4u; k >>= 2u) + for (k = fftLen / 4U; k > 4U; k >>= 2U) { /* Initializations for the first stage */ n1 = n2; - n2 >>= 2u; - ia1 = 0u; + n2 >>= 2U; + ia1 = 0U; /* Calculation of first stage */ - for (j = 0u; j <= (n2 - 1u); j++) + for (j = 0U; j <= (n2 - 1U); j++) { /* index calculation for the coefficients */ ia2 = ia1 + ia1; ia3 = ia2 + ia1; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; @@ -577,7 +577,7 @@ void arm_radix4_butterfly_q31( /* xa' = xa + xb + xc + xd */ - pSi0[0] = (r1 + t1) >> 2u; + pSi0[0] = (r1 + t1) >> 2U; /* xa + xc -(xb + xd) */ r1 = r1 - t1; @@ -585,7 +585,7 @@ void arm_radix4_butterfly_q31( t2 = pSi1[1] + pSi3[1]; /* ya' = ya + yb + yc + yd */ - pSi0[1] = (s1 + t2) >> 2u; + pSi0[1] = (s1 + t2) >> 2U; pSi0 += 2 * n1; /* (ya + yc) - (yb + yd) */ @@ -600,11 +600,11 @@ void arm_radix4_butterfly_q31( /* xc' = (xa-xb+xc-xd)co2 + (ya-yb+yc-yd)(si2) */ pSi1[0] = (((int32_t) (((q63_t) r1 * co2) >> 32)) + - ((int32_t) (((q63_t) s1 * si2) >> 32))) >> 1u; + ((int32_t) (((q63_t) s1 * si2) >> 32))) >> 1U; /* yc' = (ya-yb+yc-yd)co2 - (xa-xb+xc-xd)(si2) */ pSi1[1] = (((int32_t) (((q63_t) s1 * co2) >> 32)) - - ((int32_t) (((q63_t) r1 * si2) >> 32))) >> 1u; + ((int32_t) (((q63_t) r1 * si2) >> 32))) >> 1U; pSi1 += 2 * n1; /* (xa - xc) + (yb - yd) */ @@ -619,24 +619,24 @@ void arm_radix4_butterfly_q31( /* xb' = (xa+yb-xc-yd)co1 + (ya-xb-yc+xd)(si1) */ pSi2[0] = (((int32_t) (((q63_t) r1 * co1) >> 32)) + - ((int32_t) (((q63_t) s1 * si1) >> 32))) >> 1u; + ((int32_t) (((q63_t) s1 * si1) >> 32))) >> 1U; /* yb' = (ya-xb-yc+xd)co1 - (xa+yb-xc-yd)(si1) */ pSi2[1] = (((int32_t) (((q63_t) s1 * co1) >> 32)) - - ((int32_t) (((q63_t) r1 * si1) >> 32))) >> 1u; + ((int32_t) (((q63_t) r1 * si1) >> 32))) >> 1U; pSi2 += 2 * n1; /* xd' = (xa-yb-xc+yd)co3 + (ya+xb-yc-xd)(si3) */ pSi3[0] = (((int32_t) (((q63_t) r2 * co3) >> 32)) + - ((int32_t) (((q63_t) s2 * si3) >> 32))) >> 1u; + ((int32_t) (((q63_t) s2 * si3) >> 32))) >> 1U; /* yd' = (ya+xb-yc-xd)co3 - (xa-yb-xc+yd)(si3) */ pSi3[1] = (((int32_t) (((q63_t) s2 * co3) >> 32)) - - ((int32_t) (((q63_t) r2 * si3) >> 32))) >> 1u; + ((int32_t) (((q63_t) r2 * si3) >> 32))) >> 1U; pSi3 += 2 * n1; } } - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; } #endif @@ -711,7 +711,7 @@ void arm_radix4_butterfly_q31( ya_out = ya + yb + yc + yd; /* pointer updation for writing */ - ptr1 = ptr1 - 8u; + ptr1 = ptr1 - 8U; /* writing xa' and ya' */ *ptr1++ = xa_out; @@ -828,9 +828,9 @@ void arm_radix4_butterfly_inverse_q31( n2 = fftLen; n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; - i0 = 0u; - ia1 = 0u; + n2 >>= 2U; + i0 = 0U; + ia1 = 0U; j = n2; @@ -840,54 +840,54 @@ void arm_radix4_butterfly_inverse_q31( /* input is in 1.31(q31) format and provide 4 guard bits for the input */ /* index calculation for the input as, */ - /* pSrc[i0 + 0], pSrc[i0 + fftLen/4], pSrc[i0 + fftLen/2u], pSrc[i0 + 3fftLen/4] */ + /* pSrc[i0 + 0], pSrc[i0 + fftLen/4], pSrc[i0 + fftLen/2U], pSrc[i0 + 3fftLen/4] */ i1 = i0 + n2; i2 = i1 + n2; i3 = i2 + n2; /* Butterfly implementation */ /* xa + xc */ - r1 = (pSrc[2u * i0] >> 4u) + (pSrc[2u * i2] >> 4u); + r1 = (pSrc[2U * i0] >> 4U) + (pSrc[2U * i2] >> 4U); /* xa - xc */ - r2 = (pSrc[2u * i0] >> 4u) - (pSrc[2u * i2] >> 4u); + r2 = (pSrc[2U * i0] >> 4U) - (pSrc[2U * i2] >> 4U); /* xb + xd */ - t1 = (pSrc[2u * i1] >> 4u) + (pSrc[2u * i3] >> 4u); + t1 = (pSrc[2U * i1] >> 4U) + (pSrc[2U * i3] >> 4U); /* ya + yc */ - s1 = (pSrc[(2u * i0) + 1u] >> 4u) + (pSrc[(2u * i2) + 1u] >> 4u); + s1 = (pSrc[(2U * i0) + 1U] >> 4U) + (pSrc[(2U * i2) + 1U] >> 4U); /* ya - yc */ - s2 = (pSrc[(2u * i0) + 1u] >> 4u) - (pSrc[(2u * i2) + 1u] >> 4u); + s2 = (pSrc[(2U * i0) + 1U] >> 4U) - (pSrc[(2U * i2) + 1U] >> 4U); /* xa' = xa + xb + xc + xd */ - pSrc[2u * i0] = (r1 + t1); + pSrc[2U * i0] = (r1 + t1); /* (xa + xc) - (xb + xd) */ r1 = r1 - t1; /* yb + yd */ - t2 = (pSrc[(2u * i1) + 1u] >> 4u) + (pSrc[(2u * i3) + 1u] >> 4u); + t2 = (pSrc[(2U * i1) + 1U] >> 4U) + (pSrc[(2U * i3) + 1U] >> 4U); /* ya' = ya + yb + yc + yd */ - pSrc[(2u * i0) + 1u] = (s1 + t2); + pSrc[(2U * i0) + 1U] = (s1 + t2); /* (ya + yc) - (yb + yd) */ s1 = s1 - t2; /* yb - yd */ - t1 = (pSrc[(2u * i1) + 1u] >> 4u) - (pSrc[(2u * i3) + 1u] >> 4u); + t1 = (pSrc[(2U * i1) + 1U] >> 4U) - (pSrc[(2U * i3) + 1U] >> 4U); /* xb - xd */ - t2 = (pSrc[2u * i1] >> 4u) - (pSrc[2u * i3] >> 4u); + t2 = (pSrc[2U * i1] >> 4U) - (pSrc[2U * i3] >> 4U); /* index calculation for the coefficients */ - ia2 = 2u * ia1; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; + ia2 = 2U * ia1; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; /* xc' = (xa-xb+xc-xd)co2 - (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = (((int32_t) (((q63_t) r1 * co2) >> 32)) - - ((int32_t) (((q63_t) s1 * si2) >> 32))) << 1u; + pSrc[2U * i1] = (((int32_t) (((q63_t) r1 * co2) >> 32)) - + ((int32_t) (((q63_t) s1 * si2) >> 32))) << 1U; /* yc' = (ya-yb+yc-yd)co2 + (xa-xb+xc-xd)(si2) */ - pSrc[2u * i1 + 1u] = (((int32_t) (((q63_t) s1 * co2) >> 32)) + - ((int32_t) (((q63_t) r1 * si2) >> 32))) << 1u; + pSrc[2U * i1 + 1U] = (((int32_t) (((q63_t) s1 * co2) >> 32)) + + ((int32_t) (((q63_t) r1 * si2) >> 32))) << 1U; /* (xa - xc) - (yb - yd) */ r1 = r2 - t1; @@ -899,35 +899,35 @@ void arm_radix4_butterfly_inverse_q31( /* (ya - yc) - (xb - xd) */ s2 = s2 - t2; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; /* xb' = (xa+yb-xc-yd)co1 - (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = (((int32_t) (((q63_t) r1 * co1) >> 32)) - - ((int32_t) (((q63_t) s1 * si1) >> 32))) << 1u; + pSrc[2U * i2] = (((int32_t) (((q63_t) r1 * co1) >> 32)) - + ((int32_t) (((q63_t) s1 * si1) >> 32))) << 1U; /* yb' = (ya-xb-yc+xd)co1 + (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = (((int32_t) (((q63_t) s1 * co1) >> 32)) + - ((int32_t) (((q63_t) r1 * si1) >> 32))) << 1u; + pSrc[(2U * i2) + 1U] = (((int32_t) (((q63_t) s1 * co1) >> 32)) + + ((int32_t) (((q63_t) r1 * si1) >> 32))) << 1U; /* index calculation for the coefficients */ - ia3 = 3u * ia1; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + ia3 = 3U * ia1; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* xd' = (xa-yb-xc+yd)co3 - (ya+xb-yc-xd)(si3) */ - pSrc[2u * i3] = (((int32_t) (((q63_t) r2 * co3) >> 32)) - - ((int32_t) (((q63_t) s2 * si3) >> 32))) << 1u; + pSrc[2U * i3] = (((int32_t) (((q63_t) r2 * co3) >> 32)) - + ((int32_t) (((q63_t) s2 * si3) >> 32))) << 1U; /* yd' = (ya+xb-yc-xd)co3 + (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = (((int32_t) (((q63_t) s2 * co3) >> 32)) + - ((int32_t) (((q63_t) r2 * si3) >> 32))) << 1u; + pSrc[(2U * i3) + 1U] = (((int32_t) (((q63_t) s2 * co3) >> 32)) + + ((int32_t) (((q63_t) r2 * si3) >> 32))) << 1U; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; /* Updating input index */ - i0 = i0 + 1u; + i0 = i0 + 1U; } while (--j); @@ -937,77 +937,77 @@ void arm_radix4_butterfly_inverse_q31( /* Start of Middle stages process */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; /* Calculation of second stage to excluding last stage */ - for (k = fftLen / 4u; k > 4u; k >>= 2u) + for (k = fftLen / 4U; k > 4U; k >>= 2U) { /* Initializations for the first stage */ n1 = n2; - n2 >>= 2u; - ia1 = 0u; + n2 >>= 2U; + ia1 = 0U; - for (j = 0; j <= (n2 - 1u); j++) + for (j = 0; j <= (n2 - 1U); j++) { /* index calculation for the coefficients */ ia2 = ia1 + ia1; ia3 = ia2 + ia1; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; for (i0 = j; i0 < fftLen; i0 += n1) { /* index calculation for the input as, */ - /* pSrc[i0 + 0], pSrc[i0 + fftLen/4], pSrc[i0 + fftLen/2u], pSrc[i0 + 3fftLen/4] */ + /* pSrc[i0 + 0], pSrc[i0 + fftLen/4], pSrc[i0 + fftLen/2U], pSrc[i0 + 3fftLen/4] */ i1 = i0 + n2; i2 = i1 + n2; i3 = i2 + n2; /* Butterfly implementation */ /* xa + xc */ - r1 = pSrc[2u * i0] + pSrc[2u * i2]; + r1 = pSrc[2U * i0] + pSrc[2U * i2]; /* xa - xc */ - r2 = pSrc[2u * i0] - pSrc[2u * i2]; + r2 = pSrc[2U * i0] - pSrc[2U * i2]; /* ya + yc */ - s1 = pSrc[(2u * i0) + 1u] + pSrc[(2u * i2) + 1u]; + s1 = pSrc[(2U * i0) + 1U] + pSrc[(2U * i2) + 1U]; /* ya - yc */ - s2 = pSrc[(2u * i0) + 1u] - pSrc[(2u * i2) + 1u]; + s2 = pSrc[(2U * i0) + 1U] - pSrc[(2U * i2) + 1U]; /* xb + xd */ - t1 = pSrc[2u * i1] + pSrc[2u * i3]; + t1 = pSrc[2U * i1] + pSrc[2U * i3]; /* xa' = xa + xb + xc + xd */ - pSrc[2u * i0] = (r1 + t1) >> 2u; + pSrc[2U * i0] = (r1 + t1) >> 2U; /* xa + xc -(xb + xd) */ r1 = r1 - t1; /* yb + yd */ - t2 = pSrc[(2u * i1) + 1u] + pSrc[(2u * i3) + 1u]; + t2 = pSrc[(2U * i1) + 1U] + pSrc[(2U * i3) + 1U]; /* ya' = ya + yb + yc + yd */ - pSrc[(2u * i0) + 1u] = (s1 + t2) >> 2u; + pSrc[(2U * i0) + 1U] = (s1 + t2) >> 2U; /* (ya + yc) - (yb + yd) */ s1 = s1 - t2; /* (yb - yd) */ - t1 = pSrc[(2u * i1) + 1u] - pSrc[(2u * i3) + 1u]; + t1 = pSrc[(2U * i1) + 1U] - pSrc[(2U * i3) + 1U]; /* (xb - xd) */ - t2 = pSrc[2u * i1] - pSrc[2u * i3]; + t2 = pSrc[2U * i1] - pSrc[2U * i3]; /* xc' = (xa-xb+xc-xd)co2 - (ya-yb+yc-yd)(si2) */ - pSrc[2u * i1] = (((int32_t) (((q63_t) r1 * co2) >> 32u)) - - ((int32_t) (((q63_t) s1 * si2) >> 32u))) >> 1u; + pSrc[2U * i1] = (((int32_t) (((q63_t) r1 * co2) >> 32U)) - + ((int32_t) (((q63_t) s1 * si2) >> 32U))) >> 1U; /* yc' = (ya-yb+yc-yd)co2 + (xa-xb+xc-xd)(si2) */ - pSrc[(2u * i1) + 1u] = - (((int32_t) (((q63_t) s1 * co2) >> 32u)) + - ((int32_t) (((q63_t) r1 * si2) >> 32u))) >> 1u; + pSrc[(2U * i1) + 1U] = + (((int32_t) (((q63_t) s1 * co2) >> 32U)) + + ((int32_t) (((q63_t) r1 * si2) >> 32U))) >> 1U; /* (xa - xc) - (yb - yd) */ r1 = r2 - t1; @@ -1020,23 +1020,23 @@ void arm_radix4_butterfly_inverse_q31( s2 = s2 - t2; /* xb' = (xa+yb-xc-yd)co1 - (ya-xb-yc+xd)(si1) */ - pSrc[2u * i2] = (((int32_t) (((q63_t) r1 * co1) >> 32)) - - ((int32_t) (((q63_t) s1 * si1) >> 32))) >> 1u; + pSrc[2U * i2] = (((int32_t) (((q63_t) r1 * co1) >> 32)) - + ((int32_t) (((q63_t) s1 * si1) >> 32))) >> 1U; /* yb' = (ya-xb-yc+xd)co1 + (xa+yb-xc-yd)(si1) */ - pSrc[(2u * i2) + 1u] = (((int32_t) (((q63_t) s1 * co1) >> 32)) + - ((int32_t) (((q63_t) r1 * si1) >> 32))) >> 1u; + pSrc[(2U * i2) + 1U] = (((int32_t) (((q63_t) s1 * co1) >> 32)) + + ((int32_t) (((q63_t) r1 * si1) >> 32))) >> 1U; /* xd' = (xa-yb-xc+yd)co3 - (ya+xb-yc-xd)(si3) */ - pSrc[(2u * i3)] = (((int32_t) (((q63_t) r2 * co3) >> 32)) - - ((int32_t) (((q63_t) s2 * si3) >> 32))) >> 1u; + pSrc[(2U * i3)] = (((int32_t) (((q63_t) r2 * co3) >> 32)) - + ((int32_t) (((q63_t) s2 * si3) >> 32))) >> 1U; /* yd' = (ya+xb-yc-xd)co3 + (xa-yb-xc+yd)(si3) */ - pSrc[(2u * i3) + 1u] = (((int32_t) (((q63_t) s2 * co3) >> 32)) + - ((int32_t) (((q63_t) r2 * si3) >> 32))) >> 1u; + pSrc[(2U * i3) + 1U] = (((int32_t) (((q63_t) s2 * co3) >> 32)) + + ((int32_t) (((q63_t) r2 * si3) >> 32))) >> 1U; } } - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; } #else uint32_t n1, n2, ia1, ia2, ia3, i0, j, k; @@ -1063,9 +1063,9 @@ void arm_radix4_butterfly_inverse_q31( n2 = fftLen; n1 = n2; /* n2 = fftLen/4 */ - n2 >>= 2u; + n2 >>= 2U; - ia1 = 0u; + ia1 = 0U; j = n2; @@ -1078,24 +1078,24 @@ void arm_radix4_butterfly_inverse_q31( { /* Butterfly implementation */ /* xa + xc */ - r1 = (pSi0[0] >> 4u) + (pSi2[0] >> 4u); + r1 = (pSi0[0] >> 4U) + (pSi2[0] >> 4U); /* xa - xc */ - r2 = (pSi0[0] >> 4u) - (pSi2[0] >> 4u); + r2 = (pSi0[0] >> 4U) - (pSi2[0] >> 4U); /* xb + xd */ - t1 = (pSi1[0] >> 4u) + (pSi3[0] >> 4u); + t1 = (pSi1[0] >> 4U) + (pSi3[0] >> 4U); /* ya + yc */ - s1 = (pSi0[1] >> 4u) + (pSi2[1] >> 4u); + s1 = (pSi0[1] >> 4U) + (pSi2[1] >> 4U); /* ya - yc */ - s2 = (pSi0[1] >> 4u) - (pSi2[1] >> 4u); + s2 = (pSi0[1] >> 4U) - (pSi2[1] >> 4U); /* xa' = xa + xb + xc + xd */ *pSi0++ = (r1 + t1); /* (xa + xc) - (xb + xd) */ r1 = r1 - t1; /* yb + yd */ - t2 = (pSi1[1] >> 4u) + (pSi3[1] >> 4u); + t2 = (pSi1[1] >> 4U) + (pSi3[1] >> 4U); /* ya' = ya + yb + yc + yd */ *pSi0++ = (s1 + t2); @@ -1103,22 +1103,22 @@ void arm_radix4_butterfly_inverse_q31( s1 = s1 - t2; /* yb - yd */ - t1 = (pSi1[1] >> 4u) - (pSi3[1] >> 4u); + t1 = (pSi1[1] >> 4U) - (pSi3[1] >> 4U); /* xb - xd */ - t2 = (pSi1[0] >> 4u) - (pSi3[0] >> 4u); + t2 = (pSi1[0] >> 4U) - (pSi3[0] >> 4U); /* index calculation for the coefficients */ - ia2 = 2u * ia1; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; + ia2 = 2U * ia1; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; /* xc' = (xa-xb+xc-xd)co2 - (ya-yb+yc-yd)(si2) */ *pSi1++ = (((int32_t) (((q63_t) r1 * co2) >> 32)) - - ((int32_t) (((q63_t) s1 * si2) >> 32))) << 1u; + ((int32_t) (((q63_t) s1 * si2) >> 32))) << 1U; /* yc' = (ya-yb+yc-yd)co2 + (xa-xb+xc-xd)(si2) */ *pSi1++ = (((int32_t) (((q63_t) s1 * co2) >> 32)) + - ((int32_t) (((q63_t) r1 * si2) >> 32))) << 1u; + ((int32_t) (((q63_t) r1 * si2) >> 32))) << 1U; /* (xa - xc) - (yb - yd) */ r1 = r2 - t1; @@ -1130,29 +1130,29 @@ void arm_radix4_butterfly_inverse_q31( /* (ya - yc) - (xb - xd) */ s2 = s2 - t2; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; /* xb' = (xa+yb-xc-yd)co1 - (ya-xb-yc+xd)(si1) */ *pSi2++ = (((int32_t) (((q63_t) r1 * co1) >> 32)) - - ((int32_t) (((q63_t) s1 * si1) >> 32))) << 1u; + ((int32_t) (((q63_t) s1 * si1) >> 32))) << 1U; /* yb' = (ya-xb-yc+xd)co1 + (xa+yb-xc-yd)(si1) */ *pSi2++ = (((int32_t) (((q63_t) s1 * co1) >> 32)) + - ((int32_t) (((q63_t) r1 * si1) >> 32))) << 1u; + ((int32_t) (((q63_t) r1 * si1) >> 32))) << 1U; /* index calculation for the coefficients */ - ia3 = 3u * ia1; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + ia3 = 3U * ia1; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* xd' = (xa-yb-xc+yd)co3 - (ya+xb-yc-xd)(si3) */ *pSi3++ = (((int32_t) (((q63_t) r2 * co3) >> 32)) - - ((int32_t) (((q63_t) s2 * si3) >> 32))) << 1u; + ((int32_t) (((q63_t) s2 * si3) >> 32))) << 1U; /* yd' = (ya+xb-yc-xd)co3 + (xa-yb-xc+yd)(si3) */ *pSi3++ = (((int32_t) (((q63_t) s2 * co3) >> 32)) + - ((int32_t) (((q63_t) r2 * si3) >> 32))) << 1u; + ((int32_t) (((q63_t) r2 * si3) >> 32))) << 1U; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; @@ -1165,27 +1165,27 @@ void arm_radix4_butterfly_inverse_q31( /* Start of Middle stages process */ - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; /* Calculation of second stage to excluding last stage */ - for (k = fftLen / 4u; k > 4u; k >>= 2u) + for (k = fftLen / 4U; k > 4U; k >>= 2U) { /* Initializations for the first stage */ n1 = n2; - n2 >>= 2u; - ia1 = 0u; + n2 >>= 2U; + ia1 = 0U; - for (j = 0; j <= (n2 - 1u); j++) + for (j = 0; j <= (n2 - 1U); j++) { /* index calculation for the coefficients */ ia2 = ia1 + ia1; ia3 = ia2 + ia1; - co1 = pCoef[ia1 * 2u]; - si1 = pCoef[(ia1 * 2u) + 1u]; - co2 = pCoef[ia2 * 2u]; - si2 = pCoef[(ia2 * 2u) + 1u]; - co3 = pCoef[ia3 * 2u]; - si3 = pCoef[(ia3 * 2u) + 1u]; + co1 = pCoef[ia1 * 2U]; + si1 = pCoef[(ia1 * 2U) + 1U]; + co2 = pCoef[ia2 * 2U]; + si2 = pCoef[(ia2 * 2U) + 1U]; + co3 = pCoef[ia3 * 2U]; + si3 = pCoef[(ia3 * 2U) + 1U]; /* Twiddle coefficients index modifier */ ia1 = ia1 + twidCoefModifier; @@ -1216,14 +1216,14 @@ void arm_radix4_butterfly_inverse_q31( /* xa' = xa + xb + xc + xd */ - pSi0[0] = (r1 + t1) >> 2u; + pSi0[0] = (r1 + t1) >> 2U; /* xa + xc -(xb + xd) */ r1 = r1 - t1; /* yb + yd */ t2 = pSi1[1] + pSi3[1]; /* ya' = ya + yb + yc + yd */ - pSi0[1] = (s1 + t2) >> 2u; + pSi0[1] = (s1 + t2) >> 2U; pSi0 += 2 * n1; /* (ya + yc) - (yb + yd) */ @@ -1237,14 +1237,14 @@ void arm_radix4_butterfly_inverse_q31( /* xc' = (xa-xb+xc-xd)co2 - (ya-yb+yc-yd)(si2) */ - pSi1[0] = (((int32_t) (((q63_t) r1 * co2) >> 32u)) - - ((int32_t) (((q63_t) s1 * si2) >> 32u))) >> 1u; + pSi1[0] = (((int32_t) (((q63_t) r1 * co2) >> 32U)) - + ((int32_t) (((q63_t) s1 * si2) >> 32U))) >> 1U; /* yc' = (ya-yb+yc-yd)co2 + (xa-xb+xc-xd)(si2) */ pSi1[1] = - (((int32_t) (((q63_t) s1 * co2) >> 32u)) + - ((int32_t) (((q63_t) r1 * si2) >> 32u))) >> 1u; + (((int32_t) (((q63_t) s1 * co2) >> 32U)) + + ((int32_t) (((q63_t) r1 * si2) >> 32U))) >> 1U; pSi1 += 2 * n1; /* (xa - xc) - (yb - yd) */ @@ -1259,24 +1259,24 @@ void arm_radix4_butterfly_inverse_q31( /* xb' = (xa+yb-xc-yd)co1 - (ya-xb-yc+xd)(si1) */ pSi2[0] = (((int32_t) (((q63_t) r1 * co1) >> 32)) - - ((int32_t) (((q63_t) s1 * si1) >> 32))) >> 1u; + ((int32_t) (((q63_t) s1 * si1) >> 32))) >> 1U; /* yb' = (ya-xb-yc+xd)co1 + (xa+yb-xc-yd)(si1) */ pSi2[1] = (((int32_t) (((q63_t) s1 * co1) >> 32)) + - ((int32_t) (((q63_t) r1 * si1) >> 32))) >> 1u; + ((int32_t) (((q63_t) r1 * si1) >> 32))) >> 1U; pSi2 += 2 * n1; /* xd' = (xa-yb-xc+yd)co3 - (ya+xb-yc-xd)(si3) */ pSi3[0] = (((int32_t) (((q63_t) r2 * co3) >> 32)) - - ((int32_t) (((q63_t) s2 * si3) >> 32))) >> 1u; + ((int32_t) (((q63_t) s2 * si3) >> 32))) >> 1U; /* yd' = (ya+xb-yc-xd)co3 + (xa-yb-xc+yd)(si3) */ pSi3[1] = (((int32_t) (((q63_t) s2 * co3) >> 32)) + - ((int32_t) (((q63_t) r2 * si3) >> 32))) >> 1u; + ((int32_t) (((q63_t) r2 * si3) >> 32))) >> 1U; pSi3 += 2 * n1; } } - twidCoefModifier <<= 2u; + twidCoefModifier <<= 2U; } #endif @@ -1351,7 +1351,7 @@ void arm_radix4_butterfly_inverse_q31( ya_out = ya + yb + yc + yd; /* pointer updation for writing */ - ptr1 = ptr1 - 8u; + ptr1 = ptr1 - 8U; /* writing xa' and ya' */ *ptr1++ = xa_out; diff --git a/Source/TransformFunctions/arm_dct4_f32.c b/Source/TransformFunctions/arm_dct4_f32.c index c928ddd8..df78ed83 100644 --- a/Source/TransformFunctions/arm_dct4_f32.c +++ b/Source/TransformFunctions/arm_dct4_f32.c @@ -168,7 +168,7 @@ void arm_dct4_f32( pS1 = pState; /* pS2 initialized to pState+N-1, so that it points to the end of the state buffer */ - pS2 = pState + (S->N - 1u); + pS2 = pState + (S->N - 1U); /* pbuff initialized to input buffer */ pbuff = pInlineBuffer; @@ -178,7 +178,7 @@ void arm_dct4_f32( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Initializing the loop counter to N/2 >> 2 for loop unrolling by 4 */ - i = (uint32_t) S->Nby2 >> 2u; + i = (uint32_t) S->Nby2 >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ @@ -201,7 +201,7 @@ void arm_dct4_f32( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* pbuff initialized to input buffer */ pbuff = pInlineBuffer; @@ -210,7 +210,7 @@ void arm_dct4_f32( pS1 = pState; /* Initializing the loop counter to N/4 instead of N for loop unrolling */ - i = (uint32_t) S->N >> 2u; + i = (uint32_t) S->N >> 2U; /* Processing with loop unrolling 4 times as N is always multiple of 4. * Compute 4 outputs at a time */ @@ -224,7 +224,7 @@ void arm_dct4_f32( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* --------------------------------------------------------- @@ -245,7 +245,7 @@ void arm_dct4_f32( /* Getting only real part from the output and Converting to DCT-IV */ /* Initializing the loop counter to N >> 2 for loop unrolling by 4 */ - i = ((uint32_t) S->N - 1u) >> 2u; + i = ((uint32_t) S->N - 1U) >> 2U; /* pbuff initialized to input buffer. */ pbuff = pInlineBuffer; @@ -286,13 +286,13 @@ void arm_dct4_f32( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - i = ((uint32_t) S->N - 1u) % 0x4u; + i = ((uint32_t) S->N - 1U) % 0x4U; - while (i > 0u) + while (i > 0U) { /* Calculating Y4(1) to Y4(N-1) from Y2 using equation Y4(k) = Y2(k) - Y4(k-1) */ /* pState pointer (pS1) is incremented twice as the real values are located alternatively in the array */ @@ -309,7 +309,7 @@ void arm_dct4_f32( /*------------ Normalizing the output by multiplying with the normalizing factor ----------*/ /* Initializing the loop counter to N/4 instead of N for loop unrolling */ - i = (uint32_t) S->N >> 2u; + i = (uint32_t) S->N >> 2U; /* pbuff initialized to the pInlineBuffer(now contains the output values) */ pbuff = pInlineBuffer; @@ -332,7 +332,7 @@ void arm_dct4_f32( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); #else @@ -352,7 +352,7 @@ void arm_dct4_f32( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* pbuff initialized to input buffer */ pbuff = pInlineBuffer; @@ -370,7 +370,7 @@ void arm_dct4_f32( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* --------------------------------------------------------- @@ -405,7 +405,7 @@ void arm_dct4_f32( pS1++; /* Initializing the loop counter */ - i = ((uint32_t) S->N - 1u); + i = ((uint32_t) S->N - 1U); do { @@ -419,7 +419,7 @@ void arm_dct4_f32( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /*------------ Normalizing the output by multiplying with the normalizing factor ----------*/ @@ -438,7 +438,7 @@ void arm_dct4_f32( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/TransformFunctions/arm_dct4_init_f32.c b/Source/TransformFunctions/arm_dct4_init_f32.c index 2bdbdceb..9b39cd48 100644 --- a/Source/TransformFunctions/arm_dct4_init_f32.c +++ b/Source/TransformFunctions/arm_dct4_init_f32.c @@ -16481,19 +16481,19 @@ arm_status arm_dct4_init_f32( switch (N) { /* Initialize the table modifier values */ - case 8192u: + case 8192U: S->pTwiddle = twiddlePtr[3]; S->pCosFactor = pCosFactor[3]; break; - case 2048u: + case 2048U: S->pTwiddle = twiddlePtr[2]; S->pCosFactor = pCosFactor[2]; break; - case 512u: + case 512U: S->pTwiddle = twiddlePtr[1]; S->pCosFactor = pCosFactor[1]; break; - case 128u: + case 128U: S->pTwiddle = twiddlePtr[0]; S->pCosFactor = pCosFactor[0]; break; @@ -16502,7 +16502,7 @@ arm_status arm_dct4_init_f32( } /* Initialize the RFFT/RIFFT */ - arm_rfft_init_f32(S->pRfft, S->pCfft, S->N, 0u, 1u); + arm_rfft_init_f32(S->pRfft, S->pCfft, S->N, 0U, 1U); /* return the status of DCT4 Init function */ return (status); diff --git a/Source/TransformFunctions/arm_dct4_init_q15.c b/Source/TransformFunctions/arm_dct4_init_q15.c index 0898da70..e57541c4 100644 --- a/Source/TransformFunctions/arm_dct4_init_q15.c +++ b/Source/TransformFunctions/arm_dct4_init_q15.c @@ -4248,19 +4248,19 @@ arm_status arm_dct4_init_q15( switch (N) { /* Initialize the table modifier values */ - case 8192u: + case 8192U: S->pTwiddle = twiddlePtr[3]; S->pCosFactor = pCosFactor[3]; break; - case 2048u: + case 2048U: S->pTwiddle = twiddlePtr[2]; S->pCosFactor = pCosFactor[2]; break; - case 512u: + case 512U: S->pTwiddle = twiddlePtr[1]; S->pCosFactor = pCosFactor[1]; break; - case 128u: + case 128U: S->pTwiddle = twiddlePtr[0]; S->pCosFactor = pCosFactor[0]; break; @@ -4269,7 +4269,7 @@ arm_status arm_dct4_init_q15( } /* Initialize the RFFT/RIFFT */ - arm_rfft_init_q15(S->pRfft, S->N, 0u, 1u); + arm_rfft_init_q15(S->pRfft, S->N, 0U, 1U); /* return the status of DCT4 Init function */ return (status); diff --git a/Source/TransformFunctions/arm_dct4_init_q31.c b/Source/TransformFunctions/arm_dct4_init_q31.c index efda6dee..8156844d 100644 --- a/Source/TransformFunctions/arm_dct4_init_q31.c +++ b/Source/TransformFunctions/arm_dct4_init_q31.c @@ -7654,19 +7654,19 @@ arm_status arm_dct4_init_q31( switch (N) { /* Initialize the table modifier values */ - case 8192u: + case 8192U: S->pTwiddle = twiddlePtr[3]; S->pCosFactor = pCosFactor[3]; break; - case 2048u: + case 2048U: S->pTwiddle = twiddlePtr[2]; S->pCosFactor = pCosFactor[2]; break; - case 512u: + case 512U: S->pTwiddle = twiddlePtr[1]; S->pCosFactor = pCosFactor[1]; break; - case 128u: + case 128U: S->pTwiddle = twiddlePtr[0]; S->pCosFactor = pCosFactor[0]; break; diff --git a/Source/TransformFunctions/arm_dct4_q15.c b/Source/TransformFunctions/arm_dct4_q15.c index 87257a85..918f0bd2 100644 --- a/Source/TransformFunctions/arm_dct4_q15.c +++ b/Source/TransformFunctions/arm_dct4_q15.c @@ -94,7 +94,7 @@ void arm_dct4_q15( pS1 = pState; /* pS2 initialized to pState+N-1, so that it points to the end of the state buffer */ - pS2 = pState + (S->N - 1u); + pS2 = pState + (S->N - 1U); /* pbuff initialized to input buffer */ pbuff = pInlineBuffer; @@ -105,7 +105,7 @@ void arm_dct4_q15( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Initializing the loop counter to N/2 >> 2 for loop unrolling by 4 */ - i = (uint32_t) S->Nby2 >> 2u; + i = (uint32_t) S->Nby2 >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ @@ -128,7 +128,7 @@ void arm_dct4_q15( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* pbuff initialized to input buffer */ pbuff = pInlineBuffer; @@ -137,7 +137,7 @@ void arm_dct4_q15( pS1 = pState; /* Initializing the loop counter to N/4 instead of N for loop unrolling */ - i = (uint32_t) S->N >> 2u; + i = (uint32_t) S->N >> 2U; /* Processing with loop unrolling 4 times as N is always multiple of 4. * Compute 4 outputs at a time */ @@ -151,7 +151,7 @@ void arm_dct4_q15( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* --------------------------------------------------------- @@ -176,7 +176,7 @@ void arm_dct4_q15( /* Getting only real part from the output and Converting to DCT-IV */ /* Initializing the loop counter to N >> 2 for loop unrolling by 4 */ - i = ((uint32_t) S->N - 1u) >> 2u; + i = ((uint32_t) S->N - 1U) >> 2U; /* pbuff initialized to input buffer. */ pbuff = pInlineBuffer; @@ -185,7 +185,7 @@ void arm_dct4_q15( pS1 = pState; /* Calculating Y4(0) from Y2(0) using Y4(0) = Y2(0)/2 */ - in = *pS1++ >> 1u; + in = *pS1++ >> 1U; /* input buffer acts as inplace, so output values are stored in the input itself. */ *pbuff++ = in; @@ -217,13 +217,13 @@ void arm_dct4_q15( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - i = ((uint32_t) S->N - 1u) % 0x4u; + i = ((uint32_t) S->N - 1U) % 0x4U; - while (i > 0u) + while (i > 0U) { /* Calculating Y4(1) to Y4(N-1) from Y2 using equation Y4(k) = Y2(k) - Y4(k-1) */ /* pState pointer (pS1) is incremented twice as the real values are located alternatively in the array */ @@ -240,7 +240,7 @@ void arm_dct4_q15( /*------------ Normalizing the output by multiplying with the normalizing factor ----------*/ /* Initializing the loop counter to N/4 instead of N for loop unrolling */ - i = (uint32_t) S->N >> 2u; + i = (uint32_t) S->N >> 2U; /* pbuff initialized to the pInlineBuffer(now contains the output values) */ pbuff = pInlineBuffer; @@ -263,7 +263,7 @@ void arm_dct4_q15( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); #else @@ -283,7 +283,7 @@ void arm_dct4_q15( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* pbuff initialized to input buffer */ pbuff = pInlineBuffer; @@ -301,7 +301,7 @@ void arm_dct4_q15( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* --------------------------------------------------------- @@ -326,7 +326,7 @@ void arm_dct4_q15( /* Getting only real part from the output and Converting to DCT-IV */ /* Initializing the loop counter */ - i = ((uint32_t) S->N - 1u); + i = ((uint32_t) S->N - 1U); /* pbuff initialized to input buffer. */ pbuff = pInlineBuffer; @@ -335,7 +335,7 @@ void arm_dct4_q15( pS1 = pState; /* Calculating Y4(0) from Y2(0) using Y4(0) = Y2(0)/2 */ - in = *pS1++ >> 1u; + in = *pS1++ >> 1U; /* input buffer acts as inplace, so output values are stored in the input itself. */ *pbuff++ = in; @@ -353,7 +353,7 @@ void arm_dct4_q15( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /*------------ Normalizing the output by multiplying with the normalizing factor ----------*/ @@ -371,7 +371,7 @@ void arm_dct4_q15( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/TransformFunctions/arm_dct4_q31.c b/Source/TransformFunctions/arm_dct4_q31.c index b5ac9c43..05697789 100644 --- a/Source/TransformFunctions/arm_dct4_q31.c +++ b/Source/TransformFunctions/arm_dct4_q31.c @@ -95,7 +95,7 @@ void arm_dct4_q31( pS1 = pState; /* pS2 initialized to pState+N-1, so that it points to the end of the state buffer */ - pS2 = pState + (S->N - 1u); + pS2 = pState + (S->N - 1U); /* pbuff initialized to input buffer */ pbuff = pInlineBuffer; @@ -105,7 +105,7 @@ void arm_dct4_q31( /* Run the below code for Cortex-M4 and Cortex-M3 */ /* Initializing the loop counter to N/2 >> 2 for loop unrolling by 4 */ - i = S->Nby2 >> 2u; + i = S->Nby2 >> 2U; /* First part of the processing with loop unrolling. Compute 4 outputs at a time. ** a second loop below computes the remaining 1 to 3 samples. */ @@ -128,7 +128,7 @@ void arm_dct4_q31( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* pbuff initialized to input buffer */ pbuff = pInlineBuffer; @@ -137,7 +137,7 @@ void arm_dct4_q31( pS1 = pState; /* Initializing the loop counter to N/4 instead of N for loop unrolling */ - i = S->N >> 2u; + i = S->N >> 2U; /* Processing with loop unrolling 4 times as N is always multiple of 4. * Compute 4 outputs at a time */ @@ -151,7 +151,7 @@ void arm_dct4_q31( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* --------------------------------------------------------- @@ -176,7 +176,7 @@ void arm_dct4_q31( /* Getting only real part from the output and Converting to DCT-IV */ /* Initializing the loop counter to N >> 2 for loop unrolling by 4 */ - i = (S->N - 1u) >> 2u; + i = (S->N - 1U) >> 2U; /* pbuff initialized to input buffer. */ pbuff = pInlineBuffer; @@ -185,7 +185,7 @@ void arm_dct4_q31( pS1 = pState; /* Calculating Y4(0) from Y2(0) using Y4(0) = Y2(0)/2 */ - in = *pS1++ >> 1u; + in = *pS1++ >> 1U; /* input buffer acts as inplace, so output values are stored in the input itself. */ *pbuff++ = in; @@ -217,13 +217,13 @@ void arm_dct4_q31( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* If the blockSize is not a multiple of 4, compute any remaining output samples here. ** No loop unrolling is used. */ - i = (S->N - 1u) % 0x4u; + i = (S->N - 1U) % 0x4U; - while (i > 0u) + while (i > 0U) { /* Calculating Y4(1) to Y4(N-1) from Y2 using equation Y4(k) = Y2(k) - Y4(k-1) */ /* pState pointer (pS1) is incremented twice as the real values are located alternatively in the array */ @@ -240,7 +240,7 @@ void arm_dct4_q31( /*------------ Normalizing the output by multiplying with the normalizing factor ----------*/ /* Initializing the loop counter to N/4 instead of N for loop unrolling */ - i = S->N >> 2u; + i = S->N >> 2U; /* pbuff initialized to the pInlineBuffer(now contains the output values) */ pbuff = pInlineBuffer; @@ -263,7 +263,7 @@ void arm_dct4_q31( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); #else @@ -283,7 +283,7 @@ void arm_dct4_q31( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* pbuff initialized to input buffer */ pbuff = pInlineBuffer; @@ -301,7 +301,7 @@ void arm_dct4_q31( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); /* --------------------------------------------------------- @@ -332,7 +332,7 @@ void arm_dct4_q31( pS1 = pState; /* Calculating Y4(0) from Y2(0) using Y4(0) = Y2(0)/2 */ - in = *pS1++ >> 1u; + in = *pS1++ >> 1U; /* input buffer acts as inplace, so output values are stored in the input itself. */ *pbuff++ = in; @@ -340,9 +340,9 @@ void arm_dct4_q31( pS1++; /* Initializing the loop counter */ - i = (S->N - 1u); + i = (S->N - 1U); - while (i > 0u) + while (i > 0U) { /* Calculating Y4(1) to Y4(N-1) from Y2 using equation Y4(k) = Y2(k) - Y4(k-1) */ /* pState pointer (pS1) is incremented twice as the real values are located alternatively in the array */ @@ -372,7 +372,7 @@ void arm_dct4_q31( /* Decrement the loop counter */ i--; - } while (i > 0u); + } while (i > 0U); #endif /* #if defined (ARM_MATH_DSP) */ diff --git a/Source/TransformFunctions/arm_rfft_f32.c b/Source/TransformFunctions/arm_rfft_f32.c index 0362bce8..a1bd81b1 100644 --- a/Source/TransformFunctions/arm_rfft_f32.c +++ b/Source/TransformFunctions/arm_rfft_f32.c @@ -95,7 +95,7 @@ void arm_rfft_f32( /* Calculation of Real IFFT of input */ - if (S->ifftFlagR == 1u) + if (S->ifftFlagR == 1U) { /* Real IFFT core process */ arm_split_rifft_f32(pSrc, S->fftLenBy2, S->pTwiddleAReal, @@ -109,7 +109,7 @@ void arm_rfft_f32( S_CFFT->onebyfftLen); /* Bit reversal process */ - if (S->bitReverseFlagR == 1u) + if (S->bitReverseFlagR == 1U) { arm_bitreversal_f32(pDst, S_CFFT->fftLen, S_CFFT->bitRevFactor, S_CFFT->pBitRevTable); @@ -125,7 +125,7 @@ void arm_rfft_f32( S_CFFT->pTwiddle, S_CFFT->twidCoefModifier); /* Bit reversal process */ - if (S->bitReverseFlagR == 1u) + if (S->bitReverseFlagR == 1U) { arm_bitreversal_f32(pSrc, S_CFFT->fftLen, S_CFFT->bitRevFactor, S_CFFT->pBitRevTable); @@ -166,16 +166,16 @@ void arm_split_rfft_f32( float32_t outR, outI; /* Temporary variables for output */ float32_t *pCoefA, *pCoefB; /* Temporary pointers for twiddle factors */ float32_t CoefA1, CoefA2, CoefB1; /* Temporary variables for twiddle coefficients */ - float32_t *pDst1 = &pDst[2], *pDst2 = &pDst[(4u * fftLen) - 1u]; /* temp pointers for output buffer */ - float32_t *pSrc1 = &pSrc[2], *pSrc2 = &pSrc[(2u * fftLen) - 1u]; /* temp pointers for input buffer */ + float32_t *pDst1 = &pDst[2], *pDst2 = &pDst[(4U * fftLen) - 1U]; /* temp pointers for output buffer */ + float32_t *pSrc1 = &pSrc[2], *pSrc2 = &pSrc[(2U * fftLen) - 1U]; /* temp pointers for input buffer */ /* Init coefficient pointers */ - pCoefA = &pATable[modifier * 2u]; - pCoefB = &pBTable[modifier * 2u]; + pCoefA = &pATable[modifier * 2U]; + pCoefB = &pBTable[modifier * 2U]; - i = fftLen - 1u; + i = fftLen - 1U; - while (i > 0u) + while (i > 0U) { /* outR = (pSrc[2 * i] * pATable[2 * i] - pSrc[2 * i + 1] * pATable[2 * i + 1] @@ -221,15 +221,15 @@ void arm_split_rfft_f32( *pDst2-- = outR; /* update coefficient pointer */ - pCoefB = pCoefB + (modifier * 2u); - pCoefA = pCoefA + ((modifier * 2u) - 1u); + pCoefB = pCoefB + (modifier * 2U); + pCoefA = pCoefA + ((modifier * 2U) - 1U); i--; } - pDst[2u * fftLen] = pSrc[0] - pSrc[1]; - pDst[(2u * fftLen) + 1u] = 0.0f; + pDst[2U * fftLen] = pSrc[0] - pSrc[1]; + pDst[(2U * fftLen) + 1U] = 0.0f; pDst[0] = pSrc[0] + pSrc[1]; pDst[1] = 0.0f; @@ -259,12 +259,12 @@ void arm_split_rifft_f32( float32_t outR, outI; /* Temporary variables for output */ float32_t *pCoefA, *pCoefB; /* Temporary pointers for twiddle factors */ float32_t CoefA1, CoefA2, CoefB1; /* Temporary variables for twiddle coefficients */ - float32_t *pSrc1 = &pSrc[0], *pSrc2 = &pSrc[(2u * fftLen) + 1u]; + float32_t *pSrc1 = &pSrc[0], *pSrc2 = &pSrc[(2U * fftLen) + 1U]; pCoefA = &pATable[0]; pCoefB = &pBTable[0]; - while (fftLen > 0u) + while (fftLen > 0U) { /* outR = (pIn[2 * i] * pATable[2 * i] + pIn[2 * i + 1] * pATable[2 * i + 1] + @@ -308,8 +308,8 @@ void arm_split_rifft_f32( *pDst++ = outI; /* update coefficient pointer */ - pCoefB = pCoefB + (modifier * 2u); - pCoefA = pCoefA + ((modifier * 2u) - 1u); + pCoefB = pCoefB + (modifier * 2U); + pCoefA = pCoefA + ((modifier * 2U) - 1U); /* Decrement loop count */ fftLen--; diff --git a/Source/TransformFunctions/arm_rfft_fast_f32.c b/Source/TransformFunctions/arm_rfft_fast_f32.c index fe468967..f7c52e95 100644 --- a/Source/TransformFunctions/arm_rfft_fast_f32.c +++ b/Source/TransformFunctions/arm_rfft_fast_f32.c @@ -110,7 +110,7 @@ void stage_rfft_f32( pA += 2; pB -= 2; k--; - } while (k > 0u); + } while (k > 0U); } /* Prepares data for inverse cfft */ @@ -139,7 +139,7 @@ float32_t * p, float32_t * pOut) pB = p + 2*k ; pA += 2 ; - while (k > 0u) + while (k > 0U) { /* G is half of the frequency complex spectrum */ //for k = 2:N diff --git a/Source/TransformFunctions/arm_rfft_fast_init_f32.c b/Source/TransformFunctions/arm_rfft_fast_init_f32.c index 0abc57f1..2f8dfe6a 100644 --- a/Source/TransformFunctions/arm_rfft_fast_init_f32.c +++ b/Source/TransformFunctions/arm_rfft_fast_init_f32.c @@ -65,7 +65,7 @@ arm_status arm_rfft_fast_init_f32( /* Initializations of structure parameters depending on the FFT length */ switch (Sint->fftLen) { - case 2048u: + case 2048U: /* Initializations of structure parameters for 2048 point FFT */ /* Initialise the bit reversal table length */ Sint->bitRevLength = ARMBITREVINDEXTABLE_2048_TABLE_LENGTH; @@ -75,43 +75,43 @@ arm_status arm_rfft_fast_init_f32( Sint->pTwiddle = (float32_t *) twiddleCoef_2048; S->pTwiddleRFFT = (float32_t *) twiddleCoef_rfft_4096; break; - case 1024u: + case 1024U: Sint->bitRevLength = ARMBITREVINDEXTABLE_1024_TABLE_LENGTH; Sint->pBitRevTable = (uint16_t *)armBitRevIndexTable1024; Sint->pTwiddle = (float32_t *) twiddleCoef_1024; S->pTwiddleRFFT = (float32_t *) twiddleCoef_rfft_2048; break; - case 512u: + case 512U: Sint->bitRevLength = ARMBITREVINDEXTABLE_512_TABLE_LENGTH; Sint->pBitRevTable = (uint16_t *)armBitRevIndexTable512; Sint->pTwiddle = (float32_t *) twiddleCoef_512; S->pTwiddleRFFT = (float32_t *) twiddleCoef_rfft_1024; break; - case 256u: + case 256U: Sint->bitRevLength = ARMBITREVINDEXTABLE_256_TABLE_LENGTH; Sint->pBitRevTable = (uint16_t *)armBitRevIndexTable256; Sint->pTwiddle = (float32_t *) twiddleCoef_256; S->pTwiddleRFFT = (float32_t *) twiddleCoef_rfft_512; break; - case 128u: + case 128U: Sint->bitRevLength = ARMBITREVINDEXTABLE_128_TABLE_LENGTH; Sint->pBitRevTable = (uint16_t *)armBitRevIndexTable128; Sint->pTwiddle = (float32_t *) twiddleCoef_128; S->pTwiddleRFFT = (float32_t *) twiddleCoef_rfft_256; break; - case 64u: + case 64U: Sint->bitRevLength = ARMBITREVINDEXTABLE_64_TABLE_LENGTH; Sint->pBitRevTable = (uint16_t *)armBitRevIndexTable64; Sint->pTwiddle = (float32_t *) twiddleCoef_64; S->pTwiddleRFFT = (float32_t *) twiddleCoef_rfft_128; break; - case 32u: + case 32U: Sint->bitRevLength = ARMBITREVINDEXTABLE_32_TABLE_LENGTH; Sint->pBitRevTable = (uint16_t *)armBitRevIndexTable32; Sint->pTwiddle = (float32_t *) twiddleCoef_32; S->pTwiddleRFFT = (float32_t *) twiddleCoef_rfft_64; break; - case 16u: + case 16U: Sint->bitRevLength = ARMBITREVINDEXTABLE_16_TABLE_LENGTH; Sint->pBitRevTable = (uint16_t *)armBitRevIndexTable16; Sint->pTwiddle = (float32_t *) twiddleCoef_16; diff --git a/Source/TransformFunctions/arm_rfft_init_f32.c b/Source/TransformFunctions/arm_rfft_init_f32.c index eebef0e7..bb3213a3 100644 --- a/Source/TransformFunctions/arm_rfft_init_f32.c +++ b/Source/TransformFunctions/arm_rfft_init_f32.c @@ -4213,7 +4213,7 @@ arm_status arm_rfft_init_f32( S->fftLenReal = (uint16_t) fftLenReal; /* Initialize the Complex FFT length */ - S->fftLenBy2 = (uint16_t) fftLenReal / 2u; + S->fftLenBy2 = (uint16_t) fftLenReal / 2U; /* Initialize the Twiddle coefficientA pointer */ S->pTwiddleAReal = (float32_t *) realCoefA; @@ -4231,17 +4231,17 @@ arm_status arm_rfft_init_f32( switch (S->fftLenReal) { /* Init table modifier value */ - case 8192u: - S->twidCoefRModifier = 1u; + case 8192U: + S->twidCoefRModifier = 1U; break; - case 2048u: - S->twidCoefRModifier = 4u; + case 2048U: + S->twidCoefRModifier = 4U; break; - case 512u: - S->twidCoefRModifier = 16u; + case 512U: + S->twidCoefRModifier = 16U; break; - case 128u: - S->twidCoefRModifier = 64u; + case 128U: + S->twidCoefRModifier = 64U; break; default: /* Reporting argument error if rfftSize is not valid value */ @@ -4255,12 +4255,12 @@ arm_status arm_rfft_init_f32( if (S->ifftFlagR) { /* Initializes the CIFFT Module for fftLenreal/2 length */ - arm_cfft_radix4_init_f32(S->pCfft, S->fftLenBy2, 1u, 0u); + arm_cfft_radix4_init_f32(S->pCfft, S->fftLenBy2, 1U, 0U); } else { /* Initializes the CFFT Module for fftLenreal/2 length */ - arm_cfft_radix4_init_f32(S->pCfft, S->fftLenBy2, 0u, 0u); + arm_cfft_radix4_init_f32(S->pCfft, S->fftLenBy2, 0U, 0U); } /* return the status of RFFT Init function */ diff --git a/Source/TransformFunctions/arm_rfft_init_q15.c b/Source/TransformFunctions/arm_rfft_init_q15.c index 83c45fee..0e097378 100644 --- a/Source/TransformFunctions/arm_rfft_init_q15.c +++ b/Source/TransformFunctions/arm_rfft_init_q15.c @@ -2178,40 +2178,40 @@ arm_status arm_rfft_init_q15( /* Initialization of coef modifier depending on the FFT length */ switch (S->fftLenReal) { - case 8192u: - S->twidCoefRModifier = 1u; + case 8192U: + S->twidCoefRModifier = 1U; S->pCfft = &arm_cfft_sR_q15_len4096; break; - case 4096u: - S->twidCoefRModifier = 2u; + case 4096U: + S->twidCoefRModifier = 2U; S->pCfft = &arm_cfft_sR_q15_len2048; break; - case 2048u: - S->twidCoefRModifier = 4u; + case 2048U: + S->twidCoefRModifier = 4U; S->pCfft = &arm_cfft_sR_q15_len1024; break; - case 1024u: - S->twidCoefRModifier = 8u; + case 1024U: + S->twidCoefRModifier = 8U; S->pCfft = &arm_cfft_sR_q15_len512; break; - case 512u: - S->twidCoefRModifier = 16u; + case 512U: + S->twidCoefRModifier = 16U; S->pCfft = &arm_cfft_sR_q15_len256; break; - case 256u: - S->twidCoefRModifier = 32u; + case 256U: + S->twidCoefRModifier = 32U; S->pCfft = &arm_cfft_sR_q15_len128; break; - case 128u: - S->twidCoefRModifier = 64u; + case 128U: + S->twidCoefRModifier = 64U; S->pCfft = &arm_cfft_sR_q15_len64; break; - case 64u: - S->twidCoefRModifier = 128u; + case 64U: + S->twidCoefRModifier = 128U; S->pCfft = &arm_cfft_sR_q15_len32; break; - case 32u: - S->twidCoefRModifier = 256u; + case 32U: + S->twidCoefRModifier = 256U; S->pCfft = &arm_cfft_sR_q15_len16; break; default: diff --git a/Source/TransformFunctions/arm_rfft_init_q31.c b/Source/TransformFunctions/arm_rfft_init_q31.c index 8cfae7e0..71ec4f53 100644 --- a/Source/TransformFunctions/arm_rfft_init_q31.c +++ b/Source/TransformFunctions/arm_rfft_init_q31.c @@ -4229,40 +4229,40 @@ arm_status arm_rfft_init_q31( /* Initialization of coef modifier depending on the FFT length */ switch (S->fftLenReal) { - case 8192u: - S->twidCoefRModifier = 1u; + case 8192U: + S->twidCoefRModifier = 1U; S->pCfft = &arm_cfft_sR_q31_len4096; break; - case 4096u: - S->twidCoefRModifier = 2u; + case 4096U: + S->twidCoefRModifier = 2U; S->pCfft = &arm_cfft_sR_q31_len2048; break; - case 2048u: - S->twidCoefRModifier = 4u; + case 2048U: + S->twidCoefRModifier = 4U; S->pCfft = &arm_cfft_sR_q31_len1024; break; - case 1024u: - S->twidCoefRModifier = 8u; + case 1024U: + S->twidCoefRModifier = 8U; S->pCfft = &arm_cfft_sR_q31_len512; break; - case 512u: - S->twidCoefRModifier = 16u; + case 512U: + S->twidCoefRModifier = 16U; S->pCfft = &arm_cfft_sR_q31_len256; break; - case 256u: - S->twidCoefRModifier = 32u; + case 256U: + S->twidCoefRModifier = 32U; S->pCfft = &arm_cfft_sR_q31_len128; break; - case 128u: - S->twidCoefRModifier = 64u; + case 128U: + S->twidCoefRModifier = 64U; S->pCfft = &arm_cfft_sR_q31_len64; break; - case 64u: - S->twidCoefRModifier = 128u; + case 64U: + S->twidCoefRModifier = 128U; S->pCfft = &arm_cfft_sR_q31_len32; break; - case 32u: - S->twidCoefRModifier = 256u; + case 32U: + S->twidCoefRModifier = 256U; S->pCfft = &arm_cfft_sR_q31_len16; break; default: diff --git a/Source/TransformFunctions/arm_rfft_q15.c b/Source/TransformFunctions/arm_rfft_q15.c index 53ab9e68..f85cf302 100644 --- a/Source/TransformFunctions/arm_rfft_q15.c +++ b/Source/TransformFunctions/arm_rfft_q15.c @@ -81,7 +81,7 @@ void arm_rfft_q15( uint32_t L2 = S->fftLenReal >> 1; /* Calculation of RIFFT of input */ - if (S->ifftFlagR == 1u) + if (S->ifftFlagR == 1U) { /* Real IFFT core process */ arm_split_rifft_q15(pSrc, L2, S->pTwiddleAReal, @@ -140,21 +140,21 @@ void arm_split_rfft_q15( q15_t *pD1, *pD2; #endif - // pSrc[2u * fftLen] = pSrc[0]; - // pSrc[(2u * fftLen) + 1u] = pSrc[1]; + // pSrc[2U * fftLen] = pSrc[0]; + // pSrc[(2U * fftLen) + 1U] = pSrc[1]; - pCoefA = &pATable[modifier * 2u]; - pCoefB = &pBTable[modifier * 2u]; + pCoefA = &pATable[modifier * 2U]; + pCoefB = &pBTable[modifier * 2U]; pSrc1 = &pSrc[2]; - pSrc2 = &pSrc[(2u * fftLen) - 2u]; + pSrc2 = &pSrc[(2U * fftLen) - 2U]; #if defined (ARM_MATH_DSP) /* Run the below code for Cortex-M4 and Cortex-M3 */ - i = 1u; + i = 1U; pD1 = pDst + 2; - pD2 = pDst + (4u * fftLen) - 2; + pD2 = pDst + (4U * fftLen) - 2; for(i = fftLen - 1; i > 0; i--) { @@ -183,7 +183,7 @@ void arm_split_rfft_q15( /* pSrc[2 * n - 2 * i] * pBTable[2 * i] + pSrc[2 * n - 2 * i + 1] * pBTable[2 * i + 1]) */ - outR = __SMLAD(*__SIMD32(pSrc2), *__SIMD32(pCoefB), outR) >> 16u; + outR = __SMLAD(*__SIMD32(pSrc2), *__SIMD32(pCoefB), outR) >> 16U; /* pIn[2 * n - 2 * i] * pBTable[2 * i + 1] - pIn[2 * n - 2 * i + 1] * pBTable[2 * i] */ @@ -203,20 +203,20 @@ void arm_split_rfft_q15( /* write output */ *pD1++ = (q15_t) outR; - *pD1++ = outI >> 16u; + *pD1++ = outI >> 16U; /* write complex conjugate output */ pD2[0] = (q15_t) outR; - pD2[1] = -(outI >> 16u); + pD2[1] = -(outI >> 16U); pD2 -= 2; /* update coefficient pointer */ - pCoefB = pCoefB + (2u * modifier); - pCoefA = pCoefA + (2u * modifier); + pCoefB = pCoefB + (2U * modifier); + pCoefA = pCoefA + (2U * modifier); } - pDst[2u * fftLen] = (pSrc[0] - pSrc[1]) >> 1; - pDst[(2u * fftLen) + 1u] = 0; + pDst[2U * fftLen] = (pSrc[0] - pSrc[1]) >> 1; + pDst[(2U * fftLen) + 1U] = 0; pDst[0] = (pSrc[0] + pSrc[1]) >> 1; pDst[1] = 0; @@ -224,7 +224,7 @@ void arm_split_rfft_q15( #else /* Run the below code for Cortex-M0 */ - i = 1u; + i = 1U; while (i < fftLen) { @@ -251,26 +251,26 @@ void arm_split_rfft_q15( outI = outI + (*pSrc1 * *(pCoefA + 1)); /* update input pointers */ - pSrc1 += 2u; - pSrc2 -= 2u; + pSrc1 += 2U; + pSrc2 -= 2U; /* write output */ - pDst[2u * i] = (q15_t) outR; - pDst[(2u * i) + 1u] = outI >> 16u; + pDst[2U * i] = (q15_t) outR; + pDst[(2U * i) + 1U] = outI >> 16U; /* write complex conjugate output */ - pDst[(4u * fftLen) - (2u * i)] = (q15_t) outR; - pDst[((4u * fftLen) - (2u * i)) + 1u] = -(outI >> 16u); + pDst[(4U * fftLen) - (2U * i)] = (q15_t) outR; + pDst[((4U * fftLen) - (2U * i)) + 1U] = -(outI >> 16U); /* update coefficient pointer */ - pCoefB = pCoefB + (2u * modifier); - pCoefA = pCoefA + (2u * modifier); + pCoefB = pCoefB + (2U * modifier); + pCoefA = pCoefA + (2U * modifier); i++; } - pDst[2u * fftLen] = (pSrc[0] - pSrc[1]) >> 1; - pDst[(2u * fftLen) + 1u] = 0; + pDst[2U * fftLen] = (pSrc[0] - pSrc[1]) >> 1; + pDst[(2U * fftLen) + 1U] = 0; pDst[0] = (pSrc[0] + pSrc[1]) >> 1; pDst[1] = 0; @@ -308,14 +308,14 @@ void arm_split_rifft_q15( pCoefB = &pBTable[0]; pSrc1 = &pSrc[0]; - pSrc2 = &pSrc[2u * fftLen]; + pSrc2 = &pSrc[2U * fftLen]; #if defined (ARM_MATH_DSP) /* Run the below code for Cortex-M4 and Cortex-M3 */ i = fftLen; - while (i > 0u) + while (i > 0U) { /* outR = (pIn[2 * i] * pATable[2 * i] + pIn[2 * i + 1] * pATable[2 * i + 1] + @@ -344,7 +344,7 @@ void arm_split_rifft_q15( /* pIn[2 * i] * pATable[2 * i] + pIn[2 * i + 1] * pATable[2 * i + 1] + pIn[2 * n - 2 * i] * pBTable[2 * i] */ - outR = __SMLAD(*__SIMD32(pSrc1), *__SIMD32(pCoefA), outR) >> 16u; + outR = __SMLAD(*__SIMD32(pSrc1), *__SIMD32(pCoefA), outR) >> 16U; /* -pIn[2 * n - 2 * i] * pBTable[2 * i + 1] + @@ -366,17 +366,17 @@ void arm_split_rifft_q15( #ifndef ARM_MATH_BIG_ENDIAN - *__SIMD32(pDst1)++ = __PKHBT(outR, (outI >> 16u), 16); + *__SIMD32(pDst1)++ = __PKHBT(outR, (outI >> 16U), 16); #else - *__SIMD32(pDst1)++ = __PKHBT((outI >> 16u), outR, 16); + *__SIMD32(pDst1)++ = __PKHBT((outI >> 16U), outR, 16); #endif /* #ifndef ARM_MATH_BIG_ENDIAN */ /* update coefficient pointer */ - pCoefB = pCoefB + (2u * modifier); - pCoefA = pCoefA + (2u * modifier); + pCoefB = pCoefB + (2U * modifier); + pCoefA = pCoefA + (2U * modifier); i--; } @@ -384,7 +384,7 @@ void arm_split_rifft_q15( /* Run the below code for Cortex-M0 */ i = fftLen; - while (i > 0u) + while (i > 0U) { /* outR = (pIn[2 * i] * pATable[2 * i] + pIn[2 * i + 1] * pATable[2 * i + 1] + @@ -409,16 +409,16 @@ void arm_split_rifft_q15( outI = outI - (*(pSrc2 + 1) * *(pCoefB)); /* update input pointers */ - pSrc1 += 2u; - pSrc2 -= 2u; + pSrc1 += 2U; + pSrc2 -= 2U; /* write output */ *pDst1++ = (q15_t) outR; *pDst1++ = (q15_t) (outI >> 16); /* update coefficient pointer */ - pCoefB = pCoefB + (2u * modifier); - pCoefA = pCoefA + (2u * modifier); + pCoefB = pCoefB + (2U * modifier); + pCoefA = pCoefA + (2U * modifier); i--; } diff --git a/Source/TransformFunctions/arm_rfft_q31.c b/Source/TransformFunctions/arm_rfft_q31.c index 460d77d0..5386140f 100644 --- a/Source/TransformFunctions/arm_rfft_q31.c +++ b/Source/TransformFunctions/arm_rfft_q31.c @@ -81,7 +81,7 @@ void arm_rfft_q31( uint32_t L2 = S->fftLenReal >> 1; /* Calculation of RIFFT of input */ - if (S->ifftFlagR == 1u) + if (S->ifftFlagR == 1U) { /* Real IFFT core process */ arm_split_rifft_q31(pSrc, L2, S->pTwiddleAReal, @@ -134,16 +134,16 @@ void arm_split_rfft_q31( q31_t outR, outI; /* Temporary variables for output */ q31_t *pCoefA, *pCoefB; /* Temporary pointers for twiddle factors */ q31_t CoefA1, CoefA2, CoefB1; /* Temporary variables for twiddle coefficients */ - q31_t *pOut1 = &pDst[2], *pOut2 = &pDst[(4u * fftLen) - 1u]; - q31_t *pIn1 = &pSrc[2], *pIn2 = &pSrc[(2u * fftLen) - 1u]; + q31_t *pOut1 = &pDst[2], *pOut2 = &pDst[(4U * fftLen) - 1U]; + q31_t *pIn1 = &pSrc[2], *pIn2 = &pSrc[(2U * fftLen) - 1U]; /* Init coefficient pointers */ - pCoefA = &pATable[modifier * 2u]; - pCoefB = &pBTable[modifier * 2u]; + pCoefA = &pATable[modifier * 2U]; + pCoefB = &pBTable[modifier * 2U]; - i = fftLen - 1u; + i = fftLen - 1U; - while (i > 0u) + while (i > 0U) { /* outR = (pSrc[2 * i] * pATable[2 * i] - pSrc[2 * i + 1] * pATable[2 * i + 1] @@ -192,13 +192,13 @@ void arm_split_rfft_q31( *pOut2-- = outR; /* update coefficient pointer */ - pCoefB = pCoefB + (modifier * 2u); - pCoefA = pCoefA + ((modifier * 2u) - 1u); + pCoefB = pCoefB + (modifier * 2U); + pCoefA = pCoefA + ((modifier * 2U) - 1U); i--; } - pDst[2u * fftLen] = (pSrc[0] - pSrc[1]) >> 1; - pDst[(2u * fftLen) + 1u] = 0; + pDst[2U * fftLen] = (pSrc[0] - pSrc[1]) >> 1; + pDst[(2U * fftLen) + 1U] = 0; pDst[0] = (pSrc[0] + pSrc[1]) >> 1; pDst[1] = 0; @@ -225,12 +225,12 @@ void arm_split_rifft_q31( q31_t outR, outI; /* Temporary variables for output */ q31_t *pCoefA, *pCoefB; /* Temporary pointers for twiddle factors */ q31_t CoefA1, CoefA2, CoefB1; /* Temporary variables for twiddle coefficients */ - q31_t *pIn1 = &pSrc[0], *pIn2 = &pSrc[(2u * fftLen) + 1u]; + q31_t *pIn1 = &pSrc[0], *pIn2 = &pSrc[(2U * fftLen) + 1U]; pCoefA = &pATable[0]; pCoefB = &pBTable[0]; - while (fftLen > 0u) + while (fftLen > 0U) { /* outR = (pIn[2 * i] * pATable[2 * i] + pIn[2 * i + 1] * pATable[2 * i + 1] + @@ -274,8 +274,8 @@ void arm_split_rifft_q31( *pDst++ = outI; /* update coefficient pointer */ - pCoefB = pCoefB + (modifier * 2u); - pCoefA = pCoefA + ((modifier * 2u) - 1u); + pCoefB = pCoefB + (modifier * 2U); + pCoefA = pCoefA + ((modifier * 2U) - 1U); /* Decrement loop count */ fftLen--;