set correct parameter type, and fuse funcions that do same real/complex vector operations, doing this, fix a lot of unitary multiplications (else there would be numerous cast operations
This commit is contained in:
@@ -114,7 +114,7 @@ void lte_sync_time_free(void) {
|
||||
|
||||
#define SHIFT 17
|
||||
|
||||
int lte_sync_time(int **rxdata, LTE_DL_FRAME_PARMS *frame_parms, int *eNB_id)
|
||||
int lte_sync_time(c16_t **rxdata, LTE_DL_FRAME_PARMS *frame_parms, int *eNB_id)
|
||||
{
|
||||
// perform a time domain correlation using the oversampled sync sequence
|
||||
unsigned int n, ar, s, peak_pos, peak_val, sync_source;
|
||||
@@ -135,8 +135,8 @@ int lte_sync_time(int **rxdata, LTE_DL_FRAME_PARMS *frame_parms, int *eNB_id)
|
||||
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
|
||||
for (int i = 0; i < sizeofArray(primary_synch_time); i++)
|
||||
for (ar = 0; ar < frame_parms->nb_antennas_rx; ar++) {
|
||||
c32_t result = dot_product(primary_synch_time[i], (c16_t *)&(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
|
||||
c32_t result2 = dot_product(primary_synch_time[i], (c16_t *)&(rxdata[ar][n + length]), frame_parms->ofdm_symbol_size, SHIFT);
|
||||
c32_t result = dot_product(primary_synch_time[i], rxdata[ar] + n, frame_parms->ofdm_symbol_size, SHIFT);
|
||||
c32_t result2 = dot_product(primary_synch_time[i], rxdata[ar] + n + length, frame_parms->ofdm_symbol_size, SHIFT);
|
||||
sync_out[i].r += result.r;
|
||||
sync_out[i].i += result.i;
|
||||
sync_out2[i].r += result2.r;
|
||||
@@ -228,9 +228,7 @@ int ru_sync_time(RU_t *ru,
|
||||
|
||||
// circular copy of beginning to end of rxdata buffer. Note: buffer should be big enough upon calling this function
|
||||
for (int ar=0; ar<ru->nb_rx; ar++)
|
||||
memcpy((void *)&ru->common.rxdata[ar][2*length],
|
||||
(void *)&ru->common.rxdata[ar][0],
|
||||
frame_parms->ofdm_symbol_size);
|
||||
memcpy(ru->common.rxdata[ar] + 2 * length, ru->common.rxdata[ar], frame_parms->ofdm_symbol_size);
|
||||
|
||||
int32_t maxlev0=0;
|
||||
int maxpos0=0;
|
||||
|
||||
Reference in New Issue
Block a user