diff --git a/common/utils/threadPool/task_ans.h b/common/utils/threadPool/task_ans.h index 4d1203555d..9bdf55b291 100644 --- a/common/utils/threadPool/task_ans.h +++ b/common/utils/threadPool/task_ans.h @@ -31,7 +31,9 @@ extern "C" { #include #else #include +#ifndef _Atomic #define _Atomic(X) std::atomic +#endif #define _Alignas(X) alignas(X) #endif diff --git a/openair1/PHY/CODING/3gpplte_sse.c b/openair1/PHY/CODING/3gpplte_sse.c index c161682f7d..79fd825a4b 100644 --- a/openair1/PHY/CODING/3gpplte_sse.c +++ b/openair1/PHY/CODING/3gpplte_sse.c @@ -349,8 +349,6 @@ void threegpplte_turbo_encoder_sse(unsigned char *input, #ifdef DEBUG_TURBO_ENCODER printf("term: x0 %u, x1 %u, state1 %d\n",x[10],x[11],state1); #endif // DEBUG_TURBO_ENCODER - simde_mm_empty(); - simde_m_empty(); } void init_encoder_sse (void) { diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_avx2_16bit.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_avx2_16bit.c index 77708f4489..57c53df1b1 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder_avx2_16bit.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_avx2_16bit.c @@ -1258,8 +1258,6 @@ unsigned char phy_threegpplte_turbo_decoder16avx2(int16_t *y, // fprintf(fdavx2,"crc %x, oldcrc %x\n",crc,oldcrc); - simde_mm_empty(); - simde_m_empty(); #ifdef DEBUG_LOGMAP fclose(fdavx2); diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse.c index fa1b55b45e..e6d1f87b4e 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse.c @@ -364,8 +364,6 @@ void compute_gamma(llr_t *m11,llr_t *m10,llr_t *systematic,channel_t *y_parity, simde_mm_extract_epi8(m11_128[k],15)); */ #endif - simde_mm_empty(); - simde_m_empty(); } #define L 40 @@ -1183,8 +1181,6 @@ void compute_alpha(llr_t *alpha,llr_t *beta,llr_t *m_11,llr_t *m_10,unsigned sho break; } - simde_mm_empty(); - simde_m_empty(); } @@ -1747,8 +1743,6 @@ void compute_beta(llr_t *alpha,llr_t *beta,llr_t *m_11,llr_t *m_10,unsigned shor break; } - simde_mm_empty(); - simde_m_empty(); } void compute_ext(llr_t *alpha,llr_t *beta,llr_t *m_11,llr_t *m_10,llr_t *ext, llr_t *systematic,unsigned short frame_length) { @@ -1910,8 +1904,6 @@ void compute_ext(llr_t *alpha,llr_t *beta,llr_t *m_11,llr_t *m_10,llr_t *ext, ll } #endif - simde_mm_empty(); - simde_m_empty(); } diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c index c7f2c7663a..cae2093e99 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c @@ -1391,8 +1391,6 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y, fclose(fdsse4); #endif #if defined(__x86_64__) || defined(__i386__) - simde_mm_empty(); - simde_m_empty(); #endif if (iteration_cnt > max_iterations) set_abort(ab, true); diff --git a/openair1/PHY/CODING/TESTBENCH/pdcch_test.c b/openair1/PHY/CODING/TESTBENCH/pdcch_test.c index f4574bb0c5..873e9e19bc 100644 --- a/openair1/PHY/CODING/TESTBENCH/pdcch_test.c +++ b/openair1/PHY/CODING/TESTBENCH/pdcch_test.c @@ -246,7 +246,6 @@ int main(int argc, char *argv[]) set_taus_seed(0); ccodelte_init(); - ccodelte_init_inv(); phy_generate_viterbi_tables_lte(); lte_frame_parms = &(PHY_config->lte_frame_parms); diff --git a/openair1/PHY/CODING/ccoding_byte_lte.c b/openair1/PHY/CODING/ccoding_byte_lte.c index becdc59074..4121cf2b36 100644 --- a/openair1/PHY/CODING/ccoding_byte_lte.c +++ b/openair1/PHY/CODING/ccoding_byte_lte.c @@ -32,9 +32,7 @@ static const unsigned short glte[] = {0133, 0171, 0165}; // {A,B} static const unsigned short glte_rev[] = {0155, 0117, 0127}; // {A,B} static const unsigned short gdab[] = {0133, 0171, 0145}; // {A,B} static const unsigned short gdab_rev[] = {0155, 0117, 0123}; // {A,B} -unsigned char ccodelte_table[128]; // for transmitter -unsigned char ccodelte_table_rev[128]; // for receiver - +static unsigned char ccodelte_table[128]; // for transmitter /************************************************************************* @@ -45,8 +43,6 @@ unsigned char ccodelte_table_rev[128]; // for receiver Trellis tail-biting is included here *************************************************************************/ - - void ccodelte_encode (int32_t numbits, uint8_t add_crc, @@ -238,7 +234,8 @@ void ccodelte_init(void) { } /* Input in LSB, followed by state in 6 MSBs */ -void ccodelte_init_inv(void) { +void ccodelte_init_inv(unsigned char ccodelte_table_rev[128]) +{ unsigned int i, j, k, sum; for (i = 0; i < 128; i++) { @@ -279,7 +276,8 @@ void ccodedab_init(void) { } /* Input in LSB, followed by state in 6 MSBs */ -void ccodedab_init_inv(void) { +void ccodedab_init_inv(unsigned char ccodelte_table_rev[128]) +{ unsigned int i, j, k, sum; for (i = 0; i < 128; i++) { @@ -299,7 +297,6 @@ void ccodedab_init_inv(void) { } } - /*****************************************************************/ /** Test program diff --git a/openair1/PHY/CODING/coding_defs.h b/openair1/PHY/CODING/coding_defs.h index 7da151fea9..3c91892d8c 100644 --- a/openair1/PHY/CODING/coding_defs.h +++ b/openair1/PHY/CODING/coding_defs.h @@ -304,17 +304,17 @@ void ccodelte_encode(int32_t numbits, uint8_t add_crc, uint8_t *inPtr, uint8_t * \brief This function initializes the generator polynomials for an LTE convolutional code.*/ void ccodelte_init(void); -/*!\fn void ccodelte_init_inv(void) +/*!\fn void ccodelte_init_inv(unsigned char ccodelte_table_rev[128]) \brief This function initializes the trellis structure for decoding an LTE convolutional code.*/ -void ccodelte_init_inv(void); +void ccodelte_init_inv(unsigned char ccodelte_table_rev[128]); /*!\fn void ccodelte_init(void) \brief This function initializes the generator polynomials for an DAB convolutional code (first 3 bits).*/ void ccodedab_init(void); -/*!\fn void ccodelte_init_inv(void) +/*!\fn void ccodelte_init_inv(unsigned char ccodelte_table_rev[128]) \brief This function initializes the trellis structure for decoding an DAB convolutional code (first 3 bits).*/ -void ccodedab_init_inv(void); +void ccodedab_init_inv(unsigned char ccodelte_table_rev[128]); /*!\fn void crcTableInit(void) \brief This function initializes the different crc tables.*/ diff --git a/openair1/PHY/CODING/viterbi.c b/openair1/PHY/CODING/viterbi.c index 20242c8914..4f8df56fc2 100644 --- a/openair1/PHY/CODING/viterbi.c +++ b/openair1/PHY/CODING/viterbi.c @@ -314,7 +314,6 @@ void phy_viterbi_dot11_sse2(char *y,unsigned char *decoded_bytes,unsigned short } } - simde_mm_empty(); } #ifdef TEST_DEBUG diff --git a/openair1/PHY/CODING/viterbi_lte.c b/openair1/PHY/CODING/viterbi_lte.c index 4efab84f49..b074e1c914 100644 --- a/openair1/PHY/CODING/viterbi_lte.c +++ b/openair1/PHY/CODING/viterbi_lte.c @@ -40,8 +40,7 @@ #include "PHY/sse_intrin.h" - -extern uint8_t ccodelte_table[128],ccodelte_table_rev[128]; +#include "coding_defs.h" static int8_t m0_table[64*16*16*16] __attribute__ ((aligned(16))); static int8_t m1_table[64*16*16*16] __attribute__ ((aligned(16))); @@ -50,6 +49,8 @@ static int8_t m1_table[64*16*16*16] __attribute__ ((aligned(16))); // Set up Viterbi tables for SSE2 implementation void phy_generate_viterbi_tables_lte( void ) { + uint8_t ccodelte_table_rev[128]; + ccodelte_init_inv(ccodelte_table_rev); int8_t w[8],in0,in1,in2; uint8_t state,index0,index1; @@ -126,52 +127,29 @@ void print_shorts(simde__m128i x,char *s) { void phy_viterbi_lte_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n) { simde__m128i TB[4 * 8192]; - simde__m128i *m0_ptr, *m1_ptr, *TB_ptr = &TB[0]; - - simde__m128i metrics0_15, metrics16_31, metrics32_47, metrics48_63, even0_30a, even0_30b, even32_62a, even32_62b, odd1_31a, - odd1_31b, odd33_63a, odd33_63b, TBeven0_30, TBeven32_62, TBodd1_31, TBodd33_63; - - simde__m128i min_state, min_state2; - - int8_t *in = y; - uint8_t prev_state0,maxm,s; - static uint8_t *TB_ptr2; - uint32_t table_offset; - uint8_t iter; - int16_t position; - - // set initial metrics - //debug_msg("Doing viterbi\n"); - - metrics0_15 = simde_mm_setzero_si128(); - metrics16_31 = simde_mm_setzero_si128(); - metrics32_47 = simde_mm_setzero_si128(); - metrics48_63 = simde_mm_setzero_si128(); - - for (iter=0; iter<2; iter++) { - in = y; - TB_ptr=&TB[0]; - - for (position=0; position maxm) { - maxm = ((uint8_t *)&metrics0_15)[s]; + uint prev_state0 = 0; + uint maxm = 0; + uint s = 0; + for (uint8_t *ptr = (uint8_t *)&metrics0_15; s < 16; s++, ptr++) + if (*ptr > maxm) { + maxm = *ptr; prev_state0 = s; } - for (s=0; s<16; s++) - if (((uint8_t *)&metrics16_31)[s] > maxm) { - maxm = ((uint8_t *)&metrics16_31)[s]; - prev_state0 = s+16; + for (uint8_t *ptr = (uint8_t *)&metrics16_31; s < 32; s++, ptr++) + if (*ptr > maxm) { + maxm = *ptr; + prev_state0 = s; + } + for (uint8_t *ptr = (uint8_t *)&metrics32_47; s < 48; s++, ptr++) + if (*ptr > maxm) { + maxm = *ptr; + prev_state0 = s; + } + for (uint8_t *ptr = (uint8_t *)&metrics48_63; s < 64; s++, ptr++) + if (*ptr > maxm) { + maxm = *ptr; + prev_state0 = s; } - for (s=0; s<16; s++) - if (((uint8_t *)&metrics32_47)[s] > maxm) { - maxm = ((uint8_t *)&metrics32_47)[s]; - prev_state0 = s+32; - } - - for (s=0; s<16; s++) - if (((uint8_t *)&metrics48_63)[s] > maxm) { - maxm = ((uint8_t *)&metrics48_63)[s]; - prev_state0 = s+48; - } - - TB_ptr2 = (uint8_t *)&TB[(n-1)*4]; - - for (position = n-1 ; position>-1; position--) { + uint8_t *TB_ptr2 = (uint8_t *)&TB[(n - 1) * 4]; + for (int position = n - 1; position > -1; position--) { decoded_bytes[(position)>>3] += (prev_state0 & 0x1)<<(7-(position & 0x7)); @@ -278,9 +251,6 @@ void phy_viterbi_lte_sse2(int8_t *y,uint8_t *decoded_bytes,uint16_t n) TB_ptr2-=64; } - - simde_mm_empty(); - simde_m_empty(); } #ifdef TEST_DEBUG @@ -306,10 +276,8 @@ int test_viterbi(uint8_t dabflag) if (dabflag==0) { ccodelte_init(); - ccodelte_init_inv(); } else { ccodedab_init(); - ccodedab_init_inv(); printf("Running with DAB polynomials\n"); } diff --git a/openair1/PHY/INIT/init_top.c b/openair1/PHY/INIT/init_top.c index 15b27b4db1..b4ac0617a6 100644 --- a/openair1/PHY/INIT/init_top.c +++ b/openair1/PHY/INIT/init_top.c @@ -63,7 +63,6 @@ void generate_qpsk_table(void) { void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) { ccodelte_init(); - ccodelte_init_inv(); phy_generate_viterbi_tables_lte(); load_codinglib(); generate_ul_ref_sigs(); diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c index c9ec2449e1..6abe02c941 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c @@ -493,8 +493,6 @@ void conjch0_mult_ch1(int *ch0, dl_ch1_128+=1; ch0conj_ch1_128+=1; } - simde_mm_empty(); - simde_m_empty(); } void construct_HhH_elements(int *ch0conj_ch0, //00_00 @@ -567,8 +565,6 @@ void construct_HhH_elements(int *ch0conj_ch0, //00_00 after_mf_10_128+=1; after_mf_11_128+=1; } - simde_mm_empty(); - simde_m_empty(); } @@ -595,8 +591,6 @@ void squared_matrix_element(int32_t *Hh_h_00, Hh_h_00_sq_128+=1; Hh_h_00_128+=1; } - simde_mm_empty(); - simde_m_empty(); } @@ -645,8 +639,6 @@ void det_HhH(int32_t *after_mf_00, //after_mf_10_128+=1; after_mf_11_128+=1; } - simde_mm_empty(); - simde_m_empty(); } void numer(int32_t *Hh_h_00_sq, @@ -691,8 +683,6 @@ void numer(int32_t *Hh_h_00_sq, h_h_10_sq_128+=1; h_h_11_sq_128+=1; } - simde_mm_empty(); - simde_m_empty(); } void dlsch_channel_level_TM34_meas(int *ch00, @@ -768,8 +758,6 @@ void dlsch_channel_level_TM34_meas(int *ch00, avg_0[0] = min (avg_0[0], avg_1[0]); avg_1[0] = avg_0[0]; - simde_mm_empty(); - simde_m_empty(); } @@ -1339,8 +1327,6 @@ void lte_ue_measurements(PHY_VARS_UE *ue, // printf("in lte_ue_measurements: selected rx_antenna[eNB_id==0]:%u\n", ue->measurements.selected_rx_antennas[eNB_id][i]); } // eNB_id loop - simde_mm_empty(); - simde_m_empty(); } diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 0370285e07..2506853705 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -216,8 +216,6 @@ int32_t ulsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms, (*llrp128)++; } - simde_mm_empty(); - simde_m_empty(); return(0); } @@ -245,8 +243,6 @@ void ulsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms, // print_bytes("rxF[i+1]",&rxF[i+1]); } - simde_mm_empty(); - simde_m_empty(); } void ulsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, @@ -289,8 +285,6 @@ void ulsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, (*llrp32)+=12; } - simde_mm_empty(); - simde_m_empty(); } void ulsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, @@ -347,8 +341,6 @@ void ulsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } void ulsch_extract_rbs_single(int32_t **rxdataF, @@ -524,8 +516,6 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext, } } - simde_mm_empty(); - simde_m_empty(); } void ulsch_channel_level(int32_t **drs_ch_estimates_ext, @@ -556,8 +546,6 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext, ((float *)&avg128U)[3])/(float)(nb_rb*12)); } - simde_mm_empty(); - simde_m_empty(); } static int ulsch_power_LUT[750]; diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dci_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/dci_ue.c index 381dfc0cdf..f3d14b80ea 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/dci_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/dci_ue.c @@ -384,8 +384,6 @@ void pdcch_channel_level(int32_t **dl_ch_estimates_ext, // printf("Channel level : %d\n",avg[(aatx<<1)+aarx]); } - simde_mm_empty(); - simde_m_empty(); } @@ -433,8 +431,6 @@ void pdcch_detection_mrc_i(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } @@ -1078,8 +1074,6 @@ void pdcch_channel_compensation(int32_t **rxdataF_ext, } - simde_mm_empty(); - simde_m_empty(); } void pdcch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, @@ -1103,8 +1097,6 @@ void pdcch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c index b9ba9347cf..0d13a1c38d 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c @@ -1481,8 +1481,6 @@ void dlsch_channel_compensation(int **rxdataF_ext, } } - simde_mm_empty(); - simde_m_empty(); } void dlsch_channel_compensation_core(int **rxdataF_ext, @@ -1666,8 +1664,6 @@ void dlsch_channel_compensation_core(int **rxdataF_ext, } } - simde_mm_empty(); - simde_m_empty(); } @@ -1706,8 +1702,6 @@ void prec2A_TM56_128(unsigned char pmi,simde__m128i *ch0,simde__m128i *ch1) { ch0[0] = simde_mm_mulhi_epi16(ch0[0],amp); ch0[0] = simde_mm_slli_epi16(ch0[0],1); - simde_mm_empty(); - simde_m_empty(); } // precoding is stream 0 .5(1,1) .5(1,-1) .5(1,1) .5(1,-1) // stream 1 .5(1,-1) .5(1,1) .5(1,-1) .5(1,1) @@ -1740,8 +1734,6 @@ void prec2A_TM3_128(simde__m128i *ch0,simde__m128i *ch1) { //ch1[0] = simde_mm_srai_epi16(ch1[0],1); // print_shorts("prec2A_TM3 ch0 (after):",ch0); // print_shorts("prec2A_TM3 ch1 (after):",ch1); - simde_mm_empty(); - simde_m_empty(); } // pmi = 0 => stream 0 (1,1), stream 1 (1,-1) @@ -1782,8 +1774,6 @@ void prec2A_TM4_128(int pmi,simde__m128i *ch0,simde__m128i *ch1) { // ch1[0] = simde_mm_srai_epi16(ch1[0],1); //divide by 2 //print_shorts("prec2A_TM4 ch0 (end):",ch0); //print_shorts("prec2A_TM4 ch1 (end):",ch1); - simde_mm_empty(); - simde_m_empty(); // print_shorts("prec2A_TM4 ch0 (end):",ch0); //print_shorts("prec2A_TM4 ch1 (end):",ch1); } @@ -2359,8 +2349,6 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms, measurements->precoded_cqi_dB[eNB_id][1] = dB_fixed2(precoded_signal_strength1,measurements->n0_power_tot); // printf("eNB_id %d, symbol %d: precoded CQI %d dB\n",eNB_id,symbol, // measurements->precoded_cqi_dB[eNB_id][0]); - simde_mm_empty(); - simde_m_empty(); } @@ -2453,8 +2441,6 @@ void dlsch_dual_stream_correlation(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } @@ -2526,8 +2512,6 @@ void dlsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } void dlsch_detection_mrc_TM34(LTE_DL_FRAME_PARMS *frame_parms, @@ -2651,8 +2635,6 @@ void dlsch_detection_mrc_TM34(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } void dlsch_scale_channel(int **dl_ch_estimates_ext, @@ -2765,8 +2747,6 @@ void dlsch_channel_level(int **dl_ch_estimates_ext, ((int32_t *)&avg128D)[3])/y; } - simde_mm_empty(); - simde_m_empty(); } void dlsch_channel_level_core(int **dl_ch_estimates_ext, @@ -2809,8 +2789,6 @@ void dlsch_channel_level_core(int **dl_ch_estimates_ext, //printf("Channel level [%d]: %d\n",aatx*n_rx + aarx, avg[aatx*n_rx + aarx]); } - simde_mm_empty(); - simde_m_empty(); /* FIXME This part needs to be adapted like the one above */ } @@ -2857,8 +2835,6 @@ void dlsch_channel_level_median(int **dl_ch_estimates_ext, } } - simde_mm_empty(); - simde_m_empty(); } void mmse_processing_oai(LTE_UE_PDSCH *pdsch_vars, @@ -3189,8 +3165,6 @@ void dlsch_channel_aver_band(int **dl_ch_estimates_ext, } } - simde_mm_empty(); - simde_m_empty(); } void rxdataF_to_float(int32_t **rxdataF_ext, @@ -3558,8 +3532,6 @@ void dlsch_channel_level_TM34(int **dl_ch_estimates_ext, // printf("From Chan_level aver stream 1 final =%d\n", avg_1[0]); avg_0[0] = min (avg_0[0], avg_1[0]); avg_1[0] = avg_0[0]; - simde_mm_empty(); - simde_m_empty(); } //compute average channel_level of effective (precoded) channel @@ -3624,8 +3596,6 @@ void dlsch_channel_level_TM56(int **dl_ch_estimates_ext, // choose maximum of the 2 effective channels avg[0] = cmax(avg[0],avg[1]); - simde_mm_empty(); - simde_m_empty(); } //compute average channel_level for TM7 @@ -3684,8 +3654,6 @@ void dlsch_channel_level_TM7(int **dl_bf_ch_estimates_ext, // printf("Channel level : %d\n",avg[(aatx<<1)+aarx]); } - simde_mm_empty(); - simde_m_empty(); } //#define ONE_OVER_2_Q15 16384 void dlsch_alamouti(LTE_DL_FRAME_PARMS *frame_parms, @@ -3753,8 +3721,6 @@ void dlsch_alamouti(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } //============================================================================================== @@ -5587,8 +5553,6 @@ unsigned short dlsch_extract_rbs_TM7(int **rxdataF, } } - simde_mm_empty(); - simde_m_empty(); return(nb_rb/frame_parms->nb_antennas_rx); } diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c index 9995f9b8d9..72422d4dcf 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c @@ -1668,8 +1668,6 @@ void qam64_qam16_avx2(short *stream0_in, } - simde_mm_empty(); - simde_m_empty(); } @@ -3499,8 +3497,6 @@ void qam64_qam64_avx2(int32_t *stream0_in, } - simde_mm_empty(); - simde_m_empty(); } -#endif \ No newline at end of file +#endif diff --git a/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c index cf62a3a945..9eefe212c7 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c @@ -185,8 +185,6 @@ int pbch_channel_level(int **dl_ch_estimates_ext, //msg("Channel level : %d, %d\n",avg1, avg2); } - simde_mm_empty(); - simde_m_empty(); return(avg2); } @@ -277,8 +275,6 @@ void pbch_channel_compensation(int **rxdataF_ext, } } - simde_mm_empty(); - simde_m_empty(); } void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, @@ -302,8 +298,6 @@ void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, diff --git a/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c index a3b33cf54b..04546b2a19 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c @@ -244,8 +244,6 @@ void mch_channel_level(int **dl_ch_estimates_ext, // printf("Channel level : %d\n",avg[(aatx<<1)+aarx]); } - simde_mm_empty(); - simde_m_empty(); } void mch_channel_level_khz_1dot25(int **dl_ch_estimates_ext, @@ -285,8 +283,6 @@ void mch_channel_level_khz_1dot25(int **dl_ch_estimates_ext, //printf("Channel level : %d\n",avg[(aatx<<1)+aarx]); } - simde_mm_empty(); - simde_m_empty(); } @@ -393,8 +389,6 @@ void mch_channel_compensation(int **rxdataF_ext, } } - simde_mm_empty(); - simde_m_empty(); } @@ -501,8 +495,6 @@ void mch_channel_compensation_khz_1dot25(int **rxdataF_ext, } } - simde_mm_empty(); - simde_m_empty(); } @@ -533,8 +525,6 @@ void mch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } @@ -564,8 +554,6 @@ void mch_detection_mrc_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } @@ -603,8 +591,6 @@ int mch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms, } *llr32p = (short *)llr32; - simde_mm_empty(); - simde_m_empty(); return(0); } @@ -634,8 +620,6 @@ int mch_qpsk_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms, } *llr32p = (short *)llr32; - simde_mm_empty(); - simde_m_empty(); return(0); } @@ -700,8 +684,6 @@ void mch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms, llr32 += 8; } - simde_mm_empty(); - simde_m_empty(); } void mch_16qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms, @@ -750,8 +732,6 @@ void mch_16qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms, llr32 += 8; } - simde_mm_empty(); - simde_m_empty(); } //---------------------------------------------------------------------------------------------- @@ -843,8 +823,6 @@ void mch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, } *llr_save = llr; - simde_mm_empty(); - simde_m_empty(); } void mch_64qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms, @@ -924,8 +902,6 @@ void mch_64qam_llr_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms, } *llr_save = llr; - simde_mm_empty(); - simde_m_empty(); } int avg_pmch[4]; diff --git a/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c index 44855e551e..ad513a424e 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c @@ -39,7 +39,7 @@ #include "PHY/LTE_TRANSPORT/transport_vars.h" #include "assertions.h" -static int8_t delta_PUSCH_msg2[8] = {-6, -4, -2, 0, 2, 4, 6, 8}; +static const int8_t delta_PUSCH_msg2[8] = {-6, -4, -2, 0, 2, 4, 6, 8}; int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, diff --git a/openair1/PHY/LTE_UE_TRANSPORT/sss_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/sss_ue.c index 79b20dc10c..6d155f896f 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/sss_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/sss_ue.c @@ -225,26 +225,9 @@ int pss_sss_extract(PHY_VARS_UE *phy_vars_ue, return _do_pss_sss_extract(phy_vars_ue, pss_ext, sss_ext, 1 /* doPss */, 1 /* doSss */, subframe); } -int pss_only_extract(PHY_VARS_UE *phy_vars_ue, - int32_t pss_ext[4][72], - uint8_t subframe) -{ - static int32_t dummy[4][72]; - return _do_pss_sss_extract(phy_vars_ue, pss_ext, dummy, 1 /* doPss */, 0 /* doSss */, subframe); -} - -int sss_only_extract(PHY_VARS_UE *phy_vars_ue, - int32_t sss_ext[4][72], - uint8_t subframe) -{ - static int32_t dummy[4][72]; - return _do_pss_sss_extract(phy_vars_ue, dummy, sss_ext, 0 /* doPss */, 1 /* doSss */, subframe); -} - - -int16_t phase_re[7] = {16383, 25101, 30791, 32767, 30791, 25101, 16383}; -int16_t phase_im[7] = {-28378, -21063, -11208, 0, 11207, 21062, 28377}; +static const int16_t phase_re[7] = {16383, 25101, 30791, 32767, 30791, 25101, 16383}; +static const int16_t phase_im[7] = {-28378, -21063, -11208, 0, 11207, 21062, 28377}; int rx_sss(PHY_VARS_UE *ue,int32_t *tot_metric,uint8_t *flip_max,uint8_t *phase_max) diff --git a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h index 18eb375f62..9aab56e52a 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h +++ b/openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h @@ -1082,16 +1082,6 @@ int pss_sss_extract(PHY_VARS_UE *phy_vars_ue, int32_t sss_ext[4][72], uint8_t subframe); -/*! \brief Extract only PSS resource elements - @param phy_vars_ue Pointer to UE variables - @param[out] pss_ext contain the PSS signals after the extraction -@param subframe - @returns 0 on success -*/ -int pss_only_extract(PHY_VARS_UE *phy_vars_ue, - int32_t pss_ext[4][72], - uint8_t subframe); - /*! \brief Extract only SSS resource elements @param phy_vars_ue Pointer to UE variables @param[out] sss_ext contain the SSS signals after the extraction diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index 8c8b8212a2..743c32e667 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -223,8 +223,6 @@ static void nr_ulsch_channel_level(int size_est, } } - simde_mm_empty(); - simde_m_empty(); } static void nr_ulsch_channel_compensation(c16_t *rxFext, @@ -334,8 +332,6 @@ static void nr_ulsch_channel_compensation(c16_t *rxFext, } } - simde_mm_empty(); - simde_m_empty(); } // Zero Forcing Rx function: nr_det_HhH() @@ -397,8 +393,6 @@ static void nr_ulsch_det_HhH (int32_t *after_mf_00,//a after_mf_10_128+=1; after_mf_11_128+=1; } - simde_mm_empty(); - simde_m_empty(); } /* Zero Forcing Rx function: nr_conjch0_mult_ch1() @@ -444,8 +438,6 @@ static void nr_ulsch_conjch0_mult_ch1(int *ch0, dl_ch1_128+=1; ch0conj_ch1_128+=1; } - simde_mm_empty(); - simde_m_empty(); } static simde__m128i nr_ulsch_comp_muli_sum(simde__m128i input_x, @@ -507,8 +499,6 @@ static simde__m128i nr_ulsch_comp_muli_sum(simde__m128i input_x, //print_ints("unpack hi:",&tmp_z1[0]); output = simde_mm_packs_epi32(tmp_z0,tmp_z1); - simde_mm_empty(); - simde_m_empty(); return(output); } @@ -625,8 +615,6 @@ static void nr_ulsch_construct_HhH_elements(int *conjch00_ch00, after_mf_10_128 += 1; after_mf_11_128 += 1; } - simde_mm_empty(); - simde_m_empty(); } // MMSE Rx function: nr_ulsch_mmse_2layers() @@ -1017,8 +1005,6 @@ static uint8_t nr_ulsch_mmse_2layers(NR_DL_FRAME_PARMS *frame_parms, after_mf_c_128 += 1; after_mf_d_128 += 1; } - simde_mm_empty(); - simde_m_empty(); return(0); } diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c index 6c5c37385b..286386297f 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c @@ -388,7 +388,6 @@ void nr_ulsch_qpsk_qpsk(c16_t *stream0_in, c16_t *stream1_in, c16_t *stream0_out } } #endif - simde_mm_empty(); } @@ -1056,7 +1055,6 @@ void nr_ulsch_qam16_qam16(c16_t *stream0_in, stream0_128i_out[3] = simde_mm_unpackhi_epi32(xmm1_128, xmm3_128); // 8 LLRs, 2 REs } #endif - simde_mm_empty(); } /* @@ -1777,7 +1775,6 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in, } } #endif - simde_mm_empty(); } static void nr_ulsch_shift_llr(int16_t **llr_layers, uint32_t nb_re, uint32_t rxdataF_ext_offset, uint8_t mod_order, int shift) diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c index bcd24fef4a..c80bc4e5f2 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c +++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c @@ -86,8 +86,6 @@ void nr_det_A_MF_2x2(int32_t *a_mf_00, a_mf_10_128+=1; a_mf_11_128+=1; } - simde_mm_empty(); - simde_m_empty(); } void nr_squared_matrix_element(int32_t *a, @@ -100,8 +98,6 @@ void nr_squared_matrix_element(int32_t *a, a_sq_128+=1; a_128+=1; } - simde_mm_empty(); - simde_m_empty(); } void nr_numer_2x2(int32_t *a_00_sq, @@ -125,8 +121,6 @@ void nr_numer_2x2(int32_t *a_00_sq, a_10_sq_128+=1; a_11_sq_128+=1; } - simde_mm_empty(); - simde_m_empty(); } bool is_csi_rs_in_symbol(const fapi_nr_dl_config_csirs_pdu_rel15_t csirs_config_pdu, const int symbol) { diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index 217a370054..e5442aab48 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -1304,8 +1304,6 @@ static void nr_dlsch_detection_mrc(uint32_t rx_size_symbol, rho128_0[i] = simde_mm_adds_epi16(simde_mm_srai_epi16(rho128_0[i],1),simde_mm_srai_epi16(rho128_1[i],1)); }*/ } - simde_mm_empty(); - simde_m_empty(); } } @@ -1617,8 +1615,6 @@ void nr_conjch0_mult_ch1(int *ch0, dl_ch1_128+=1; ch0conj_ch1_128+=1; } - simde_mm_empty(); - simde_m_empty(); } /* diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 229191269f..1de1996126 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -263,8 +263,6 @@ void nr_pbch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms, } } - simde_mm_empty(); - simde_m_empty(); } void nr_pbch_unscrambling(int16_t *demod_pbch_e, diff --git a/openair1/PHY/TOOLS/cadd_vv.c b/openair1/PHY/TOOLS/cadd_vv.c index f1c61cc60a..7eade29bb0 100644 --- a/openair1/PHY/TOOLS/cadd_vv.c +++ b/openair1/PHY/TOOLS/cadd_vv.c @@ -47,8 +47,6 @@ int32_t sub_cpx_vector16(int16_t *x, } - simde_mm_empty(); - simde_m_empty(); return(0); } diff --git a/openair1/PHY/TOOLS/cmult_vv.c b/openair1/PHY/TOOLS/cmult_vv.c index 6bee29551f..111bfcabcb 100644 --- a/openair1/PHY/TOOLS/cmult_vv.c +++ b/openair1/PHY/TOOLS/cmult_vv.c @@ -27,7 +27,6 @@ static const int16_t conjug[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1, static const int16_t conjug2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1} ; #define simd_q15_t simde__m128i -#define simdshort_q15_t simde__m64 #define set1_int16(a) simde_mm_set1_epi16(a) #define setr_int16(a0, a1, a2, a3, a4, a5, a6, a7) simde_mm_setr_epi16(a0, a1, a2, a3, a4, a5, a6, a7 ) @@ -87,8 +86,6 @@ int mult_cpx_conj_vector(int16_t *x1, } - simde_mm_empty(); - simde_m_empty(); return(0); } @@ -150,8 +147,6 @@ int mult_cpx_vector(int16_t *x1, //Q15 x2_128++; y_128++; } - simde_mm_empty(); - simde_m_empty(); return(0); } @@ -207,7 +202,5 @@ int multadd_cpx_vector(int16_t *x1, x2_128++; y_128++; } - simde_mm_empty(); - simde_m_empty(); return(0); } diff --git a/openair1/PHY/TOOLS/invSqrt.c b/openair1/PHY/TOOLS/invSqrt.c index b3e0d9749a..fce565b1d3 100644 --- a/openair1/PHY/TOOLS/invSqrt.c +++ b/openair1/PHY/TOOLS/invSqrt.c @@ -19,7 +19,7 @@ * contact@openairinterface.org */ -static short lookup_table[1025] = {0x7fff, 0x16a0, 0x1000, 0xd10, 0xb50, 0xa1e, 0x93c, 0x88d, 0x800, 0x78a, 0x727, 0x6d2, 0x688, 0x646, 0x60c, 0x5d7, 0x5a8, 0x57c, 0x555, 0x530, 0x50f, 0x4f0, 0x4d2, 0x4b7, 0x49e, 0x486, 0x470, 0x45a, 0x446, 0x433, 0x421, 0x410, 0x400, 0x3f0, 0x3e1, 0x3d3, 0x3c5, 0x3b8, 0x3ab, 0x39f, 0x393, 0x388, 0x37d, 0x373, 0x369, 0x35f, 0x356, 0x34c, 0x344, 0x33b, 0x333, 0x32b, 0x323, 0x31b, 0x314, 0x30d, 0x306, 0x2ff, 0x2f8, 0x2f2, 0x2eb, 0x2e5, 0x2df, 0x2d9, 0x2d4, 0x2ce, 0x2c9, 0x2c3, 0x2be, 0x2b9, 0x2b4, 0x2af, 0x2aa, 0x2a5, 0x2a1, 0x29c, 0x298, 0x294, 0x28f, 0x28b, 0x287, 0x283, 0x27f, 0x27b, 0x278, 0x274, 0x270, 0x26d, 0x269, 0x266, 0x262, 0x25f, 0x25b, 0x258, 0x255, 0x252, 0x24f, 0x24c, 0x249, 0x246, 0x243, 0x240, 0x23d, 0x23a, 0x238, 0x235, 0x232, 0x22f, 0x22d, 0x22a, 0x228, 0x225, 0x223, 0x220, 0x21e, 0x21c, 0x219, 0x217, 0x215, 0x213, 0x210, 0x20e, 0x20c, 0x20a, 0x208, 0x206, 0x204, 0x202, 0x200, 0x1fe, 0x1fc, 0x1fa, 0x1f8, 0x1f6, 0x1f4, 0x1f2, 0x1f0, 0x1ee, 0x1ed, 0x1eb, 0x1e9, 0x1e7, 0x1e6, 0x1e4, 0x1e2, 0x1e1, 0x1df, 0x1dd, 0x1dc, 0x1da, 0x1d8, 0x1d7, 0x1d5, 0x1d4, 0x1d2, 0x1d1, 0x1cf, 0x1ce, 0x1cc, 0x1cb, 0x1c9, 0x1c8, 0x1c7, 0x1c5, 0x1c4, 0x1c2, 0x1c1, 0x1c0, 0x1be, 0x1bd, 0x1bc, 0x1ba, 0x1b9, 0x1b8, 0x1b7, 0x1b5, 0x1b4, 0x1b3, 0x1b2, 0x1b0, 0x1af, 0x1ae, 0x1ad, 0x1ac, 0x1ab, 0x1a9, 0x1a8, 0x1a7, 0x1a6, 0x1a5, 0x1a4, 0x1a3, 0x1a2, 0x1a0, 0x19f, 0x19e, 0x19d, 0x19c, 0x19b, 0x19a, 0x199, 0x198, 0x197, 0x196, 0x195, 0x194, 0x193, 0x192, 0x191, 0x190, 0x18f, 0x18e, 0x18d, 0x18c, 0x18b, 0x18b, 0x18a, 0x189, 0x188, 0x187, 0x186, 0x185, 0x184, 0x183, 0x183, 0x182, 0x181, 0x180, 0x17f, 0x17e, 0x17d, 0x17d, 0x17c, 0x17b, 0x17a, 0x179, 0x179, 0x178, 0x177, 0x176, 0x175, 0x175, 0x174, 0x173, 0x172, 0x172, 0x171, 0x170, 0x16f, 0x16f, 0x16e, 0x16d, 0x16c, 0x16c, 0x16b, 0x16a, 0x16a, 0x169, 0x168, 0x167, 0x167, 0x166, 0x165, 0x165, 0x164, 0x163, 0x163, 0x162, 0x161, 0x161, 0x160, 0x15f, 0x15f, 0x15e, 0x15d, 0x15d, 0x15c, 0x15c, 0x15b, 0x15a, 0x15a, 0x159, 0x158, 0x158, 0x157, 0x157, 0x156, 0x155, 0x155, 0x154, 0x154, 0x153, 0x152, 0x152, 0x151, 0x151, 0x150, 0x150, 0x14f, 0x14e, 0x14e, 0x14d, 0x14d, 0x14c, 0x14c, 0x14b, 0x14b, 0x14a, 0x14a, 0x149, 0x148, 0x148, 0x147, 0x147, 0x146, 0x146, 0x145, 0x145, 0x144, 0x144, 0x143, 0x143, 0x142, 0x142, 0x141, 0x141, 0x140, 0x140, 0x13f, 0x13f, 0x13e, 0x13e, 0x13d, 0x13d, 0x13c, 0x13c, 0x13c, 0x13b, 0x13b, 0x13a, 0x13a, 0x139, 0x139, 0x138, 0x138, 0x137, 0x137, 0x136, 0x136, 0x136, 0x135, 0x135, 0x134, 0x134, 0x133, 0x133, 0x133, 0x132, 0x132, 0x131, 0x131, 0x130, 0x130, 0x130, 0x12f, 0x12f, 0x12e, 0x12e, 0x12d, 0x12d, 0x12d, 0x12c, 0x12c, 0x12b, 0x12b, 0x12b, 0x12a, 0x12a, 0x129, 0x129, 0x129, 0x128, 0x128, 0x127, 0x127, 0x127, 0x126, 0x126, 0x126, 0x125, 0x125, 0x124, 0x124, 0x124, 0x123, 0x123, 0x123, 0x122, 0x122, 0x121, 0x121, 0x121, 0x120, 0x120, 0x120, 0x11f, 0x11f, 0x11f, 0x11e, 0x11e, 0x11e, 0x11d, 0x11d, 0x11d, 0x11c, 0x11c, 0x11c, 0x11b, 0x11b, 0x11a, 0x11a, 0x11a, 0x119, 0x119, 0x119, 0x118, 0x118, 0x118, 0x117, 0x117, 0x117, 0x117, 0x116, 0x116, 0x116, 0x115, 0x115, 0x115, 0x114, 0x114, 0x114, 0x113, 0x113, 0x113, 0x112, 0x112, 0x112, 0x111, 0x111, 0x111, 0x111, 0x110, 0x110, 0x110, 0x10f, 0x10f, 0x10f, 0x10e, 0x10e, 0x10e, 0x10e, 0x10d, 0x10d, 0x10d, 0x10c, 0x10c, 0x10c, 0x10c, 0x10b, 0x10b, 0x10b, 0x10a, 0x10a, 0x10a, 0x10a, 0x109, 0x109, 0x109, 0x108, 0x108, 0x108, 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6, 0xb6, 0xb6, 0xb6, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5, 0xb5}; +static const short lookup_table[1025] = {0x7fff, 0x16a0, 0x1000, 0xd10, 0xb50, 0xa1e, 0x93c, 0x88d, 0x800, 0x78a, 0x727, 0x6d2, 0x688, 0x646, 0x60c, 0x5d7, 0x5a8, 0x57c, 0x555, 0x530, 0x50f, 0x4f0, 0x4d2, 0x4b7, 0x49e, 0x486, 0x470, 0x45a, 0x446, 0x433, 0x421, 0x410, 0x400, 0x3f0, 0x3e1, 0x3d3, 0x3c5, 0x3b8, 0x3ab, 0x39f, 0x393, 0x388, 0x37d, 0x373, 0x369, 0x35f, 0x356, 0x34c, 0x344, 0x33b, 0x333, 0x32b, 0x323, 0x31b, 0x314, 0x30d, 0x306, 0x2ff, 0x2f8, 0x2f2, 0x2eb, 0x2e5, 0x2df, 0x2d9, 0x2d4, 0x2ce, 0x2c9, 0x2c3, 0x2be, 0x2b9, 0x2b4, 0x2af, 0x2aa, 0x2a5, 0x2a1, 0x29c, 0x298, 0x294, 0x28f, 0x28b, 0x287, 0x283, 0x27f, 0x27b, 0x278, 0x274, 0x270, 0x26d, 0x269, 0x266, 0x262, 0x25f, 0x25b, 0x258, 0x255, 0x252, 0x24f, 0x24c, 0x249, 0x246, 0x243, 0x240, 0x23d, 0x23a, 0x238, 0x235, 0x232, 0x22f, 0x22d, 0x22a, 0x228, 0x225, 0x223, 0x220, 0x21e, 0x21c, 0x219, 0x217, 0x215, 0x213, 0x210, 0x20e, 0x20c, 0x20a, 0x208, 0x206, 0x204, 0x202, 0x200, 0x1fe, 0x1fc, 0x1fa, 0x1f8, 0x1f6, 0x1f4, 0x1f2, 0x1f0, 0x1ee, 0x1ed, 0x1eb, 0x1e9, 0x1e7, 0x1e6, 0x1e4, 0x1e2, 0x1e1, 0x1df, 0x1dd, 0x1dc, 0x1da, 0x1d8, 0x1d7, 0x1d5, 0x1d4, 0x1d2, 0x1d1, 0x1cf, 0x1ce, 0x1cc, 0x1cb, 0x1c9, 0x1c8, 0x1c7, 0x1c5, 0x1c4, 0x1c2, 0x1c1, 0x1c0, 0x1be, 0x1bd, 0x1bc, 0x1ba, 0x1b9, 0x1b8, 0x1b7, 0x1b5, 0x1b4, 0x1b3, 0x1b2, 0x1b0, 0x1af, 0x1ae, 0x1ad, 0x1ac, 0x1ab, 0x1a9, 0x1a8, 0x1a7, 0x1a6, 0x1a5, 0x1a4, 0x1a3, 0x1a2, 0x1a0, 0x19f, 0x19e, 0x19d, 0x19c, 0x19b, 0x19a, 0x199, 0x198, 0x197, 0x196, 0x195, 0x194, 0x193, 0x192, 0x191, 0x190, 0x18f, 0x18e, 0x18d, 0x18c, 0x18b, 0x18b, 0x18a, 0x189, 0x188, 0x187, 0x186, 0x185, 0x184, 0x183, 0x183, 0x182, 0x181, 0x180, 0x17f, 0x17e, 0x17d, 0x17d, 0x17c, 0x17b, 0x17a, 0x179, 0x179, 0x178, 0x177, 0x176, 0x175, 0x175, 0x174, 0x173, 0x172, 0x172, 0x171, 0x170, 0x16f, 0x16f, 0x16e, 0x16d, 0x16c, 0x16c, 0x16b, 0x16a, 0x16a, 0x169, 0x168, 0x167, 0x167, 0x166, 0x165, 0x165, 0x164, 0x163, 0x163, 0x162, 0x161, 0x161, 0x160, 0x15f, 0x15f, 0x15e, 0x15d, 0x15d, 0x15c, 0x15c, 0x15b, 0x15a, 0x15a, 0x159, 0x158, 0x158, 0x157, 0x157, 0x156, 0x155, 0x155, 0x154, 0x154, 0x153, 0x152, 0x152, 0x151, 0x151, 0x150, 0x150, 0x14f, 0x14e, 0x14e, 0x14d, 0x14d, 0x14c, 0x14c, 0x14b, 0x14b, 0x14a, 0x14a, 0x149, 0x148, 0x148, 0x147, 0x147, 0x146, 0x146, 0x145, 0x145, 0x144, 0x144, 0x143, 0x143, 0x142, 0x142, 0x141, 0x141, 0x140, 0x140, 0x13f, 0x13f, 0x13e, 0x13e, 0x13d, 0x13d, 0x13c, 0x13c, 0x13c, 0x13b, 0x13b, 0x13a, 0x13a, 0x139, 0x139, 0x138, 0x138, 0x137, 0x137, 0x136, 0x136, 0x136, 0x135, 0x135, 0x134, 0x134, 0x133, 0x133, 0x133, 0x132, 0x132, 0x131, 0x131, 0x130, 0x130, 0x130, 0x12f, 0x12f, 0x12e, 0x12e, 0x12d, 0x12d, 0x12d, 0x12c, 0x12c, 0x12b, 0x12b, 0x12b, 0x12a, 0x12a, 0x129, 0x129, 0x129, 0x128, 0x128, 0x127, 0x127, 0x127, 0x126, 0x126, 0x126, 0x125, 0x125, 0x124, 0x124, 0x124, 0x123, 0x123, 0x123, 0x122, 0x122, 0x121, 0x121, 0x121, 0x120, 0x120, 0x120, 0x11f, 0x11f, 0x11f, 0x11e, 0x11e, 0x11e, 0x11d, 0x11d, 0x11d, 0x11c, 0x11c, 0x11c, 0x11b, 0x11b, 0x11a, 0x11a, 0x11a, 0x119, 0x119, 0x119, 0x118, 0x118, 0x118, 0x117, 0x117, 0x117, 0x117, 0x116, 0x116, 0x116, 0x115, 0x115, 0x115, 0x114, 0x114, 0x114, 0x113, 0x113, 0x113, 0x112, 0x112, 0x112, 0x111, 0x111, 0x111, 0x111, 0x110, 0x110, 0x110, 0x10f, 0x10f, 0x10f, 0x10e, 0x10e, 0x10e, 0x10e, 0x10d, 0x10d, 0x10d, 0x10c, 0x10c, 0x10c, 0x10c, 0x10b, 0x10b, 0x10b, 0x10a, 0x10a, 0x10a, 0x10a, 0x109, 0x109, 0x109, 0x108, 0x108, 0x108, 0x108, 0x107, 0x107, 0x107, 0x107, 0x106, 0x106, 0x106, 0x105, 0x105, 0x105, 0x105, 0x104, 0x104, 0x104, 0x104, 0x103, 0x103, 0x103, 0x103, 0x102, 0x102, 0x102, 0x102, 0x101, 0x101, 0x101, 0x101, 0x100, 0x100, 0x100, 0x100, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfe, 0xfd, 0xfd, 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/TOOLS/oai_dfts.c @@ -1513,7 +1513,6 @@ const static int16_t tw64c[96] __attribute__((aligned(32))) = { -12539,-30273,-20787,-25330,-27244,-18205,-31356,-9512 }; #define simd_q15_t simde__m128i -#define simdshort_q15_t simde__m64 #define shiftright_int16(a,shift) simde_mm_srai_epi16(a,shift) #define mulhi_int16(a,b) simde_mm_mulhrs_epi16 (a,b) #define simd256_q15_t simde__m256i @@ -1661,8 +1660,6 @@ void dft64(int16_t *x,int16_t *y,unsigned char scale) y256[7] = shiftright_int16_simd256(y256[7], 1); } - simde_mm_empty(); - simde_m_empty(); } void idft64(int16_t *x,int16_t *y,unsigned char scale) @@ -1760,8 +1757,6 @@ void idft64(int16_t *x,int16_t *y,unsigned char scale) y256[7] = shiftright_int16_simd256(y256[7],3); } - simde_mm_empty(); - simde_m_empty(); } static const int16_t tw128[128] __attribute__((aligned(32))) = { 32767,0,32727,-1608,32609,-3212,32412,-4808,32137,-6393,31785,-7962,31356,-9512,30851,-11039,30272,-12540,29621,-14010,28897,-15447,28105,-16846,27244,-18205,26318,-19520,25329,-20788,24278,-22005,23169,-23170,22004,-24279,20787,-25330,19519,-26319,18204,-27245,16845,-28106,15446,-28898,14009,-29622,12539,-30273,11038,-30852,9511,-31357,7961,-31786,6392,-32138,4807,-32413,3211,-32610,1607,-32728,0,-32767,-1608,-32728,-3212,-32610,-4808,-32413,-6393,-32138,-7962,-31786,-9512,-31357,-11039,-30852,-12540,-30273,-14010,-29622,-15447,-28898,-16846,-28106,-18205,-27245,-19520,-26319,-20788,-25330,-22005,-24279,-23170,-23170,-24279,-22005,-25330,-20788,-26319,-19520,-27245,-18205,-28106,-16846,-28898,-15447,-29622,-14010,-30273,-12540,-30852,-11039,-31357,-9512,-31786,-7962,-32138,-6393,-32413,-4808,-32610,-3212,-32728,-1608}; @@ -1998,8 +1993,6 @@ void dft256(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } void idft256(int16_t *x,int16_t *y,unsigned char scale) @@ -2082,8 +2075,6 @@ void idft256(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } static const int16_t tw512[512] __attribute__((aligned(32))) = { @@ -2307,8 +2298,6 @@ void dft1024(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } void idft1024(int16_t *x,int16_t *y,unsigned char scale) @@ -2362,8 +2351,6 @@ void idft1024(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } int16_t tw2048[2048] __attribute__((aligned(32))); @@ -2454,8 +2441,6 @@ void dft2048(int16_t *x,int16_t *y,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } void idft2048(int16_t *x,int16_t *y,unsigned char scale) @@ -2543,8 +2528,6 @@ void idft2048(int16_t *x,int16_t *y,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } int16_t tw4096[3*2*1024]; @@ -2600,8 +2583,6 @@ void dft4096(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } void idft4096(int16_t *x,int16_t *y,unsigned char scale) @@ -2655,8 +2636,6 @@ void idft4096(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } int16_t tw8192[2*4096] __attribute__((aligned(32))); @@ -2747,8 +2726,6 @@ void dft8192(int16_t *x,int16_t *y,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } void idft8192(int16_t *x,int16_t *y,unsigned char scale) @@ -2836,8 +2813,6 @@ void idft8192(int16_t *x,int16_t *y,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } int16_t tw16384[3*2*4096] __attribute__((aligned(32))); @@ -2893,8 +2868,6 @@ void dft16384(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } void idft16384(int16_t *x,int16_t *y,unsigned char scale) @@ -2948,8 +2921,6 @@ void idft16384(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } int16_t tw32768[2*16384] __attribute__((aligned(32))); @@ -3040,8 +3011,6 @@ void dft32768(int16_t *x,int16_t *y,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } void idft32768(int16_t *x,int16_t *y,unsigned char scale) @@ -3129,8 +3098,6 @@ void idft32768(int16_t *x,int16_t *y,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } int16_t twa768[512],twb768[512]; @@ -3183,8 +3150,6 @@ void idft768(int16_t *input, int16_t *output, unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } void dft768(int16_t *input, int16_t *output, unsigned char scale) @@ -3246,8 +3211,6 @@ void dft768(int16_t *input, int16_t *output, unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } int16_t twa1536[1024],twb1536[1024]; @@ -3299,8 +3262,6 @@ void idft1536(int16_t *input, int16_t *output, unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } void dft1536(int16_t *input, int16_t *output, unsigned char scale) @@ -3362,8 +3323,6 @@ void dft1536(int16_t *input, int16_t *output, unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } int16_t twa3072[2048] __attribute__((aligned(32))); @@ -3415,8 +3374,6 @@ void dft3072(int16_t *input, int16_t *output,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } void idft3072(int16_t *input, int16_t *output,unsigned char scale) @@ -3465,8 +3422,6 @@ void idft3072(int16_t *input, int16_t *output,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } @@ -3527,8 +3482,6 @@ void idft6144(int16_t *input, int16_t *output,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } @@ -3590,8 +3543,6 @@ void dft6144(int16_t *input, int16_t *output,unsigned char scale) y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); } int16_t twa12288[8192] __attribute__((aligned(32))); @@ -3654,8 +3605,6 @@ void dft12288(int16_t *input, int16_t *output,unsigned char scale) y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); } void idft12288(int16_t *input, int16_t *output,unsigned char scale) @@ -3712,8 +3661,6 @@ void idft12288(int16_t *input, int16_t *output,unsigned char scale) y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); #ifndef MR_MAIN if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("idft12288out.m","out",output,6144,1,1); @@ -3768,8 +3715,6 @@ void dft18432(int16_t *input, int16_t *output,unsigned char scale) { y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); } void idft18432(int16_t *input, int16_t *output,unsigned char scale) { @@ -3816,8 +3761,6 @@ void idft18432(int16_t *input, int16_t *output,unsigned char scale) { y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); } @@ -3882,8 +3825,6 @@ void dft24576(int16_t *input, int16_t *output,unsigned char scale) y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); #ifndef MR_MAIN if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("out.m","out",output,24576,1,1); @@ -3942,8 +3883,6 @@ void idft24576(int16_t *input, int16_t *output,unsigned char scale) y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); #ifndef MR_MAIN if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("idft24576out.m","out",output,24576,1,1); @@ -4006,8 +3945,6 @@ void dft36864(int16_t *input, int16_t *output,uint8_t scale) { y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); #ifndef MR_MAIN if (LOG_DUMPFLAG(DEBUG_DFT)) { LOG_M("out.m","out",output,36864,1,1); @@ -4059,8 +3996,6 @@ void idft36864(int16_t *input, int16_t *output,uint8_t scale) { y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); } int16_t twa49152[32768] __attribute__((aligned(32))); @@ -4111,8 +4046,6 @@ void dft49152(int16_t *input, int16_t *output,uint8_t scale) { y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); } void idft49152(int16_t *input, int16_t *output,uint8_t scale) { @@ -4159,8 +4092,6 @@ void idft49152(int16_t *input, int16_t *output,uint8_t scale) { y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); } int16_t tw65536[3*2*16384] __attribute__((aligned(32))); @@ -4216,8 +4147,6 @@ void idft65536(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } int16_t twa98304[65536] __attribute__((aligned(32))); @@ -4267,8 +4196,6 @@ void dft98304(int16_t *input, int16_t *output,uint8_t scale) { y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); } void idft98304(int16_t *input, int16_t *output,uint8_t scale) { @@ -4315,8 +4242,6 @@ void idft98304(int16_t *input, int16_t *output,uint8_t scale) { y128p+=16; } } - simde_mm_empty(); - simde_m_empty(); } @@ -4470,8 +4395,6 @@ void dft12(int16_t *x,int16_t *y ,unsigned char scale_flag) &y128[10], &y128[11]); - simde_mm_empty(); - simde_m_empty(); } static const int16_t W1_12s_256[16] __attribute__((aligned(32))) = @@ -4641,8 +4564,6 @@ void dft12_simd256(int16_t *x,int16_t *y) &y256[10], &y256[11]); - simde_mm_empty(); - simde_m_empty(); } static int16_t tw24[88]__attribute__((aligned(32))); @@ -4735,8 +4656,6 @@ void dft24(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa36[88]__attribute__((aligned(32))); @@ -4857,8 +4776,6 @@ void dft36(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa48[88]__attribute__((aligned(32))); @@ -5017,8 +4934,6 @@ void dft48(int16_t *x, int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa60[88]__attribute__((aligned(32))); @@ -5201,8 +5116,6 @@ void dft60(int16_t *x,int16_t *y,unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t tw72[280]__attribute__((aligned(32))); @@ -5244,8 +5157,6 @@ void dft72(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t tw96[376]__attribute__((aligned(32))); @@ -5289,8 +5200,6 @@ void dft96(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa108[280]__attribute__((aligned(32))); @@ -5339,8 +5248,6 @@ void dft108(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t tw120[472]__attribute__((aligned(32))); @@ -5380,8 +5287,6 @@ void dft120(int16_t *x,int16_t *y, unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa144[376]__attribute__((aligned(32))); @@ -5430,8 +5335,6 @@ void dft144(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa180[472]__attribute__((aligned(32))); @@ -5481,8 +5384,6 @@ void dft180(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa192[376]__attribute__((aligned(32))); @@ -5539,8 +5440,6 @@ void dft192(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa216[568]__attribute__((aligned(32))); @@ -5590,8 +5489,6 @@ void dft216(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa240[472]__attribute__((aligned(32))); @@ -5648,8 +5545,6 @@ void dft240(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa288[760]__attribute__((aligned(32))); @@ -5699,8 +5594,6 @@ void dft288(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa300[472]__attribute__((aligned(32))); @@ -5764,8 +5657,6 @@ void dft300(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa324[107*2*4]; @@ -5814,8 +5705,6 @@ void dft324(int16_t *x,int16_t *y,unsigned char scale_flag) // 108 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa360[119*2*4]; @@ -5864,8 +5753,6 @@ void dft360(int16_t *x,int16_t *y,unsigned char scale_flag) // 120 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa384[95*2*4]; @@ -5921,8 +5808,6 @@ void dft384(int16_t *x,int16_t *y,unsigned char scale_flag) // 96 x 4 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa432[107*2*4]; @@ -5977,8 +5862,6 @@ void dft432(int16_t *x,int16_t *y,unsigned char scale_flag) // 108 x 4 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa480[119*2*4]; static int16_t twb480[119*2*4]; @@ -6033,8 +5916,6 @@ void dft480(int16_t *x,int16_t *y,unsigned char scale_flag) // 120 x 4 } } - simde_mm_empty(); - simde_m_empty(); }; @@ -6084,8 +5965,6 @@ void dft540(int16_t *x,int16_t *y,unsigned char scale_flag) // 180 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa576[191*2*4]; @@ -6135,8 +6014,6 @@ void dft576(int16_t *x,int16_t *y,unsigned char scale_flag) // 192 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; @@ -6179,8 +6056,6 @@ void dft600(int16_t *x,int16_t *y,unsigned char scale_flag) // 300 x 2 } } - simde_mm_empty(); - simde_m_empty(); }; @@ -6230,8 +6105,6 @@ void dft648(int16_t *x,int16_t *y,unsigned char scale_flag) // 216 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; @@ -6289,8 +6162,6 @@ void dft720(int16_t *x,int16_t *y,unsigned char scale_flag) // 180 x 4 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa768p[191*2*4]; @@ -6346,8 +6217,6 @@ void dft768p(int16_t *x,int16_t *y,unsigned char scale_flag) { // 192x 4; } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa384i[256]; @@ -6400,8 +6269,6 @@ void idft384(int16_t *input, int16_t *output, unsigned char scale) } } - simde_mm_empty(); - simde_m_empty(); } @@ -6451,8 +6318,6 @@ void dft864(int16_t *x,int16_t *y,unsigned char scale_flag) // 288 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa900[299*2*4]; @@ -6501,8 +6366,6 @@ void dft900(int16_t *x,int16_t *y,unsigned char scale_flag) // 300 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; @@ -6560,8 +6423,6 @@ void dft960(int16_t *x,int16_t *y,unsigned char scale_flag) // 240 x 4 } } - simde_mm_empty(); - simde_m_empty(); }; @@ -6611,8 +6472,6 @@ void dft972(int16_t *x,int16_t *y,unsigned char scale_flag) // 324 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa1080[359*2*4]; @@ -6661,8 +6520,6 @@ void dft1080(int16_t *x,int16_t *y,unsigned char scale_flag) // 360 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa1152[287*2*4]; @@ -6719,8 +6576,6 @@ void dft1152(int16_t *x,int16_t *y,unsigned char scale_flag) // 288 x 4 } } - simde_mm_empty(); - simde_m_empty(); }; int16_t twa1200[4784]; @@ -6776,8 +6631,6 @@ void dft1200(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } @@ -6828,8 +6681,6 @@ void dft1296(int16_t *x,int16_t *y,unsigned char scale_flag) //432 * 3 } } - simde_mm_empty(); - simde_m_empty(); }; @@ -6879,8 +6730,6 @@ void dft1440(int16_t *x,int16_t *y,unsigned char scale_flag) // 480 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa1500[2392]__attribute__((aligned(32))); @@ -6944,8 +6793,6 @@ void dft1500(int16_t *x,int16_t *y,unsigned char scale_flag) } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa1620[539*2*4]; @@ -6994,8 +6841,6 @@ void dft1620(int16_t *x,int16_t *y,unsigned char scale_flag) // 540 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa1728[575*2*4]; @@ -7044,8 +6889,6 @@ void dft1728(int16_t *x,int16_t *y,unsigned char scale_flag) // 576 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa1800[599*2*4]; @@ -7094,8 +6937,6 @@ void dft1800(int16_t *x,int16_t *y,unsigned char scale_flag) // 600 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa1920[479*2*4]; @@ -7150,8 +6991,6 @@ void dft1920(int16_t *x,int16_t *y,unsigned char scale_flag) // 480 x 4 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa1944[647*2*4]; @@ -7200,8 +7039,6 @@ void dft1944(int16_t *x,int16_t *y,unsigned char scale_flag) // 648 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa2160[719*2*4]; @@ -7250,8 +7087,6 @@ void dft2160(int16_t *x,int16_t *y,unsigned char scale_flag) // 720 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa2304[767*2*4]; @@ -7300,8 +7135,6 @@ void dft2304(int16_t *x,int16_t *y,unsigned char scale_flag) // 768 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa2400[599*2*4]; @@ -7357,8 +7190,6 @@ void dft2400(int16_t *x,int16_t *y,unsigned char scale_flag) // 600 x 4 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa2592[863*2*4]; @@ -7407,8 +7238,6 @@ void dft2592(int16_t *x,int16_t *y,unsigned char scale_flag) // 864 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa2700[899*2*4]; @@ -7457,8 +7286,6 @@ void dft2700(int16_t *x,int16_t *y,unsigned char scale_flag) // 900 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa2880[959*2*4]; @@ -7507,8 +7334,6 @@ void dft2880(int16_t *x,int16_t *y,unsigned char scale_flag) // 960 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa2916[971*2*4]; @@ -7557,8 +7382,6 @@ void dft2916(int16_t *x,int16_t *y,unsigned char scale_flag) // 972 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; static int16_t twa3000[599*8]__attribute__((aligned(32))); @@ -7622,8 +7445,6 @@ void dft3000(int16_t *x,int16_t *y,unsigned char scale_flag) // 600 * 5 } } - simde_mm_empty(); - simde_m_empty(); } static int16_t twa3240[1079*2*4]; @@ -7672,8 +7493,6 @@ void dft3240(int16_t *x,int16_t *y,unsigned char scale_flag) // 1080 x 3 } } - simde_mm_empty(); - simde_m_empty(); }; void init_rad4(int N,int16_t *tw) { diff --git a/openair1/PHY/TOOLS/oai_dfts_neon.c b/openair1/PHY/TOOLS/oai_dfts_neon.c index f3a2e5cb46..ddf8a59bf5 100644 --- a/openair1/PHY/TOOLS/oai_dfts_neon.c +++ b/openair1/PHY/TOOLS/oai_dfts_neon.c @@ -909,9 +909,6 @@ const static int16_t tw64c[96] __attribute__((aligned(32))) = { #ifdef simd_q15_t #undef simd_q15_t #endif -#ifdef simdshort_q15_t -#undef simdshort_q15_t -#endif #ifdef shiftright_int16 #undef shiftright_int16 #endif @@ -3633,8 +3630,6 @@ void idft65536(int16_t *x,int16_t *y,unsigned char scale) } - simde_mm_empty(); - simde_m_empty(); } int16_t twa98304[65536] __attribute__((aligned(32))); diff --git a/openair1/PHY/TOOLS/signal_energy.c b/openair1/PHY/TOOLS/signal_energy.c index 012677e8bb..93544da758 100644 --- a/openair1/PHY/TOOLS/signal_energy.c +++ b/openair1/PHY/TOOLS/signal_energy.c @@ -65,52 +65,6 @@ int32_t signal_energy(int32_t *input,uint32_t length) return temp; } -int32_t signal_energy_amp_shift(int32_t *input,uint32_t length) -{ - - int32_t i; - int32_t temp,temp2; - register simde__m64 mm0,mm1,mm2,mm3; - simde__m64 *in = (simde__m64 *)input; - - mm0 = simde_mm_setzero_si64(); - mm3 = simde_mm_setzero_si64(); - - for (i=0; i>1; i++) { - - mm1 = in[i]; - mm2 = mm1; - mm1 = simde_m_pmaddwd(mm1,mm1); - mm1 = simde_m_psradi(mm1,AMP_SHIFT);// shift any 32 bits blocs of the word by the value shift_p9 - mm0 = simde_m_paddd(mm0,mm1);// add the two 64 bits words 4 bytes by 4 bytes - mm3 = simde_m_paddw(mm3,mm2);// add the two 64 bits words 2 bytes by 2 bytes - } - - mm1 = mm0; - mm0 = simde_m_psrlqi(mm0,32); - mm0 = simde_m_paddd(mm0,mm1); - temp = simde_m_to_int(mm0); - temp/=length; // this is the average of x^2 - - - // now remove the DC component - - - mm2 = simde_m_psrlqi(mm3,32); - mm2 = simde_m_paddw(mm2,mm3); - mm2 = simde_m_pmaddwd(mm2,mm2); - mm2 = simde_m_psradi(mm2,AMP_SHIFT); // fixed point representation of elements - temp2 = simde_m_to_int(mm2); - temp2/=(length*length); - - temp -= temp2; - - simde_mm_empty(); - simde_m_empty(); - - return((temp>0)?temp:1); -} - uint32_t signal_energy_nodc(const c16_t *input, uint32_t length) { // init diff --git a/openair1/PHY/TOOLS/simde_operations.c b/openair1/PHY/TOOLS/simde_operations.c index 03a611e08d..f0dd306033 100644 --- a/openair1/PHY/TOOLS/simde_operations.c +++ b/openair1/PHY/TOOLS/simde_operations.c @@ -57,4 +57,4 @@ void simde_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *ou *out_re = simde_mm256_permute4x64_epi64(tmp0, 0xd8); *out_im = simde_mm256_permute4x64_epi64(tmp1, 0xd8); -} \ No newline at end of file +} diff --git a/openair1/PHY/TOOLS/tools_defs.h b/openair1/PHY/TOOLS/tools_defs.h index 41af6ba0a9..d7e738a9f4 100644 --- a/openair1/PHY/TOOLS/tools_defs.h +++ b/openair1/PHY/TOOLS/tools_defs.h @@ -41,7 +41,6 @@ #include "common/utils/LOG/log.h" #define simd_q15_t simde__m128i -#define simdshort_q15_t simde__m64 #define shiftright_int16(a,shift) simde_mm_srai_epi16(a,shift) #define set1_int16(a) simde_mm_set1_epi16(a) #define mulhi_int16(a,b) simde_mm_mulhrs_epi16 (a,b) @@ -727,8 +726,6 @@ int32_t sub_cpx_vector16(int16_t *x, */ int32_t signal_energy(int32_t *,uint32_t); -int32_t signal_energy_amp_shift(int32_t *input, uint32_t length); - #ifdef LOCALIZATION /*!\fn int32_t signal_energy(int *,uint32_t); \brief Computes the signal energy per subcarrier diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index b64cb20752..dd035a73e3 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -34,8 +34,10 @@ #ifdef __cplusplus #include +#ifndef _Atomic #define _Atomic(X) std::atomic< X > #endif +#endif #include "defs_nr_common.h" #include "CODING/nrPolar_tools/nr_polar_pbch_defs.h" diff --git a/openair1/PHY/nr_phy_common/src/nr_phy_common.c b/openair1/PHY/nr_phy_common/src/nr_phy_common.c index 11a40fd69e..c543f5a630 100644 --- a/openair1/PHY/nr_phy_common/src/nr_phy_common.c +++ b/openair1/PHY/nr_phy_common/src/nr_phy_common.c @@ -109,7 +109,6 @@ void nr_16qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag_in, int16_t *llr, uint3 ch_mag_128++; } - simde_mm_empty(); nb_re &= 0x3; int16_t *rxDataF_i16 = (int16_t *)rxF_128; @@ -195,9 +194,6 @@ void nr_64qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag, int32_t *ch_mag2, int1 simde__m128i *rxF_128 = (simde__m128i *)rxF; simde__m128i *ch_mag_128 = (simde__m128i *)ch_maga; simde__m128i *ch_magb_128 = (simde__m128i *)ch_magb; - - simde__m64 *llr64 = (simde__m64 *)llr_32; - // Each iteration does 4 RE (gives 24 16bit-llrs) for (int i = 0; i < (nb_re >> 2); i++) { simde__m128i xmm0, xmm1, xmm2; @@ -207,12 +203,18 @@ void nr_64qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag, int32_t *ch_mag2, int1 xmm2 = simde_mm_abs_epi16(xmm1); xmm2 = simde_mm_subs_epi16(*ch_magb_128, xmm2); - *llr64++ = simde_mm_set_pi32(simde_mm_extract_epi32(xmm1, 0), simde_mm_extract_epi32(xmm0, 0)); - *llr64++ = simde_mm_set_pi32(simde_mm_extract_epi32(xmm0, 1), simde_mm_extract_epi32(xmm2, 0)); - *llr64++ = simde_mm_set_pi32(simde_mm_extract_epi32(xmm2, 1), simde_mm_extract_epi32(xmm1, 1)); - *llr64++ = simde_mm_set_pi32(simde_mm_extract_epi32(xmm1, 2), simde_mm_extract_epi32(xmm0, 2)); - *llr64++ = simde_mm_set_pi32(simde_mm_extract_epi32(xmm0, 3), simde_mm_extract_epi32(xmm2, 2)); - *llr64++ = simde_mm_set_pi32(simde_mm_extract_epi32(xmm2, 3), simde_mm_extract_epi32(xmm1, 3)); + *llr_32++ = simde_mm_extract_epi32(xmm0, 0); + *llr_32++ = simde_mm_extract_epi32(xmm1, 0); + *llr_32++ = simde_mm_extract_epi32(xmm2, 0); + *llr_32++ = simde_mm_extract_epi32(xmm0, 1); + *llr_32++ = simde_mm_extract_epi32(xmm1, 1); + *llr_32++ = simde_mm_extract_epi32(xmm2, 1); + *llr_32++ = simde_mm_extract_epi32(xmm0, 2); + *llr_32++ = simde_mm_extract_epi32(xmm1, 2); + *llr_32++ = simde_mm_extract_epi32(xmm2, 2); + *llr_32++ = simde_mm_extract_epi32(xmm0, 3); + *llr_32++ = simde_mm_extract_epi32(xmm1, 3); + *llr_32++ = simde_mm_extract_epi32(xmm2, 3); rxF_128++; ch_mag_128++; ch_magb_128++; @@ -223,7 +225,7 @@ void nr_64qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag, int32_t *ch_mag2, int1 int16_t *rxDataF_i16 = (int16_t *)rxF_128; int16_t *ch_mag_i16 = (int16_t *)ch_mag_128; int16_t *ch_magb_i16 = (int16_t *)ch_magb_128; - int16_t *llr_i16 = (int16_t *)llr64; + int16_t *llr_i16 = (int16_t *)llr_32; for (int i = 0; i < nb_re; i++) { int16_t real = rxDataF_i16[2 * i]; int16_t imag = rxDataF_i16[2 * i + 1]; @@ -238,7 +240,6 @@ void nr_64qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag, int32_t *ch_mag2, int1 llr_i16[6 * i + 4] = saturating_sub(mag_realb, abs(llr_i16[6 * i + 2])); llr_i16[6 * i + 5] = saturating_sub(mag_imagb, abs(llr_i16[6 * i + 3])); } - simde_mm_empty(); } void nr_256qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag, int32_t *ch_mag2, int32_t *ch_mag3, int16_t *llr, uint32_t nb_re) @@ -350,7 +351,6 @@ void nr_256qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag, int32_t *ch_mag2, int llr_i16[8 * i + 7] = saturating_sub(magc_imag, abs(llr_i16[8 * i + 5])); } } - simde_mm_empty(); } void freq2time(uint16_t ofdm_symbol_size, int16_t *freq_signal, int16_t *time_signal) diff --git a/openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c b/openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c index 4fbe241223..049d794832 100644 --- a/openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c @@ -139,4 +139,4 @@ int sl_nr_ue_slot_select(const sl_nr_phy_config_request_t *cfg, int slot, uint8_ } return slot_type; -} \ No newline at end of file +}