parallelization not working correctly in phy simulators and bad implementation
- Duplicate functions
set_parallel_conf() and other functions are source code duplicated in several places
- error cases
void set_parallel_conf(char *parallel_conf) { if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD; else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT; else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT; printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf); }
The way of passing a string, then string compare, ... is not C language correct usage in this context (this is ok for a configuration file string, but not as internal usage: pass directly the enum value) no error case management: if the string is not correct, the printf() message looks good, but it hides a wrong behavior printf() should not be used for such use case: LOG_I() and LOG_E() are available
- code new feature completely
In simulators, remains eNB->te set to functions that are now internals of dsch_coding.c and that have different parameters.
:( of course, gcc warns us these pointers are not correct, but OAI accepts to see gcc warnings
moreover, the new choice is to use one function dlsch_encoding_all(), so the function pointer eNB->te must have been cleanly removed everywhere in the code, instead of setting it to one value in several places.