LIBML  Version 3.2.4
LIBML DSP Software Library
Macros | Functions | Variables
tpt_internal.h File Reference
#include "tpt_math.h"
Include dependency graph for tpt_internal.h:
This graph shows which files directly or indirectly include this file:

Macros

#define RES_LOGN   (10)
 
#define STEP_UNIT_Q31_BASE   (0x80000000U)
 
#define STEP_UNIT_Q15_BASE   (0x8000U)
 
#define STEP_UNIT_Q31   (STEP_UNIT_Q31_BASE >> (RES_LOGN - 1))
 
#define STEP_UNIT_Q15   (STEP_UNIT_Q15_BASE >> (RES_LOGN - 1))
 
#define STEP_UNIT_R_Q15   (0x7fff / STEP_UNIT_Q15)
 
#define __ll_B   ((uint32_t)1 << 16)
 
#define __ll_lowpart(t)   ((uint32_t)(t) & (__ll_B - 1))
 
#define __ll_highpart(t)   ((uint32_t)(t) >> 16)
 
#define UNIT_Q31   (1.0f / 2147483648.0f)
 

Functions

static int32_t get_log2_32b (uint32_t v)
 
static uint32_t get_highest_bit_set_32b (q31_t data)
 
static uint32_t __ABS (q31_t data)
 
static q31_t sat_q31_to_any (q31_t src, const uint32_t bit_size)
 
static void tpt_cirwrite_f32 (int32_t *buf, int32_t len, uint16_t *offset, int32_t binc, const int32_t *src, int32_t sinc, uint32_t size)
 
static void tpt_cirwrite_q15 (q15_t *buf, int32_t len, uint16_t *offset, int32_t binc, const q15_t *src, int32_t sinc, uint32_t size)
 
static void tpt_cirwrite_q7 (q7_t *buf, int32_t len, uint16_t *offset, int32_t binc, const q7_t *src, int32_t sinc, uint32_t size)
 
static void tpt_cirread_f32 (int32_t *buf, int32_t len, int32_t *offset, int32_t binc, int32_t *dst, int32_t *dbase, int32_t dlen, int32_t dinc, uint32_t size)
 
static void tpt_cirread_q15 (q15_t *buf, int32_t len, int32_t *offset, int32_t binc, q15_t *dst, q15_t *dbase, int32_t dlen, int32_t dinc, uint32_t size)
 
static void tpt_cirread_q7 (q7_t *buf, int32_t len, int32_t *offset, int32_t binc, q7_t *dst, q7_t *dbase, int32_t dlen, int32_t dinc, uint32_t size)
 
static uint32_t TPT_SVS (q31_t x, q31_t y)
 
static q31_t TPT_KSUBW (q31_t x, q31_t y)
 
static q15_t TPT_KSUBH (q15_t x, q15_t y)
 
static q31_t _tpt_div_u64_u32 (uint64_t src1, uint32_t src2)
 
static q31_t _tpt_div_s64_u32 (int64_t src1, uint32_t src2)
 
static f32_t _exp_f32 (f32_t x)
 
static f64_t _exp_f64 (f64_t x)
 
static f32_t _sigmoid_f32 (f32_t x)
 
static float _log_f32 (float x)
 
static float _log_f64 (float x)
 
static float convert_q31_to_float (q31_t x)
 
static q31_t convert_float_to_q31 (float x)
 

Variables

static const f32_t CONST_1 = 1.f
 
static const f32_t CONST_MIN_SIGMOID = -10.f
 
static const f32_t CONST_MAX_SIGMOID = 10.f
 

Macro Definition Documentation

◆ __ll_B

#define __ll_B   ((uint32_t)1 << 16)

◆ __ll_highpart

#define __ll_highpart (   t)    ((uint32_t)(t) >> 16)

◆ __ll_lowpart

#define __ll_lowpart (   t)    ((uint32_t)(t) & (__ll_B - 1))

◆ RES_LOGN

#define RES_LOGN   (10)

◆ STEP_UNIT_Q15

#define STEP_UNIT_Q15   (STEP_UNIT_Q15_BASE >> (RES_LOGN - 1))

◆ STEP_UNIT_Q15_BASE

#define STEP_UNIT_Q15_BASE   (0x8000U)

◆ STEP_UNIT_Q31

#define STEP_UNIT_Q31   (STEP_UNIT_Q31_BASE >> (RES_LOGN - 1))

