Commit 75c652d4 authored by mir's avatar mir

TASK_MANAGER_DEMODULATION flag removed

parent 77aa9c6f
#ifndef TASK_MANAGER_WORKING_STEALING_H
#define TASK_MANAGER_WORKING_STEALING_H
#define TASK_MANAGER_DEMODULATION
#define TASK_MANAGER_CODING
#define TASK_MANAGER_RU
......
......@@ -1441,9 +1441,8 @@ static void nr_pusch_symbol_processing(void *arg)
llr16[i] = llr_ptr[i] * rdata->s[i];
}
#ifdef TASK_MANAGER_DEMODULATION
// Task running in // completed
completed_task_ans(rdata->ans);
#endif
}
......@@ -1654,14 +1653,13 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB,
start_meas(&gNB->rx_pusch_symbol_processing_stats);
int numSymbols = gNB->num_pusch_symbols_per_thread;
#ifdef TASK_MANAGER_DEMODULATION
int const loop_iter = rel15_ul->nr_of_symbols/numSymbols;
puschSymbolProc_t arr[loop_iter];
task_ans_t arr_ans[loop_iter];
memset(arr_ans, 0, loop_iter*sizeof(task_ans_t));
int sz_arr = 0;
#endif
for(uint8_t symbol = rel15_ul->start_symbol_index;
symbol < (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols);
......@@ -1676,16 +1674,10 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB,
total_res+=pusch_vars->ul_valid_re_per_slot[symbol+s];
}
if (total_res > 0) {
#ifdef TASK_MANAGER_DEMODULATION
puschSymbolProc_t *rdata = &arr[sz_arr];
rdata->ans = &arr_ans[sz_arr];
++sz_arr;
#else
union puschSymbolReqUnion id = {.s={ulsch_id,frame,slot,0}};
id.p=1+symbol;
notifiedFIFO_elt_t *req = newNotifiedFIFO_elt(sizeof(puschSymbolProc_t), id.p, &gNB->respPuschSymb, &nr_pusch_symbol_processing); // create a job for Tpool
puschSymbolProc_t *rdata = (puschSymbolProc_t*)NotifiedFifoData(req); // data for the job
#endif
rdata->gNB = gNB;
rdata->frame_parms = frame_parms;
rdata->rel15_ul = rel15_ul;
......@@ -1699,15 +1691,10 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB,
rdata->nvar = nvar;
if (rel15_ul->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) {
// Obvious memory leak when TASK_MANAGER not defined
nr_pusch_symbol_processing(rdata);
} else {
#ifdef TASK_MANAGER_DEMODULATION
task_t t = { .args = rdata, .func = &nr_pusch_symbol_processing };
async_task_manager(&gNB->man , t);
#else
pushTpool(&gNB->threadPool, req);
#endif
task_t t = {.func = &nr_pusch_symbol_processing, .args = rdata};
async_task_manager(&gNB->man, t);
gNB->nbSymb++;
}
......@@ -1715,17 +1702,9 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB,
}
} // symbol loop
#ifdef TASK_MANAGER_DEMODULATION
if(gNB->nbSymb > 0){
join_task_ans(arr_ans, sz_arr);
}
#else
while (gNB->nbSymb > 0) {
notifiedFIFO_elt_t *req = pullTpool(&gNB->respPuschSymb, &gNB->threadPool);
gNB->nbSymb--;
delNotifiedFIFO_elt(req);
}
#endif
stop_meas(&gNB->rx_pusch_symbol_processing_stats);
return 0;
}
......@@ -729,11 +729,9 @@ typedef struct PHY_VARS_gNB_s {
void *scopeData;
/// structure for analyzing high-level RT measurements
rt_L1_profiling_t rt_L1_profiling;
#if defined(TASK_MANAGER_CODING) || defined(TASK_MANAGER_DEMODULATION) || defined(TASK_MANAGER_RU) || !defined(TASK_MANAGER_SIM)
#if defined(TASK_MANAGER_CODING) || defined(TASK_MANAGER_RU) || defined(TASK_MANAGER_SIM)
task_manager_t man;
task_manager_t man_rx_tx_ru;
#else
tpool_t threadPool;
#endif
} PHY_VARS_gNB;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment