simplify nrue command line parameter processing
This commit is contained in:
@@ -65,11 +65,12 @@ void init_dlsch_tpool(uint8_t nun_dlsch_threads)
|
||||
if( nun_dlsch_threads==0)
|
||||
return;
|
||||
|
||||
char *params=malloc(nun_dlsch_threads*3*sizeof(char));
|
||||
for (int i=0; i<nun_dlsch_threads; i++) {
|
||||
memcpy(params+(i*3),"-1\0",3);
|
||||
char *params=calloc(1,(nun_dlsch_threads*2)+1);
|
||||
for (int i=0; i<nun_dlsch_threads; i++) {
|
||||
memcpy(params+(i*2),"-1",2);
|
||||
}
|
||||
initTpool(params, &pool_dl, false);
|
||||
initTpool(params, &pool_dl, false);
|
||||
free(params);
|
||||
}
|
||||
|
||||
|
||||
@@ -1434,7 +1435,7 @@ void nr_dlsch_decoding_process(void *arg)
|
||||
|
||||
Kr = harq_process->K;
|
||||
Kr_bytes = Kr>>3;
|
||||
K_bits_F = Kr-harq_process->F;
|
||||
K_bytes_F = Kr-harq_process->F;
|
||||
|
||||
E = nr_get_E(G, harq_process->C, harq_process->Qm, harq_process->Nl, r);
|
||||
|
||||
@@ -1546,9 +1547,9 @@ void nr_dlsch_decoding_process(void *arg)
|
||||
//set first 2*Z_c bits to zeros
|
||||
memset(&z[0],0,2*harq_process->Z*sizeof(int16_t));
|
||||
//set Filler bits
|
||||
memset((&z[0]+K_bits_F),127,harq_process->F*sizeof(int16_t));
|
||||
memset((&z[0]+K_bytes_F),127,harq_process->F*sizeof(int16_t));
|
||||
//Move coded bits before filler bits
|
||||
memcpy((&z[0]+2*harq_process->Z),harq_process->d[r],(K_bits_F-2*harq_process->Z)*sizeof(int16_t));
|
||||
memcpy((&z[0]+2*harq_process->Z),harq_process->d[r],(K_bytes_F-2*harq_process->Z)*sizeof(int16_t));
|
||||
//skip filler bits
|
||||
memcpy((&z[0]+Kr),harq_process->d[r]+(Kr-2*harq_process->Z),(kc*harq_process->Z-Kr)*sizeof(int16_t));
|
||||
//Saturate coded bits before decoding into 8 bits values
|
||||
@@ -1609,7 +1610,7 @@ void *dlsch_thread(void *arg) {
|
||||
notifiedFIFO_elt_t *res_dl;
|
||||
initNotifiedFIFO_nothreadSafe(&freeBlocks_dl);
|
||||
|
||||
for (int i=0; i<RX_NB_TH_DL+1; i++){
|
||||
for (int i=0; i<tpool_nbthreads(pool_dl)+1; i++){
|
||||
pushNotifiedFIFO_nothreadSafe(&freeBlocks_dl,
|
||||
newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 0,&nf,nr_dlsch_decoding_process));}
|
||||
|
||||
@@ -1617,7 +1618,7 @@ void *dlsch_thread(void *arg) {
|
||||
|
||||
notifiedFIFO_elt_t *res;
|
||||
|
||||
while (nbDlProcessing >= RX_NB_TH_DL) {
|
||||
while (nbDlProcessing >= tpool_nbthreads(pool_dl)) {
|
||||
if ( (res=tryPullTpool(&nf, &pool_dl)) != NULL ) {
|
||||
//nbDlProcessing--;
|
||||
pushNotifiedFIFO_nothreadSafe(&freeBlocks_dl,res);
|
||||
|
||||
Reference in New Issue
Block a user