LIBML Version 4.1.9
LIBML NN Software Library
Loading...
Searching...
No Matches
tpt_nn_tanh_f32.c File Reference
#include "tpt_math_nn.h"
Include dependency graph for tpt_nn_tanh_f32.c:

Functions

static uint32_t TPT_ISA_SVA (q31_t x, q31_t y)
static q31_t TPT_ISA_KADDW (q31_t x, q31_t y)
static f32_t taylor_poly_f32 (f32_t x)
f32_t tpt_exp_f32 (f32_t x)
int32_t tpt_nn_tanh_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount)
 F32_t TANH function.

Variables

const f32_t CONST_COE0 = 1.f
const f32_t CONST_COE1 = 0.0416598916054f
const f32_t CONST_COE2 = 0.500000596046f
const f32_t CONST_COE3 = 0.0014122662833f
const f32_t CONST_COE4 = 1.00000011921f
const f32_t CONST_COE5 = 0.00833693705499f
const f32_t CONST_COE6 = 0.166665703058f
const f32_t CONST_COE7 = 0.000195780929062f
const f32_t CONST_LN2 = 0.6931471805f
const f32_t CONST_INV_LN2 = 1.4426950408f
const f32_t CONST_INF = INFINITY
const f32_t CONST_MAX_INPUT = 88.7f
const f32_t CONST_0 = 0.f
const int CONST_NEGATIVE_126 = -126
const f32_t CONST_MIN_TANH = -10.f
const f32_t CONST_MAX_TANH = 10.f
const f32_t CONST_THR = 5.e-3
const f32_t CONST_1_3 = 0.3333333f

Function Documentation

◆ taylor_poly_f32()

f32_t taylor_poly_f32 ( f32_t x)
inlinestatic

◆ tpt_exp_f32()

f32_t tpt_exp_f32 ( f32_t x)

◆ TPT_ISA_KADDW()

q31_t TPT_ISA_KADDW ( q31_t x,
q31_t y )
static

◆ TPT_ISA_SVA()

uint32_t TPT_ISA_SVA ( q31_t x,
q31_t y )
static

Variable Documentation

◆ CONST_0

const f32_t CONST_0 = 0.f

◆ CONST_COE0

const f32_t CONST_COE0 = 1.f

◆ CONST_COE1

const f32_t CONST_COE1 = 0.0416598916054f

◆ CONST_COE2

const f32_t CONST_COE2 = 0.500000596046f

◆ CONST_COE3

const f32_t CONST_COE3 = 0.0014122662833f

◆ CONST_COE4

const f32_t CONST_COE4 = 1.00000011921f

◆ CONST_COE5

const f32_t CONST_COE5 = 0.00833693705499f

◆ CONST_COE6

const f32_t CONST_COE6 = 0.166665703058f

◆ CONST_COE7

const f32_t CONST_COE7 = 0.000195780929062f

◆ CONST_INF

const f32_t CONST_INF = INFINITY

◆ CONST_INV_LN2

const f32_t CONST_INV_LN2 = 1.4426950408f

◆ CONST_LN2

const f32_t CONST_LN2 = 0.6931471805f

◆ CONST_MAX_INPUT

const f32_t CONST_MAX_INPUT = 88.7f

◆ CONST_NEGATIVE_126

const int CONST_NEGATIVE_126 = -126