ue: simplify dlsch LLR functions

Change layer_llr buffer from 2D to 3D with symbol as first dimenstion. Refactor
layer demapping function.
This commit is contained in:
Sakthivel Velumani
2026-03-18 19:15:33 +00:00
parent 07f5e01ee8
commit 04d35f90ec
6 changed files with 86 additions and 106 deletions
+11
View File
@@ -20,6 +20,17 @@ extern "C" {
#define sizeofArray(a) (sizeof(a)/sizeof(*(a)))
#define CHECK_INDEX(ARRAY, INDEX) assert((INDEX) < sizeofArray(ARRAY))
#define GET_ARRAY_MAX(arr, size, max_val) \
do { \
DevAssert((size) > 0); \
(max_val) = (arr)[0]; \
for (size_t _i = 1; _i < (size); _i++) { \
if ((arr)[_i] > (max_val)) { \
(max_val) = (arr)[_i]; \
} \
} \
} while (0)
// Prevent double evaluation in max macro
#define cmax(a,b) ({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \