15#ifndef VOLK_KERNELS_VOLK_VOLK_32F_8U_POLARBUTTERFLYPUPPET_32F_H_
16#define VOLK_KERNELS_VOLK_VOLK_32F_8U_POLARBUTTERFLYPUPPET_32F_H_
26 unsigned char* u_ptr = u;
27 for (
i = 0;
i < elements;
i++) {
28 *u_ptr = (*u_ptr & 0x01);
38 memset(u + frame_size, 0,
sizeof(
unsigned char) * (elements - frame_size));
39 memset(llrs + frame_size, 0,
sizeof(
float) * (elements - frame_size));
45 memset(u, 0, frame_size);
46 unsigned char* target = u + frame_size;
47 volk_8u_x2_encodeframepolar_8u_generic(target, u + 2 * frame_size, frame_size);
50 for (
i = 0;
i < frame_size;
i++) {
51 *ft = (-2 * ((float)*target++)) + 1.0f;
60 for (s = 0; s < frame_size; s++) {
61 for (e = 0; e < frame_exp + 1; e++) {
62 printf(
"%+4.2f ", llrs[e * frame_size + s]);
65 if ((s + 1) % 8 == 0) {
73 unsigned int frame_size = next_lower_power_of_two(elements);
74 unsigned int frame_exp = log2_of_power_of_2(frame_size);
75 return next_lower_power_of_two(frame_size / frame_exp);
91 unsigned int frame_exp = log2_of_power_of_2(frame_size);
97 unsigned int u_num = 0;
98 for (; u_num < frame_size; u_num++) {
100 u[u_num] = llrs[u_num] > 0 ? 0 : 1;
120 unsigned int frame_exp = log2_of_power_of_2(frame_size);
126 unsigned int u_num = 0;
127 for (; u_num < frame_size; u_num++) {
129 u[u_num] = llrs[u_num] > 0 ? 0 : 1;
137static inline void volk_32f_8u_polarbutterflypuppet_32f_u_avx2(
float* llrs,
149 unsigned int frame_exp = log2_of_power_of_2(frame_size);
155 unsigned int u_num = 0;
156 for (; u_num < frame_size; u_num++) {
157 volk_32f_8u_polarbutterfly_32f_u_avx2(llrs, u, frame_exp, 0, u_num, u_num);
158 u[u_num] = llrs[u_num] > 0 ? 0 : 1;
166static inline void volk_32f_8u_polarbutterflypuppet_32f_rvv(
float* llrs,
178 unsigned int frame_exp = log2_of_power_of_2(frame_size);
184 unsigned int u_num = 0;
185 for (; u_num < frame_size; u_num++) {
186 volk_32f_8u_polarbutterfly_32f_rvv(llrs, u, frame_exp, 0, u_num, u_num);
187 u[u_num] = llrs[u_num] > 0 ? 0 : 1;
195static inline void volk_32f_8u_polarbutterflypuppet_32f_rvvseg(
float* llrs,
207 unsigned int frame_exp = log2_of_power_of_2(frame_size);
213 unsigned int u_num = 0;
214 for (; u_num < frame_size; u_num++) {
215 volk_32f_8u_polarbutterfly_32f_rvvseg(llrs, u, frame_exp, 0, u_num, u_num);
216 u[u_num] = llrs[u_num] > 0 ? 0 : 1;
static void volk_32f_8u_polarbutterfly_32f_generic(float *llrs, unsigned char *u, const int frame_exp, const int stage, const int u_num, const int row)
Definition volk_32f_8u_polarbutterfly_32f.h:144
static void volk_32f_8u_polarbutterfly_32f_u_avx(float *llrs, unsigned char *u, const int frame_exp, const int stage, const int u_num, const int row)
Definition volk_32f_8u_polarbutterfly_32f.h:200
static void clean_up_intermediate_values(float *llrs, unsigned char *u, const int frame_size, const int elements)
Definition volk_32f_8u_polarbutterflypuppet_32f.h:33
static void print_llr_tree(const float *llrs, const int frame_size, const int frame_exp)
Definition volk_32f_8u_polarbutterflypuppet_32f.h:57
static void volk_32f_8u_polarbutterflypuppet_32f_generic(float *llrs, const float *input, unsigned char *u, const int elements)
Definition volk_32f_8u_polarbutterflypuppet_32f.h:79
static int maximum_frame_size(const int elements)
Definition volk_32f_8u_polarbutterflypuppet_32f.h:71
static void generate_error_free_input_vector(float *llrs, unsigned char *u, const int frame_size)
Definition volk_32f_8u_polarbutterflypuppet_32f.h:43
static void sanitize_bytes(unsigned char *u, const int elements)
Definition volk_32f_8u_polarbutterflypuppet_32f.h:23
static void volk_32f_8u_polarbutterflypuppet_32f_u_avx(float *llrs, const float *input, unsigned char *u, const int elements)
Definition volk_32f_8u_polarbutterflypuppet_32f.h:108
for i
Definition volk_config_fixed.tmpl.h:13