◆ STEP_UNIT_Q31_BASE

#define STEP_UNIT_Q31_BASE   (0x80000000U)

◆ STEP_UNIT_R_Q15

#define STEP_UNIT_R_Q15   (0x7fff / STEP_UNIT_Q15)

◆ UNIT_Q31

#define UNIT_Q31   (1.0f / 2147483648.0f)

Function Documentation

◆ __ABS()

static uint32_t __ABS ( q31_t  data)
inlinestatic

◆ _exp_f32()

static f32_t _exp_f32 ( f32_t  x)
inlinestatic

◆ _exp_f64()

static f64_t _exp_f64 ( f64_t  x)
inlinestatic

◆ _log_f32()

static float _log_f32 ( float  x)
inlinestatic

◆ _log_f64()

static float _log_f64 ( float  x)
inlinestatic

◆ _sigmoid_f32()

static f32_t _sigmoid_f32 ( f32_t  x)
inlinestatic

◆ _tpt_div_s64_u32()

static q31_t _tpt_div_s64_u32 ( int64_t  src1,
uint32_t  src2 
)
inlinestatic

◆ _tpt_div_u64_u32()

static q31_t _tpt_div_u64_u32 ( uint64_t  src1,
uint32_t  src2 
)
inlinestatic

◆ convert_float_to_q31()

static q31_t convert_float_to_q31 ( float  x)
inlinestatic

◆ convert_q31_to_float()

static float convert_q31_to_float ( q31_t  x)
inlinestatic

◆ get_highest_bit_set_32b()

static uint32_t get_highest_bit_set_32b ( q31_t  data)
inlinestatic

◆ get_log2_32b()

static int32_t get_log2_32b ( uint32_t  v)
inlinestatic

◆ sat_q31_to_any()

static q31_t sat_q31_to_any ( q31_t  src,
const uint32_t  bit_size 
)
inlinestatic

◆ tpt_cirread_f32()

static void tpt_cirread_f32 ( int32_t *  buf,
int32_t  len,
int32_t *  offset,
int32_t  binc,
int32_t *  dst,
int32_t *  dbase,
int32_t  dlen,
int32_t  dinc,
uint32_t  size 
)
inlinestatic

◆ tpt_cirread_q15()

static void tpt_cirread_q15 ( q15_t buf,
int32_t  len,
int32_t *  offset,
int32_t  binc,
q15_t dst,
q15_t dbase,
int32_t  dlen,
int32_t  dinc,
uint32_t  size 
)
inlinestatic

◆ tpt_cirread_q7()

static void tpt_cirread_q7 ( q7_t buf,
int32_t  len,
int32_t *  offset,
int32_t  binc,
q7_t dst,
q7_t dbase,
int32_t  dlen,
int32_t  dinc,
uint32_t  size 
)
inlinestatic

◆ tpt_cirwrite_f32()

static void tpt_cirwrite_f32 ( int32_t *  buf,
int32_t  len,
uint16_t *  offset,
int32_t  binc,
const int32_t *  src,
int32_t  sinc,
uint32_t  size 
)
inlinestatic

◆ tpt_cirwrite_q15()

static void tpt_cirwrite_q15 ( q15_t buf,
int32_t  len,
uint16_t *  offset,
int32_t  binc,
const q15_t src,
int32_t  sinc,
uint32_t  size 
)
inlinestatic

◆ tpt_cirwrite_q7()

static void tpt_cirwrite_q7 ( q7_t buf,
int32_t  len,
uint16_t *  offset,
int32_t  binc,
const q7_t src,
int32_t  sinc,
uint32_t  size 
)
inlinestatic

◆ TPT_KSUBH()

static q15_t TPT_KSUBH ( q15_t  x,
q15_t  y 
)
inlinestatic

◆ TPT_KSUBW()

static q31_t TPT_KSUBW ( q31_t  x,
q31_t  y 
)
inlinestatic

◆ TPT_SVS()

static uint32_t TPT_SVS ( q31_t  x,
q31_t  y 
)
inlinestatic

Variable Documentation

◆ CONST_1

const f32_t CONST_1 = 1.f
static

◆ CONST_MAX_SIGMOID

const f32_t CONST_MAX_SIGMOID = 10.f
static

◆ CONST_MIN_SIGMOID

const f32_t CONST_MIN_SIGMOID = -10.f
static