Commit d07c1897 authored by Robert Schmidt's avatar Robert Schmidt

ldpc: remove seemingly useless memset() in LDPC decoder

These arrays, from what I can see, are only written. As such, it seems
that resetting these arrays first is futile.

Running

    OAI_RNGSEED=2222 perf stat -d ./ldpctest '-l7040' '-s3' -n1000

shows that the average decoding time is reduced, from

    ldpc_decoder:          177.625 us;            1000;         355.389 us;
    ldpc_decoder:          179.794 us;            1000;         421.170 us;
    ldpc_decoder:          173.362 us;            1000;         360.085 us;
    ldpc_decoder:          176.322 us;            1000;         323.194 us;
    ldpc_decoder:          174.158 us;            1000;         368.887 us;

to

    ldpc_decoder:          163.437 us;            1000;         387.684 us;
    ldpc_decoder:          164.242 us;            1000;         329.896 us;
    ldpc_decoder:          165.561 us;            1000;         386.442 us;
    ldpc_decoder:          162.239 us;            1000;         387.872 us;
    ldpc_decoder:          164.808 us;            1000;         325.659 us;

while exhibiting reduced number of L1d cache misses.
Signed-off-by: default avatarRobert Schmidt <robert.schmidt@openairinterface.org>
parent 139347dd
...@@ -101,12 +101,12 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, ...@@ -101,12 +101,12 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr,
// int8_t* cnProcBuf= cnProcBuf; // int8_t* cnProcBuf= cnProcBuf;
// int8_t* cnProcBufRes= cnProcBufRes; // int8_t* cnProcBufRes= cnProcBufRes;
int8_t cnProcBuf[NR_LDPC_SIZE_CN_PROC_BUF] __attribute__ ((aligned(64))) = {0}; int8_t cnProcBuf[NR_LDPC_SIZE_CN_PROC_BUF] __attribute__ ((aligned(64)));
int8_t cnProcBufRes[NR_LDPC_SIZE_CN_PROC_BUF] __attribute__ ((aligned(64))) = {0}; int8_t cnProcBufRes[NR_LDPC_SIZE_CN_PROC_BUF] __attribute__ ((aligned(64)));
int8_t bnProcBuf[NR_LDPC_SIZE_BN_PROC_BUF] __attribute__ ((aligned(64))) = {0}; int8_t bnProcBuf[NR_LDPC_SIZE_BN_PROC_BUF] __attribute__ ((aligned(64)));
int8_t bnProcBufRes[NR_LDPC_SIZE_BN_PROC_BUF] __attribute__ ((aligned(64))) = {0}; int8_t bnProcBufRes[NR_LDPC_SIZE_BN_PROC_BUF] __attribute__ ((aligned(64)));
int8_t llrRes[NR_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(64))) = {0}; int8_t llrRes[NR_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(64)));
int8_t llrProcBuf[NR_LDPC_MAX_NUM_LLR] __attribute__((aligned(64))) = {0}; int8_t llrProcBuf[NR_LDPC_MAX_NUM_LLR] __attribute__((aligned(64)));
// Minimum number of iterations is 1 // Minimum number of iterations is 1
// 0 iterations means hard-decision on input LLRs // 0 iterations means hard-decision on input LLRs
// Initialize with parity check fail != 0 // Initialize with parity check fail != 0
......
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