Commit e04e09e5 authored by Thomas Schlichter's avatar Thomas Schlichter

fix warnings about missing const in polar_encoder_fast() parameter list

make t_nrPolar_params a constant input to all nr polar encoders and nr polar decoders
parent 0ac5fcbf
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
int8_t polar_decoder(double *input, int8_t polar_decoder(double *input,
uint32_t *out, uint32_t *out,
t_nrPolar_params *polarParams, const t_nrPolar_params *polarParams,
uint8_t listSize) uint8_t listSize)
{ {
//Assumes no a priori knowledge. //Assumes no a priori knowledge.
...@@ -299,7 +299,7 @@ int8_t polar_decoder(double *input, ...@@ -299,7 +299,7 @@ int8_t polar_decoder(double *input,
int8_t polar_decoder_dci(double *input, int8_t polar_decoder_dci(double *input,
uint32_t *out, uint32_t *out,
t_nrPolar_params *polarParams, const t_nrPolar_params *polarParams,
uint8_t listSize, uint8_t listSize,
uint16_t n_RNTI) { uint16_t n_RNTI) {
uint8_t ***bit = nr_alloc_uint8_3D_array(polarParams->N, (polarParams->n+1), 2*listSize); uint8_t ***bit = nr_alloc_uint8_3D_array(polarParams->N, (polarParams->n+1), 2*listSize);
......
...@@ -138,22 +138,22 @@ typedef struct nrPolar_params t_nrPolar_params; ...@@ -138,22 +138,22 @@ typedef struct nrPolar_params t_nrPolar_params;
void polar_encoder(uint32_t *input, void polar_encoder(uint32_t *input,
uint32_t *output, uint32_t *output,
t_nrPolar_params *polarParams); const t_nrPolar_params *polarParams);
void polar_encoder_dci(uint32_t *in, void polar_encoder_dci(uint32_t *in,
uint32_t *out, uint32_t *out,
t_nrPolar_params *polarParams, const t_nrPolar_params *polarParams,
uint16_t n_RNTI); uint16_t n_RNTI);
void polar_encoder_fast(uint64_t *A, void polar_encoder_fast(uint64_t *A,
void *out, void *out,
int32_t crcmask, int32_t crcmask,
uint8_t ones_flag, uint8_t ones_flag,
t_nrPolar_params *polarParams); const t_nrPolar_params *polarParams);
int8_t polar_decoder(double *input, int8_t polar_decoder(double *input,
uint32_t *output, uint32_t *output,
t_nrPolar_params *polarParams, const t_nrPolar_params *polarParams,
uint8_t listSize); uint8_t listSize);
uint32_t polar_decoder_int16(int16_t *input, uint32_t polar_decoder_int16(int16_t *input,
...@@ -163,7 +163,7 @@ uint32_t polar_decoder_int16(int16_t *input, ...@@ -163,7 +163,7 @@ uint32_t polar_decoder_int16(int16_t *input,
int8_t polar_decoder_dci(double *input, int8_t polar_decoder_dci(double *input,
uint32_t *out, uint32_t *out,
t_nrPolar_params *polarParams, const t_nrPolar_params *polarParams,
uint8_t listSize, uint8_t listSize,
uint16_t n_RNTI); uint16_t n_RNTI);
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
void polar_encoder(uint32_t *in, void polar_encoder(uint32_t *in,
uint32_t *out, uint32_t *out,
t_nrPolar_params *polarParams) { const t_nrPolar_params *polarParams) {
if (1) {//polarParams->idx == 0 || polarParams->idx == 1) { //PBCH or PDCCH if (1) {//polarParams->idx == 0 || polarParams->idx == 1) { //PBCH or PDCCH
/* /*
uint64_t B = (((uint64_t)*in)&((((uint64_t)1)<<32)-1)) | (((uint64_t)crc24c((uint8_t*)in,polarParams->payloadBits)>>8)<<polarParams->payloadBits); uint64_t B = (((uint64_t)*in)&((((uint64_t)1)<<32)-1)) | (((uint64_t)crc24c((uint8_t*)in,polarParams->payloadBits)>>8)<<polarParams->payloadBits);
...@@ -154,7 +154,7 @@ void polar_encoder(uint32_t *in, ...@@ -154,7 +154,7 @@ void polar_encoder(uint32_t *in,
void polar_encoder_dci(uint32_t *in, void polar_encoder_dci(uint32_t *in,
uint32_t *out, uint32_t *out,
t_nrPolar_params *polarParams, const t_nrPolar_params *polarParams,
uint16_t n_RNTI) { uint16_t n_RNTI) {
#ifdef DEBUG_POLAR_ENCODER_DCI #ifdef DEBUG_POLAR_ENCODER_DCI
printf("[polar_encoder_dci] in: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", in[0], in[1], in[2], in[3]); printf("[polar_encoder_dci] in: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\n", in[0], in[1], in[2], in[3]);
...@@ -251,9 +251,9 @@ void polar_encoder_dci(uint32_t *in, ...@@ -251,9 +251,9 @@ void polar_encoder_dci(uint32_t *in,
#endif #endif
} }
static inline void polar_rate_matching(t_nrPolar_params *polarParams,void *in,void *out) __attribute__((always_inline)); static inline void polar_rate_matching(const t_nrPolar_params *polarParams,void *in,void *out) __attribute__((always_inline));
static inline void polar_rate_matching(t_nrPolar_params *polarParams,void *in,void *out) { static inline void polar_rate_matching(const t_nrPolar_params *polarParams,void *in,void *out) {
// handle rate matching with a single 128 bit word using bit shuffling // handle rate matching with a single 128 bit word using bit shuffling
// can be done with SIMD intrisics if needed // can be done with SIMD intrisics if needed
...@@ -411,7 +411,7 @@ void polar_encoder_fast(uint64_t *A, ...@@ -411,7 +411,7 @@ void polar_encoder_fast(uint64_t *A,
void *out, void *out,
int32_t crcmask, int32_t crcmask,
uint8_t ones_flag, uint8_t ones_flag,
t_nrPolar_params *polarParams) { const t_nrPolar_params *polarParams) {
// AssertFatal(polarParams->K > 32, "K = %d < 33, is not supported yet\n",polarParams->K); // AssertFatal(polarParams->K > 32, "K = %d < 33, is not supported yet\n",polarParams->K);
AssertFatal(polarParams->K < 129, "K = %d > 128, is not supported yet\n",polarParams->K); AssertFatal(polarParams->K < 129, "K = %d > 128, is not supported yet\n",polarParams->K);
AssertFatal(polarParams->payloadBits < 65, "payload bits = %d > 64, is not supported yet\n",polarParams->payloadBits); AssertFatal(polarParams->payloadBits < 65, "payload bits = %d > 64, is not supported yet\n",polarParams->payloadBits);
......
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