Agora  1.2.0
Agora project
utils_ldpc.h File Reference
#include <cstdlib>
#include "encoder.h"
#include "iobuffer.h"
#include "phy_ldpc_encoder_5gnr.h"
#include "symbols.h"
#include "utils.h"
Include dependency graph for utils_ldpc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __has_builtin(x)   0
 

Functions

LDPC_ADAPTER_P LdpcSelectAdapterFunc (uint16_t zcSize, uint8_t num_ways)
 
template<typename T >
TAlignedMalloc (const int size, const unsigned alignment)
 
static uint8_t Bitreverse8 (uint8_t x)
 
static void AdaptBitsForMod (const uint8_t *bit_seq_in, uint8_t *bytes_out, size_t len, size_t mod_type)
 Fill-in the bytes of bytes_out with mod_type bits per byte, taken from the bit sequence bit_seq_in. More...
 
static void AdaptBitsFromMod (const uint8_t *vec_in, uint8_t *vec_out, int len, int mod_type)
 
static uint8_t SelectBaseMatrixEntry (uint16_t Zc)
 
static size_t BitsToBytes (size_t n_bits)
 
static size_t LdpcNumInputCols (size_t base_graph)
 
static size_t LdpcMaxNumRows (size_t base_graph)
 
static size_t LdpcNumInputBits (size_t base_graph, size_t zc)
 
static size_t LdpcMaxNumParityBits (size_t base_graph, size_t zc)
 
static size_t LdpcMaxNumEncodedBits (size_t base_graph, size_t zc)
 
static size_t LdpcNumEncodedBits (size_t base_graph, size_t zc, size_t nRows)
 
static size_t LdpcEncodingInputBufSize (size_t base_graph, size_t zc)
 
static size_t LdpcEncodingParityBufSize (size_t base_graph, size_t zc)
 
static size_t LdpcEncodingEncodedBufSize (size_t base_graph, size_t zc)
 
static size_t LdpcGetMinZc ()
 
static size_t LdpcGetMaxZc ()
 
static void LdpcEncodeHelper (size_t base_graph, size_t zc, size_t nRows, int8_t *encoded_buffer, int8_t *parity_buffer, const int8_t *input_buffer)
 

Macro Definition Documentation

◆ __has_builtin

#define __has_builtin (   x)    0

Function Documentation

◆ AdaptBitsForMod()

static void AdaptBitsForMod ( const uint8_t *  bit_seq_in,
uint8_t *  bytes_out,
size_t  len,
size_t  mod_type 
)
inlinestatic

Fill-in the bytes of bytes_out with mod_type bits per byte, taken from the bit sequence bit_seq_in.

Parameters
bit_seq_inThe input bit sequence
bytes_outThe output byte array with mod_type bits per byte. It must have space for ceil(len * 8.0 / mod_type) bytes.
lenThe number of bytes in bit_seq_in
mod_typeThe number of bits in one modulated symbol (e.g., mod_type = 6 for 64-QAM modulation)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AdaptBitsFromMod()

static void AdaptBitsFromMod ( const uint8_t *  vec_in,
uint8_t *  vec_out,
int  len,
int  mod_type 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AlignedMalloc()

template<typename T >
T* AlignedMalloc ( const int  size,
const unsigned  alignment 
)

◆ Bitreverse8()

static uint8_t Bitreverse8 ( uint8_t  x)
inlinestatic
Here is the caller graph for this function:

◆ BitsToBytes()

static size_t BitsToBytes ( size_t  n_bits)
inlinestatic
Here is the caller graph for this function:

◆ LdpcEncodeHelper()

static void LdpcEncodeHelper ( size_t  base_graph,
size_t  zc,
size_t  nRows,
int8_t *  encoded_buffer,
int8_t *  parity_buffer,
const int8_t *  input_buffer 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LdpcEncodingEncodedBufSize()

static size_t LdpcEncodingEncodedBufSize ( size_t  base_graph,
size_t  zc 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LdpcEncodingInputBufSize()

static size_t LdpcEncodingInputBufSize ( size_t  base_graph,
size_t  zc 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LdpcEncodingParityBufSize()

static size_t LdpcEncodingParityBufSize ( size_t  base_graph,
size_t  zc 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LdpcGetMaxZc()

static size_t LdpcGetMaxZc ( )
inlinestatic
Here is the caller graph for this function:

◆ LdpcGetMinZc()

static size_t LdpcGetMinZc ( )
inlinestatic
Here is the caller graph for this function:

◆ LdpcMaxNumEncodedBits()

static size_t LdpcMaxNumEncodedBits ( size_t  base_graph,
size_t  zc 
)
inlinestatic
Here is the caller graph for this function:

◆ LdpcMaxNumParityBits()

static size_t LdpcMaxNumParityBits ( size_t  base_graph,
size_t  zc 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LdpcMaxNumRows()

static size_t LdpcMaxNumRows ( size_t  base_graph)
inlinestatic
Here is the caller graph for this function:

◆ LdpcNumEncodedBits()

static size_t LdpcNumEncodedBits ( size_t  base_graph,
size_t  zc,
size_t  nRows 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LdpcNumInputBits()

static size_t LdpcNumInputBits ( size_t  base_graph,
size_t  zc 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LdpcNumInputCols()

static size_t LdpcNumInputCols ( size_t  base_graph)
inlinestatic
Here is the caller graph for this function:

◆ LdpcSelectAdapterFunc()

LDPC_ADAPTER_P LdpcSelectAdapterFunc ( uint16_t  zcSize,
uint8_t  num_ways 
)

◆ SelectBaseMatrixEntry()

static uint8_t SelectBaseMatrixEntry ( uint16_t  Zc)
inlinestatic