Commit a51c5299 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/polar-encoder-perf-improv' into integration_2023_w43

parents 679b4978 e14903cd
......@@ -129,17 +129,13 @@ void nr_polar_uxG(uint64_t *D, const uint64_t *u, const uint64_t **G_N_tab, uint
int n_ones = 0;
for (int a = 0; a < N_array; a++) {
uint64_t uxG = u[a] & Gn[a];
for (int m = 0; m < 64; m++) {
if (((uxG >> m) & 1) == 1) {
n_ones++;
}
}
if (uxG != 0)
n_ones += count_bits_set(uxG);
}
uint64_t bit = n_ones % 2;
int n1 = n >> 6;
int n2 = n - (n1 << 6);
D[n1] |= bit << n2;
D[n1] |= ((uint64_t)n_ones & 1) << n2;
}
}
......
......@@ -791,6 +791,11 @@ double interp(double x, double *xs, double *ys, int count);
void simde_mm128_separate_real_imag_parts(simde__m128i *out_re, simde__m128i *out_im, simde__m128i in0, simde__m128i in1);
void simde_mm256_separate_real_imag_parts(simde__m256i *out_re, simde__m256i *out_im, simde__m256i in0, simde__m256i in1);
static __attribute__((always_inline)) inline int count_bits_set(uint64_t v)
{
return __builtin_popcountll(v);
}
#ifdef __cplusplus
}
#endif
......
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