mirror of https://github.com/PentHertz/srsLTE.git
Added macro for calculating the squared absolute value of a complex variable
This commit is contained in:
parent
653177ca7c
commit
fd0d804321
|
@ -44,6 +44,9 @@ extern "C" {
|
|||
#define SRSRAN_FLOOR(NUM, DEN) ((NUM) / (DEN))
|
||||
#define SRSRAN_ROUND(NUM, DEN) ((uint32_t)round((double)(NUM) / (double)(DEN)))
|
||||
|
||||
// Complex squared absolute value
|
||||
#define SRSRAN_CSQABS(X) (__real__(X) * __real__(X) + __imag__(X) * __imag__(X))
|
||||
|
||||
// Cumulative moving average
|
||||
#define SRSRAN_VEC_CMA(data, average, n) ((average) + ((data) - (average)) / ((n) + 1))
|
||||
|
||||
|
|
Loading…
Reference in New Issue