Vector Optimized Library of Kernels  3.0.0
Architecture-tuned implementations of math kernels

Overview

decode butterfly for one bit in polar decoder graph.

Dispatcher Prototype

volk_32f_8u_polarbutterfly_32f(float* llrs, unsigned char* u,
const int frame_size, const int frame_exp,
const int stage, const int u_num, const int row)

Inputs

  • llrs: buffer with LLRs. contains received LLRs and already decoded LLRs.
  • u: previously decoded bits
  • frame_size: = 2 ^ frame_exp.
  • frame_exp: power of 2 value for frame size.
  • stage: value in range [0, frame_exp). start stage algorithm goes deeper.
  • u_num: bit number currently to be decoded
  • row: row in graph to start decoding.

Outputs

  • frame: necessary LLRs for bit [u_num] to be decoded

Example

int frame_exp = 10;
int frame_size = 0x01 << frame_exp;
float* llrs = (float*) volk_malloc(sizeof(float) * frame_size * (frame_exp + 1),
volk_get_alignment()); unsigned char* u = (unsigned char) volk_malloc(sizeof(unsigned
char) * frame_size * (frame_exp + 1), volk_get_alignment());
{some_function_to_write_encoded_bits_to_float_llrs(llrs + frame_size * frame_exp,
data)};
unsigned int u_num;
for(u_num = 0; u_num < frame_size; u_num++){
volk_32f_8u_polarbutterfly_32f_u_avx(llrs, u, frame_size, frame_exp, 0, u_num,
u_num);
// next line could first search for frozen bit value and then do bit decision.
u[u_num] = llrs[u_num] > 0 ? 0 : 1;
}
volk_free(llrs);
data
Definition: plot_best_vs_generic.py:23
size_t volk_get_alignment(void)
Get the machine alignment in bytes.
Definition: volk.tmpl.c:90
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
__VOLK_DECL_BEGIN VOLK_API void * volk_malloc(size_t size, size_t alignment)
Allocate size bytes of data aligned to alignment.
Definition: volk_malloc.c:38
VOLK_API void volk_free(void *aptr)
Free's memory allocated by volk_malloc.
Definition: volk_malloc.c:80