mod: remove simde_ prefix and use oai_ prefix instead
This commit is contained in:
committed by
Laurent THOMAS
parent
59d7e74157
commit
04e35af5a5
@@ -858,7 +858,7 @@ void qpsk_qpsk(short *stream0_in,
|
||||
// put (rho_r + rho_i)/2sqrt2 in rho_rpi
|
||||
// put (rho_r - rho_i)/2sqrt2 in rho_rmi
|
||||
simde__m128i xmm2, xmm3;
|
||||
simde_mm_separate_real_imag_parts( &xmm2, &xmm3, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts( &xmm2, &xmm3, xmm0, xmm1);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -874,7 +874,7 @@ void qpsk_qpsk(short *stream0_in,
|
||||
|
||||
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts( &y0r, &y0i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts( &y0r, &y0i, xmm0, xmm1);
|
||||
|
||||
simde__m128i y0r_over2 = simde_mm_srai_epi16(y0r, 1); // divide by 2
|
||||
simde__m128i y0i_over2 = simde_mm_srai_epi16(y0i, 1); // divide by 2
|
||||
@@ -883,7 +883,7 @@ void qpsk_qpsk(short *stream0_in,
|
||||
xmm1 = stream1_128i_in[i+1];
|
||||
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts( &y1r, &y1i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts( &y1r, &y1i, xmm0, xmm1);
|
||||
|
||||
simde__m128i y1r_over2 = simde_mm_srai_epi16(y1r, 1); // divide by 2
|
||||
simde__m128i y1i_over2 = simde_mm_srai_epi16(y1i, 1); // divide by 2
|
||||
@@ -1061,7 +1061,7 @@ void qpsk_qam16(int16_t *stream0_in,
|
||||
simde__m128i xmm1 = rho01_128i[i + 1];
|
||||
|
||||
simde__m128i xmm2, xmm3;
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -1079,7 +1079,7 @@ void qpsk_qam16(int16_t *stream0_in,
|
||||
xmm1 = stream0_128i_in[i+1];
|
||||
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts( &y0r, &y0i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts( &y0r, &y0i, xmm0, xmm1);
|
||||
|
||||
// divide by sqrt(2)
|
||||
simde__m128i y0r_over2 = simde_mm_mulhi_epi16(y0r, ONE_OVER_SQRT_2);
|
||||
@@ -1095,7 +1095,7 @@ void qpsk_qam16(int16_t *stream0_in,
|
||||
xmm1 = stream1_128i_in[i+1];
|
||||
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
|
||||
xmm0 = simde_mm_setzero_si128(); // ZERO
|
||||
|
||||
@@ -1120,7 +1120,7 @@ void qpsk_qam16(int16_t *stream0_in,
|
||||
// Rearrange interfering channel magnitudes
|
||||
xmm2 = ch_mag_128i_i[i];
|
||||
xmm3 = ch_mag_128i_i[i+1];
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
|
||||
simde__m128i tmp_result, tmp_result2;
|
||||
// calculate optimal interference amplitudes
|
||||
@@ -1286,7 +1286,7 @@ void qpsk_qam64(short *stream0_in,
|
||||
// put (rho_r + rho_i)/sqrt2 in rho_rpi
|
||||
// put (rho_r - rho_i)/sqrt2 in rho_rmi
|
||||
simde__m128i xmm2, xmm3;
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -1304,7 +1304,7 @@ void qpsk_qam64(short *stream0_in,
|
||||
xmm1 = stream0_128i_in[i+1];
|
||||
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
|
||||
// divide by sqrt(2)
|
||||
simde__m128i y0r_over2 = simde_mm_mulhi_epi16(y0r, ONE_OVER_SQRT_2);
|
||||
@@ -1320,7 +1320,7 @@ void qpsk_qam64(short *stream0_in,
|
||||
xmm1 = stream1_128i_in[i+1];
|
||||
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
|
||||
xmm0 = simde_mm_setzero_si128(); // ZERO
|
||||
|
||||
@@ -1345,7 +1345,7 @@ void qpsk_qam64(short *stream0_in,
|
||||
// Rearrange interfering channel magnitudes
|
||||
xmm2 = ch_mag_128i_i[i];
|
||||
xmm3 = ch_mag_128i_i[i+1];
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
|
||||
ch_mag_int_with_sigma2 = simde_mm_srai_epi16(ch_mag_int, 1); // *2
|
||||
two_ch_mag_int_with_sigma2 = ch_mag_int; // *4
|
||||
@@ -1481,7 +1481,7 @@ void qam16_qpsk(short *stream0_in,
|
||||
simde__m128i xmm0 = rho01_128i[i];
|
||||
simde__m128i xmm1 = rho01_128i[i + 1];
|
||||
simde__m128i xmm2, xmm3;
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -1512,7 +1512,7 @@ void qam16_qpsk(short *stream0_in,
|
||||
xmm0 = stream1_128i_in[i];
|
||||
xmm1 = stream1_128i_in[i+1];
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
|
||||
xmm0 = simde_mm_setzero_si128(); // ZERO
|
||||
xmm2 = simde_mm_subs_epi16(rho_rpi_1_1, y1r); // = [Re(rho)+ Im(rho)]/sqrt(10) - y1r
|
||||
@@ -1585,12 +1585,12 @@ void qam16_qpsk(short *stream0_in,
|
||||
xmm0 = stream0_128i_in[i];
|
||||
xmm1 = stream0_128i_in[i+1];
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
xmm2 = ch_mag_128i[i]; // = [|h|^2(1),|h|^2(1),|h|^2(2),|h|^2(2)]*(2/sqrt(10))
|
||||
xmm3 = ch_mag_128i[i+1]; // = [|h|^2(3),|h|^2(3),|h|^2(4),|h|^2(4)]*(2/sqrt(10))
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
|
||||
// Scale MF output of desired signal
|
||||
y0r_over_sqrt10 = simde_mm_mulhi_epi16(y0r,ONE_OVER_SQRT_10);
|
||||
@@ -1944,7 +1944,7 @@ void qam16_qam16(short *stream0_in,
|
||||
simde__m128i xmm0 = rho01_128i[i];
|
||||
simde__m128i xmm1 = rho01_128i[i + 1];
|
||||
simde__m128i xmm2, xmm3;
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -1975,7 +1975,7 @@ void qam16_qam16(short *stream0_in,
|
||||
xmm0 = stream1_128i_in[i];
|
||||
xmm1 = stream1_128i_in[i+1];
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
|
||||
xmm0 = simde_mm_setzero_si128(); // ZERO
|
||||
xmm2 = simde_mm_subs_epi16(rho_rpi_1_1, y1r); // = [Re(rho)+ Im(rho)]/sqrt(10) - y1r
|
||||
@@ -2048,17 +2048,17 @@ void qam16_qam16(short *stream0_in,
|
||||
xmm0 = stream0_128i_in[i];
|
||||
xmm1 = stream0_128i_in[i+1];
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
xmm2 = ch_mag_128i[i]; // = [|h|^2(1),|h|^2(1),|h|^2(2),|h|^2(2)]*(2/sqrt(10))
|
||||
xmm3 = ch_mag_128i[i+1]; // = [|h|^2(3),|h|^2(3),|h|^2(4),|h|^2(4)]*(2/sqrt(10))
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
|
||||
// Rearrange interfering channel magnitudes
|
||||
xmm2 = ch_mag_128i_i[i];
|
||||
xmm3 = ch_mag_128i_i[i+1];
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
|
||||
// Scale MF output of desired signal
|
||||
y0r_over_sqrt10 = simde_mm_mulhi_epi16(y0r,ONE_OVER_SQRT_10);
|
||||
@@ -2456,7 +2456,7 @@ void qam16_qam64(int16_t *stream0_in,
|
||||
simde__m128i xmm0 = rho01_128i[i];
|
||||
simde__m128i xmm1 = rho01_128i[i + 1];
|
||||
simde__m128i xmm2, xmm3;
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -2487,7 +2487,7 @@ void qam16_qam64(int16_t *stream0_in,
|
||||
xmm0 = stream1_128i_in[i];
|
||||
xmm1 = stream1_128i_in[i+1];
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
|
||||
xmm0 = simde_mm_setzero_si128(); // ZERO
|
||||
xmm2 = simde_mm_subs_epi16(rho_rpi_1_1, y1r); // = [Re(rho)+ Im(rho)]/sqrt(10) - y1r
|
||||
@@ -2560,17 +2560,17 @@ void qam16_qam64(int16_t *stream0_in,
|
||||
xmm0 = stream0_128i_in[i];
|
||||
xmm1 = stream0_128i_in[i+1];
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
xmm2 = ch_mag_128i[i]; // = [|h|^2(1),|h|^2(1),|h|^2(2),|h|^2(2)]*(2/sqrt(10))
|
||||
xmm3 = ch_mag_128i[i+1]; // = [|h|^2(3),|h|^2(3),|h|^2(4),|h|^2(4)]*(2/sqrt(10))
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
|
||||
// Rearrange interfering channel magnitudes
|
||||
xmm2 = ch_mag_128i_i[i];
|
||||
xmm3 = ch_mag_128i_i[i+1];
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
|
||||
// Scale MF output of desired signal
|
||||
y0r_over_sqrt10 = simde_mm_mulhi_epi16(y0r,ONE_OVER_SQRT_10);
|
||||
@@ -3051,7 +3051,7 @@ void qam64_qpsk(int16_t *stream0_in,
|
||||
simde__m128i xmm0 = rho01_128i[i];
|
||||
simde__m128i xmm1 = rho01_128i[i + 1];
|
||||
simde__m128i xmm2, xmm3;
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -3116,7 +3116,7 @@ void qam64_qpsk(int16_t *stream0_in,
|
||||
xmm0 = stream1_128i_in[i];
|
||||
xmm1 = stream1_128i_in[i+1];
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
|
||||
// Psi_r calculation from rho_rpi or rho_rmi
|
||||
xmm0 = simde_mm_setzero_si128(); // ZERO for abs_pi16
|
||||
@@ -3385,12 +3385,12 @@ void qam64_qpsk(int16_t *stream0_in,
|
||||
xmm0 = stream0_128i_in[i];
|
||||
xmm1 = stream0_128i_in[i+1];
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
xmm2 = ch_mag_128i[i]; // = [|h|^2(1),|h|^2(1),|h|^2(2),|h|^2(2)]*(2/sqrt(10))
|
||||
xmm3 = ch_mag_128i[i+1]; // = [|h|^2(3),|h|^2(3),|h|^2(4),|h|^2(4)]*(2/sqrt(10))
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
|
||||
y0r_one_over_sqrt_21 = simde_mm_mulhi_epi16(y0r, ONE_OVER_SQRT_42);
|
||||
y0r_three_over_sqrt_21 = simde_mm_mulhi_epi16(y0r, THREE_OVER_SQRT_42);
|
||||
@@ -4533,7 +4533,7 @@ void qam64_qam16(short *stream0_in,
|
||||
simde__m128i xmm0 = rho01_128i[i];
|
||||
simde__m128i xmm1 = rho01_128i[i + 1];
|
||||
simde__m128i xmm2, xmm3;
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -4598,7 +4598,7 @@ void qam64_qam16(short *stream0_in,
|
||||
xmm0 = stream1_128i_in[i];
|
||||
xmm1 = stream1_128i_in[i+1];
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
|
||||
// Psi_r calculation from rho_rpi or rho_rmi
|
||||
xmm0 = simde_mm_setzero_si128(); // ZERO for abs_pi16
|
||||
@@ -4867,17 +4867,17 @@ void qam64_qam16(short *stream0_in,
|
||||
xmm0 = stream0_128i_in[i];
|
||||
xmm1 = stream0_128i_in[i+1];
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
xmm2 = ch_mag_128i[i]; // = [|h|^2(1),|h|^2(1),|h|^2(2),|h|^2(2)]*(2/sqrt(10))
|
||||
xmm3 = ch_mag_128i[i+1]; // = [|h|^2(3),|h|^2(3),|h|^2(4),|h|^2(4)]*(2/sqrt(10))
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
|
||||
// Rearrange interfering channel magnitudes
|
||||
xmm2 = ch_mag_128i_i[i];
|
||||
xmm3 = ch_mag_128i_i[i+1];
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
|
||||
y0r_one_over_sqrt_21 = simde_mm_mulhi_epi16(y0r, ONE_OVER_SQRT_42);
|
||||
y0r_three_over_sqrt_21 = simde_mm_mulhi_epi16(y0r, THREE_OVER_SQRT_42);
|
||||
@@ -6026,7 +6026,7 @@ void qam64_qam64(short *stream0_in,
|
||||
simde__m128i xmm0 = rho01_128i[i];
|
||||
simde__m128i xmm1 = rho01_128i[i + 1];
|
||||
simde__m128i xmm2, xmm3;
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, xmm0, xmm1);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -6091,7 +6091,7 @@ void qam64_qam64(short *stream0_in,
|
||||
xmm0 = stream1_128i_in[i];
|
||||
xmm1 = stream1_128i_in[i+1];
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, xmm0, xmm1);
|
||||
|
||||
// Psi_r calculation from rho_rpi or rho_rmi
|
||||
xmm0 = simde_mm_setzero_si128(); // ZERO for abs_pi16
|
||||
@@ -6360,17 +6360,17 @@ void qam64_qam64(short *stream0_in,
|
||||
xmm0 = stream0_128i_in[i];
|
||||
xmm1 = stream0_128i_in[i+1];
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, xmm0, xmm1);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
xmm2 = ch_mag_128i[i]; // = [|h|^2(1),|h|^2(1),|h|^2(2),|h|^2(2)]*(2/sqrt(10))
|
||||
xmm3 = ch_mag_128i[i+1]; // = [|h|^2(3),|h|^2(3),|h|^2(4),|h|^2(4)]*(2/sqrt(10))
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_des, NULL, xmm2, xmm3);
|
||||
|
||||
// Rearrange interfering channel magnitudes
|
||||
xmm2 = ch_mag_128i_i[i];
|
||||
xmm3 = ch_mag_128i_i[i+1];
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_int, NULL, xmm2, xmm3);
|
||||
|
||||
y0r_one_over_sqrt_21 = simde_mm_mulhi_epi16(y0r, ONE_OVER_SQRT_42);
|
||||
y0r_three_over_sqrt_21 = simde_mm_mulhi_epi16(y0r, THREE_OVER_SQRT_42);
|
||||
|
||||
@@ -200,7 +200,7 @@ void qam64_qam16_avx2(short *stream0_in,
|
||||
|
||||
// Get rho
|
||||
simde__m256i xmm0, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8;
|
||||
simde_mm256_separate_real_imag_parts(&xmm2, &xmm3, rho01_256i[i], rho01_256i[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&xmm2, &xmm3, rho01_256i[i], rho01_256i[i+1]);
|
||||
|
||||
const simde__m256i rho_rpi = simde_mm256_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
const simde__m256i rho_rmi = simde_mm256_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -263,7 +263,7 @@ void qam64_qam16_avx2(short *stream0_in,
|
||||
|
||||
// Rearrange interfering MF output
|
||||
simde__m256i y1r, y1i;
|
||||
simde_mm256_separate_real_imag_parts(&y1r, &y1i, stream1_256i_in[i], stream1_256i_in[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&y1r, &y1i, stream1_256i_in[i], stream1_256i_in[i+1]);
|
||||
|
||||
// Psi_r calculation from rho_rpi or rho_rmi
|
||||
xmm0 = simde_mm256_broadcastw_epi16(simde_mm_set1_epi16(0));// ZERO for abs_pi16
|
||||
@@ -529,9 +529,9 @@ void qam64_qam16_avx2(short *stream0_in,
|
||||
simde__m256i psi_i_m7_m7 = simde_mm256_abs_epi16(xmm2);
|
||||
|
||||
simde__m256i y0r, y0i;
|
||||
simde_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i+1]);
|
||||
simde_mm256_separate_real_imag_parts(&ch_mag_des, NULL, ch_mag_256i[i], ch_mag_256i[i+1]);
|
||||
simde_mm256_separate_real_imag_parts(&ch_mag_int, NULL, ch_mag_256i_i[i], ch_mag_256i_i[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&ch_mag_des, NULL, ch_mag_256i[i], ch_mag_256i[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&ch_mag_int, NULL, ch_mag_256i_i[i], ch_mag_256i_i[i+1]);
|
||||
|
||||
y0r_one_over_sqrt_21 = simde_mm256_mulhi_epi16(y0r, ONE_OVER_SQRT_42);
|
||||
y0r_three_over_sqrt_21 = simde_mm256_mulhi_epi16(y0r, THREE_OVER_SQRT_42);
|
||||
@@ -1682,7 +1682,7 @@ void qam64_qam64_avx2(int32_t *stream0_in,
|
||||
|
||||
// Get rho
|
||||
simde__m256i xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8;
|
||||
simde_mm256_separate_real_imag_parts(&xmm2, &xmm3, rho01_256i[i], rho01_256i[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&xmm2, &xmm3, rho01_256i[i], rho01_256i[i+1]);
|
||||
|
||||
simde__m256i rho_rpi = simde_mm256_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m256i rho_rmi = simde_mm256_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -1745,7 +1745,7 @@ void qam64_qam64_avx2(int32_t *stream0_in,
|
||||
|
||||
// Rearrange interfering MF output
|
||||
simde__m256i y1r, y1i, xmm0;
|
||||
simde_mm256_separate_real_imag_parts(&y1r, &y1i, stream1_256i_in[i], stream1_256i_in[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&y1r, &y1i, stream1_256i_in[i], stream1_256i_in[i+1]);
|
||||
|
||||
// Psi_r calculation from rho_rpi or rho_rmi
|
||||
xmm0 = simde_mm256_broadcastw_epi16(simde_mm_set1_epi16(0));// ZERO for abs_pi16
|
||||
@@ -2013,14 +2013,14 @@ void qam64_qam64_avx2(int32_t *stream0_in,
|
||||
|
||||
// Rearrange desired MF output
|
||||
simde__m256i y0r, y0i;
|
||||
simde_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i+1]);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
// [|h|^2(1),|h|^2(1),|h|^2(2),|h|^2(2),...,,|h|^2(7),|h|^2(7)]*(2/sqrt(10))
|
||||
simde_mm256_separate_real_imag_parts(&ch_mag_des, NULL, ch_mag_256i[i], ch_mag_256i[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&ch_mag_des, NULL, ch_mag_256i[i], ch_mag_256i[i+1]);
|
||||
|
||||
// Rearrange interfering channel magnitudes
|
||||
simde_mm256_separate_real_imag_parts(&ch_mag_int, NULL, ch_mag_256i_i[i], ch_mag_256i_i[i+1]);
|
||||
oai_mm256_separate_real_imag_parts(&ch_mag_int, NULL, ch_mag_256i_i[i], ch_mag_256i_i[i+1]);
|
||||
|
||||
y0r_one_over_sqrt_21 = simde_mm256_mulhi_epi16(y0r, ONE_OVER_SQRT_42);
|
||||
y0r_three_over_sqrt_21 = simde_mm256_mulhi_epi16(y0r, THREE_OVER_SQRT_42);
|
||||
|
||||
@@ -93,7 +93,7 @@ void nr_ulsch_qpsk_qpsk(c16_t *stream0_in, c16_t *stream1_in, int16_t *stream0_o
|
||||
|
||||
/// Compute real and imaginary parts of MF output for stream 0 (desired stream)
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, stream0_128i_in[i], stream0_128i_in[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, stream0_128i_in[i], stream0_128i_in[i + 1]);
|
||||
simde__m128i y0r_over2 = simde_mm_mulhi_epi16(y0r, ONE_OVER_2_SQRT_2);
|
||||
y0r_over2 = simde_mm_slli_epi16(y0r_over2, 1); // y0r_over2 = Re(y0) / sqrt(2)
|
||||
simde__m128i y0i_over2 = simde_mm_mulhi_epi16(y0i, ONE_OVER_2_SQRT_2);
|
||||
@@ -101,13 +101,13 @@ void nr_ulsch_qpsk_qpsk(c16_t *stream0_in, c16_t *stream1_in, int16_t *stream0_o
|
||||
|
||||
/// Compute real and imaginary parts of MF output for stream 1 (interference stream)
|
||||
simde__m128i y1r_over2, y1i_over2;
|
||||
simde_mm_separate_real_imag_parts(&y1r_over2, &y1i_over2, stream1_128i_in[i], stream1_128i_in[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&y1r_over2, &y1i_over2, stream1_128i_in[i], stream1_128i_in[i + 1]);
|
||||
y1r_over2 = simde_mm_srai_epi16(y1r_over2, 1); // y1r_over2 = Re(y1) / 2
|
||||
y1i_over2 = simde_mm_srai_epi16(y1i_over2, 1); // y1i_over2 = Im(y1) / 2
|
||||
|
||||
/// Get real and imaginary parts of rho
|
||||
simde__m128i rhor, rhoi;
|
||||
simde_mm_separate_real_imag_parts(&rhor, &rhoi, rho01_128i[i], rho01_128i[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&rhor, &rhoi, rho01_128i[i], rho01_128i[i + 1]);
|
||||
|
||||
/// Compute |psi_r| and |psi_i|
|
||||
|
||||
@@ -243,7 +243,7 @@ void nr_ulsch_qpsk_qpsk(c16_t *stream0_in, c16_t *stream1_in, int16_t *stream0_o
|
||||
|
||||
/// Compute real and imaginary parts of MF output for stream 0 (desired stream)
|
||||
simde__m256i y0r, y0i;
|
||||
simde_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i + 1]);
|
||||
simde__m256i y0r_over2 = simde_mm256_mulhi_epi16(y0r, ONE_OVER_2_SQRT_2);
|
||||
y0r_over2 = simde_mm256_slli_epi16(y0r_over2, 1); // y0r_over2 = Re(y0) / sqrt(2)
|
||||
simde__m256i y0i_over2 = simde_mm256_mulhi_epi16(y0i, ONE_OVER_2_SQRT_2);
|
||||
@@ -251,13 +251,13 @@ void nr_ulsch_qpsk_qpsk(c16_t *stream0_in, c16_t *stream1_in, int16_t *stream0_o
|
||||
|
||||
/// Compute real and imaginary parts of MF output for stream 1 (interference stream)
|
||||
simde__m256i y1r_over2, y1i_over2;
|
||||
simde_mm256_separate_real_imag_parts(&y1r_over2, &y1i_over2, stream1_256i_in[i], stream1_256i_in[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&y1r_over2, &y1i_over2, stream1_256i_in[i], stream1_256i_in[i + 1]);
|
||||
y1r_over2 = simde_mm256_srai_epi16(y1r_over2, 1); // y1r_over2 = Re(y1) / 2
|
||||
y1i_over2 = simde_mm256_srai_epi16(y1i_over2, 1); // y1i_over2 = Im(y1) / 2
|
||||
|
||||
/// Get real and imaginary parts of rho
|
||||
simde__m256i rhor, rhoi;
|
||||
simde_mm256_separate_real_imag_parts(&rhor, &rhoi, rho01_256i[i], rho01_256i[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&rhor, &rhoi, rho01_256i[i], rho01_256i[i + 1]);
|
||||
|
||||
/// Compute |psi_r| and |psi_i|
|
||||
|
||||
@@ -666,7 +666,7 @@ void nr_ulsch_qam16_qam16(c16_t *stream0_in,
|
||||
for (int i = 0; i < length >> 2; i += 2) {
|
||||
|
||||
// Get rho
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, rho01_128i[i], rho01_128i[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, rho01_128i[i], rho01_128i[i + 1]);
|
||||
rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
|
||||
@@ -691,7 +691,7 @@ void nr_ulsch_qam16_qam16(c16_t *stream0_in,
|
||||
rho_rs[6] = simde_mm_subs_epi16(xmm6, xmm7);
|
||||
|
||||
// Rearrange interfering MF output
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, stream1_128i_in[i], stream1_128i_in[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, stream1_128i_in[i], stream1_128i_in[i + 1]);
|
||||
|
||||
// | [Re(rho)+ Im(rho)]/sqrt(10) - y1r |
|
||||
for(int j=0; j<8; j++){ // psi_rs[0~7], rho_rs[0~7]
|
||||
@@ -709,14 +709,14 @@ void nr_ulsch_qam16_qam16(c16_t *stream0_in,
|
||||
}
|
||||
|
||||
// Rearrange desired MF output
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, stream0_128i_in[i], stream0_128i_in[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, stream0_128i_in[i], stream0_128i_in[i + 1]);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
// [|h|^2(1),|h|^2(2),|h|^2(3),|h|^2(4)]*(2/sqrt(10))
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_des, &xmm2, ch_mag_128i[i], ch_mag_128i[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_des, &xmm2, ch_mag_128i[i], ch_mag_128i[i + 1]);
|
||||
|
||||
// Rearrange interfering channel magnitudes
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_int, &xmm2, ch_mag_128i_i[i], ch_mag_128i_i[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_int, &xmm2, ch_mag_128i_i[i], ch_mag_128i_i[i + 1]);
|
||||
|
||||
// Scale MF output of desired signal
|
||||
y0r_over_sqrt10 = simde_mm_mulhi_epi16(y0r, ONE_OVER_SQRT_10);
|
||||
@@ -877,7 +877,7 @@ void nr_ulsch_qam16_qam16(c16_t *stream0_in,
|
||||
for (int i = 0; i < length >> 3; i += 2) {
|
||||
|
||||
// Get rho
|
||||
simde_mm256_separate_real_imag_parts(&xmm2, &xmm3, rho01_256i[i], rho01_256i[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&xmm2, &xmm3, rho01_256i[i], rho01_256i[i + 1]);
|
||||
rho_rpi = simde_mm256_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
rho_rmi = simde_mm256_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
|
||||
@@ -902,7 +902,7 @@ void nr_ulsch_qam16_qam16(c16_t *stream0_in,
|
||||
rho_rs[6] = simde_mm256_subs_epi16(xmm6, xmm7);
|
||||
|
||||
// Rearrange interfering MF output
|
||||
simde_mm256_separate_real_imag_parts(&y1r, &y1i, stream1_256i_in[i], stream1_256i_in[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&y1r, &y1i, stream1_256i_in[i], stream1_256i_in[i + 1]);
|
||||
|
||||
// | [Re(rho)+ Im(rho)]/sqrt(10) - y1r |
|
||||
for(int j=0; j<8; j++){ // psi_rs[0~7], rho_rs[0~7]
|
||||
@@ -920,14 +920,14 @@ void nr_ulsch_qam16_qam16(c16_t *stream0_in,
|
||||
}
|
||||
|
||||
// Rearrange desired MF output
|
||||
simde_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i + 1]);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
// [|h|^2(1),|h|^2(2),|h|^2(3),|h|^2(4)]*(2/sqrt(10))
|
||||
simde_mm256_separate_real_imag_parts(&ch_mag_des, &xmm2, ch_mag_256i[i], ch_mag_256i[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&ch_mag_des, &xmm2, ch_mag_256i[i], ch_mag_256i[i + 1]);
|
||||
|
||||
// Rearrange interfering channel magnitudes
|
||||
simde_mm256_separate_real_imag_parts(&ch_mag_int, &xmm2, ch_mag_256i_i[i], ch_mag_256i_i[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&ch_mag_int, &xmm2, ch_mag_256i_i[i], ch_mag_256i_i[i + 1]);
|
||||
|
||||
// Scale MF output of desired signal
|
||||
y0r_over_sqrt10 = simde_mm256_mulhi_epi16(y0r, ONE_OVER_SQRT_10);
|
||||
@@ -1125,7 +1125,7 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in,
|
||||
|
||||
// Get rho
|
||||
simde__m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8;
|
||||
simde_mm_separate_real_imag_parts(&xmm2, &xmm3, rho01_128i[i], rho01_128i[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&xmm2, &xmm3, rho01_128i[i], rho01_128i[i + 1]);
|
||||
|
||||
simde__m128i rho_rpi = simde_mm_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m128i rho_rmi = simde_mm_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -1189,7 +1189,7 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in,
|
||||
|
||||
// Rearrange interfering MF output
|
||||
simde__m128i y1r, y1i;
|
||||
simde_mm_separate_real_imag_parts(&y1r, &y1i, stream1_128i_in[i], stream1_128i_in[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&y1r, &y1i, stream1_128i_in[i], stream1_128i_in[i + 1]);
|
||||
|
||||
// Psi_r calculation from rho_rpi or rho_rmi
|
||||
xmm0 = simde_mm_set1_epi16(0); // ZERO for abs_pi16
|
||||
@@ -1219,15 +1219,15 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in,
|
||||
|
||||
// Rearrange desired MF output
|
||||
simde__m128i y0r, y0i;
|
||||
simde_mm_separate_real_imag_parts(&y0r, &y0i, stream0_128i_in[i], stream0_128i_in[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&y0r, &y0i, stream0_128i_in[i], stream0_128i_in[i + 1]);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
// [|h|^2(1),|h|^2(1),|h|^2(2),|h|^2(2),...,,|h|^2(7),|h|^2(7)]*(2/sqrt(10))
|
||||
// xmm2 is dummy variable that contains the same values as ch_mag_des
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_des, &xmm2, ch_mag_128i[i], ch_mag_128i[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_des, &xmm2, ch_mag_128i[i], ch_mag_128i[i + 1]);
|
||||
|
||||
// Rearrange interfering channel magnitudes
|
||||
simde_mm_separate_real_imag_parts(&ch_mag_int, &xmm2, ch_mag_128i_i[i], ch_mag_128i_i[i + 1]);
|
||||
oai_mm_separate_real_imag_parts(&ch_mag_int, &xmm2, ch_mag_128i_i[i], ch_mag_128i_i[i + 1]);
|
||||
|
||||
y0r_one_over_sqrt_21 = simde_mm_mulhi_epi16(y0r, ONE_OVER_SQRT_42);
|
||||
y0r_three_over_sqrt_21 = simde_mm_mulhi_epi16(y0r, THREE_OVER_SQRT_42);
|
||||
@@ -1471,7 +1471,7 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in,
|
||||
|
||||
// Get rho
|
||||
simde__m256i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8;
|
||||
simde_mm256_separate_real_imag_parts(&xmm2, &xmm3, rho01_256i[i], rho01_256i[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&xmm2, &xmm3, rho01_256i[i], rho01_256i[i + 1]);
|
||||
|
||||
simde__m256i rho_rpi = simde_mm256_adds_epi16(xmm2, xmm3); // rho = Re(rho) + Im(rho)
|
||||
simde__m256i rho_rmi = simde_mm256_subs_epi16(xmm2, xmm3); // rho* = Re(rho) - Im(rho)
|
||||
@@ -1535,7 +1535,7 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in,
|
||||
|
||||
// Rearrange interfering MF output
|
||||
simde__m256i y1r, y1i;
|
||||
simde_mm256_separate_real_imag_parts(&y1r, &y1i, stream1_256i_in[i], stream1_256i_in[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&y1r, &y1i, stream1_256i_in[i], stream1_256i_in[i + 1]);
|
||||
|
||||
// Psi_r calculation from rho_rpi or rho_rmi
|
||||
xmm0 = simde_mm256_broadcastw_epi16(simde_mm_set1_epi16(0)); // ZERO for abs_pi16
|
||||
@@ -1565,15 +1565,15 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in,
|
||||
|
||||
// Rearrange desired MF output
|
||||
simde__m256i y0r, y0i;
|
||||
simde_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&y0r, &y0i, stream0_256i_in[i], stream0_256i_in[i + 1]);
|
||||
|
||||
// Rearrange desired channel magnitudes
|
||||
// [|h|^2(1),|h|^2(1),|h|^2(2),|h|^2(2),...,,|h|^2(7),|h|^2(7)]*(2/sqrt(10))
|
||||
// xmm2 is dummy variable that contains the same values as ch_mag_des
|
||||
simde_mm256_separate_real_imag_parts(&ch_mag_des, &xmm2, ch_mag_256i[i], ch_mag_256i[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&ch_mag_des, &xmm2, ch_mag_256i[i], ch_mag_256i[i + 1]);
|
||||
|
||||
// Rearrange interfering channel magnitudes
|
||||
simde_mm256_separate_real_imag_parts(&ch_mag_int, &xmm2, ch_mag_256i_i[i], ch_mag_256i_i[i + 1]);
|
||||
oai_mm256_separate_real_imag_parts(&ch_mag_int, &xmm2, ch_mag_256i_i[i], ch_mag_256i_i[i + 1]);
|
||||
|
||||
y0r_one_over_sqrt_21 = simde_mm256_mulhi_epi16(y0r, ONE_OVER_SQRT_42);
|
||||
y0r_three_over_sqrt_21 = simde_mm256_mulhi_epi16(y0r, THREE_OVER_SQRT_42);
|
||||
|
||||
@@ -25,21 +25,21 @@
|
||||
|
||||
// Helper function for 128-bit vectors
|
||||
static inline simde__m128i
|
||||
simde_mm_presort_complex(simde__m128i x) {
|
||||
oai_mm_presort_complex(simde__m128i x) {
|
||||
return simde_mm_shuffle_epi32(simde_mm_shufflehi_epi16(simde_mm_shufflelo_epi16(x, SHUFFLE_MASK), SHUFFLE_MASK), SHUFFLE_MASK);
|
||||
}
|
||||
|
||||
// Helper function for 256-bit vectors
|
||||
static inline simde__m256i
|
||||
simde_mm256_presort_complex(simde__m256i x) {
|
||||
oai_mm256_presort_complex(simde__m256i x) {
|
||||
return simde_mm256_shuffle_epi32(simde_mm256_shufflehi_epi16(simde_mm256_shufflelo_epi16(x, SHUFFLE_MASK), SHUFFLE_MASK), SHUFFLE_MASK);
|
||||
}
|
||||
|
||||
void simde_mm_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_im, simde__m128i in0, simde__m128i in1)
|
||||
void oai_mm_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_im, simde__m128i in0, simde__m128i in1)
|
||||
{
|
||||
// presort real and imag part
|
||||
simde__m128i xmm0 = simde_mm_presort_complex(in0);
|
||||
simde__m128i xmm1 = simde_mm_presort_complex(in1);
|
||||
simde__m128i xmm0 = oai_mm_presort_complex(in0);
|
||||
simde__m128i xmm1 = oai_mm_presort_complex(in1);
|
||||
|
||||
if (out_re)
|
||||
*out_re = simde_mm_unpacklo_epi64(xmm0, xmm1);
|
||||
@@ -49,12 +49,12 @@ void simde_mm_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_i
|
||||
|
||||
}
|
||||
|
||||
void simde_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *out_im, simde__m256i in0, simde__m256i in1)
|
||||
void oai_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *out_im, simde__m256i in0, simde__m256i in1)
|
||||
{
|
||||
|
||||
// presort
|
||||
simde__m256i xmm0 = simde_mm256_presort_complex(in0);
|
||||
simde__m256i xmm1 = simde_mm256_presort_complex(in1);
|
||||
simde__m256i xmm0 = oai_mm256_presort_complex(in0);
|
||||
simde__m256i xmm1 = oai_mm256_presort_complex(in1);
|
||||
|
||||
if (out_re)
|
||||
*out_re = simde_mm256_permute4x64_epi64(simde_mm256_unpacklo_epi64(xmm0, xmm1), SHUFFLE_MASK);
|
||||
@@ -66,10 +66,10 @@ void simde_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *ou
|
||||
|
||||
// Function to separate the real and imaginary parts from the combined 256-bit vector
|
||||
//__attribute__((always_inline)) static inline
|
||||
void simde_mm256_separate_vectors(simde__m256i combined, simde__m128i *re, simde__m128i *im) {
|
||||
void oai_mm256_separate_vectors(simde__m256i combined, simde__m128i *re, simde__m128i *im) {
|
||||
|
||||
// presort
|
||||
simde__m256i xmm0 = simde_mm256_presort_complex(combined);
|
||||
simde__m256i xmm0 = oai_mm256_presort_complex(combined);
|
||||
|
||||
// Unpack the low and high parts of the combined vector to extract real and imaginary parts
|
||||
simde__m128i lo = simde_mm256_extractf128_si256(xmm0, 0); // Extract the lower 128 bits (real part)
|
||||
@@ -79,14 +79,14 @@ void simde_mm256_separate_vectors(simde__m256i combined, simde__m128i *re, simde
|
||||
simde__m128i xmmre = simde_mm_unpacklo_epi16(lo, hi); // Real part of the low half
|
||||
simde__m128i xmmim = simde_mm_unpackhi_epi16(lo, hi); // Imaginary part of the high half
|
||||
|
||||
*re = simde_mm_presort_complex(xmmre);
|
||||
*im = simde_mm_presort_complex(xmmim);
|
||||
*re = oai_mm_presort_complex(xmmre);
|
||||
*im = oai_mm_presort_complex(xmmim);
|
||||
|
||||
}
|
||||
|
||||
// Function to perform interleaving and combining re and im to a complex vector
|
||||
//__attribute__((always_inline)) static inline
|
||||
void simde_mm256_combine_vectors(simde__m128i re, simde__m128i im, simde__m256i *combined) {
|
||||
void oai_mm256_combine_vectors(simde__m128i re, simde__m128i im, simde__m256i *combined) {
|
||||
*combined = simde_mm256_set_m128i(
|
||||
simde_mm_unpackhi_epi16(re, im),
|
||||
simde_mm_unpacklo_epi16(re, im)
|
||||
|
||||
@@ -28,11 +28,11 @@ add_dependencies(tests test_vector_op)
|
||||
add_test(NAME test_vector_op
|
||||
COMMAND test_vector_op)
|
||||
|
||||
add_executable(test_simde_operations test_simde_operations.cpp ../simde_operations.c)
|
||||
target_link_libraries(test_simde_operations PRIVATE GTest::gtest LOG minimal_lib)
|
||||
add_dependencies(tests test_simde_operations)
|
||||
add_test(NAME test_simde_operations
|
||||
COMMAND ./test_simde_operations)
|
||||
add_executable(test_oai_arith_operations test_oai_arith_operations.cpp ../oai_arith_operations.c)
|
||||
target_link_libraries(test_oai_arith_operations PRIVATE GTest::gtest LOG minimal_lib)
|
||||
add_dependencies(tests test_oai_arith_operations)
|
||||
add_test(NAME test_oai_arith_operations
|
||||
COMMAND ./test_oai_arith_operations)
|
||||
|
||||
add_executable(test_sse_intrinsics test_sse_intrinsics.cpp)
|
||||
target_link_libraries(test_sse_intrinsics PRIVATE GTest::gtest LOG minimal_lib)
|
||||
|
||||
+8
-9
@@ -2,12 +2,11 @@
|
||||
#include <simde/x86/avx2.h>
|
||||
#include <cstdint>
|
||||
|
||||
// Deklaration der zu testenden Funktionen
|
||||
extern "C" {
|
||||
void simde_mm_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_im, simde__m128i in0, simde__m128i in1);
|
||||
void simde_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *out_im, simde__m256i in0, simde__m256i in1);
|
||||
void simde_mm256_separate_vectors(simde__m256i combined, simde__m128i *re, simde__m128i *im);
|
||||
void simde_mm256_combine_vectors(simde__m128i re, simde__m128i im, simde__m256i *combined);
|
||||
void oai_mm_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_im, simde__m128i in0, simde__m128i in1);
|
||||
void oai_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *out_im, simde__m256i in0, simde__m256i in1);
|
||||
void oai_mm256_separate_vectors(simde__m256i combined, simde__m128i *re, simde__m128i *im);
|
||||
void oai_mm256_combine_vectors(simde__m128i re, simde__m128i im, simde__m256i *combined);
|
||||
}
|
||||
|
||||
TEST(separate_real_imag_parts, 128) {
|
||||
@@ -20,7 +19,7 @@ TEST(separate_real_imag_parts, 128) {
|
||||
simde__m128i out_re, out_im;
|
||||
|
||||
// Call function to test
|
||||
simde_mm_separate_real_imag_parts(&out_re, &out_im, in0, in1);
|
||||
oai_mm_separate_real_imag_parts(&out_re, &out_im, in0, in1);
|
||||
|
||||
// Store the results for comparison
|
||||
int16_t re_result[8], im_result[8];
|
||||
@@ -47,7 +46,7 @@ TEST(separate_real_imag_parts, 256) {
|
||||
simde__m256i out_re, out_im;
|
||||
|
||||
// Call function to test
|
||||
simde_mm256_separate_real_imag_parts(&out_re, &out_im, in0, in1);
|
||||
oai_mm256_separate_real_imag_parts(&out_re, &out_im, in0, in1);
|
||||
|
||||
// Store the results for comparison
|
||||
int16_t re_result[16], im_result[16];
|
||||
@@ -73,7 +72,7 @@ TEST(complex_vectors, separate) {
|
||||
simde__m128i re, im;
|
||||
|
||||
// Call function to test
|
||||
simde_mm256_separate_vectors(combined, &re, &im);
|
||||
oai_mm256_separate_vectors(combined, &re, &im);
|
||||
|
||||
// Store the results for comparison
|
||||
int16_t re_result[8], im_result[8];
|
||||
@@ -100,7 +99,7 @@ TEST(complex_vectors, combine) {
|
||||
simde__m256i c;
|
||||
|
||||
// Call function to test
|
||||
simde_mm256_combine_vectors(re, im, &c);
|
||||
oai_mm256_combine_vectors(re, im, &c);
|
||||
|
||||
// Store the results for comparison
|
||||
int16_t c_result[16];
|
||||
@@ -916,8 +916,8 @@ c32_t dot_product(const c16_t *x,
|
||||
|
||||
/** @} */
|
||||
|
||||
void simde_mm_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_im, simde__m128i in0, simde__m128i in1);
|
||||
void simde_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *out_im, simde__m256i in0, simde__m256i in1);
|
||||
void oai_mm_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_im, simde__m128i in0, simde__m128i in1);
|
||||
void oai_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *out_im, simde__m256i in0, simde__m256i in1);
|
||||
|
||||
void InitSinLUT(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user