Skip to main content
欢迎来到PAWPAW技术文档网站了解更多信息

Scalar API快速访问链接

标量类型转换

函数输入类型输出类型
f32_unpack()floatint32_texponent_t
f32_unpack_s16()floatint16_texponent_t
f32_to_float_s32()floatfloat_s32_t
f64_to_float_s32()doublefloat_s32_t
float_s32_to_float_s64()float_s32_tfloat_s64_t
float_s32_to_float()float_s32_tfloat
float_s32_to_double()float_s32_tdouble
s16_to_s32()int16_texponent_tint32_texponent_t
s32_to_s16()int32_texponent_tint16_texponent_t
s64_to_s32()int64_texponent_tint32_texponent_t
s32_to_f32()int32_texponent_tfloat
radians_to_sbrads()radian_q24_tsbrad_t
s32_to_chunk_s32()int32_tint32_t[8]
float_s64_to_float_s32()float_s64_tfloat_s32_t

定点标量运算

函数输入深度小数位数简介
s16_inverse()160x1x^{-1}
s32_inverse()320x1x^{-1}
sbrad_sin()3231sin(x)\sin(x)
sbrad_tan()3231tan(x)\tan(x)
q24_sin()3224sin(x)\sin(x)
q24_cos()3224cos(x)\cos(x)
q24_tan()3224tan(x)\tan(x)
q30_exp_small()3230exp(x)\exp(x)
q24_logistic()322411+ex\frac{1}{1+e^{-x}}
q24_logistic_fast()322411+ex\frac{1}{1+e^{-x}}
q30_powers()3230(0,x,x2,x3,)(0,x,x^2,x^3,\dots)
u32_ceil_log2()320log2(x)\lceil\log_2(x)\rceil

IEEE 754 标准浮点标量运算

函数简介
f32_sin()sin(x)sin(x)
f32_cos()cos(x)cos(x)
f32_log2()log2(x)log_2(x)
f32_power_series()Evaluate Power Series
f32_normA()Normalized Form A

非标准浮点标量运算(Non-standard Scalar Float Ops)

函数简介
float_s32_mul()x×yx \times y
float_s32_add()x+yx + y
float_s32_sub()xyx - y
float_s32_div()xy\frac{x}{y}
float_s32_abs()$\left
float_s32_gt()x>yx > y
float_s32_gte()xyx \ge y
float_s32_ema()αx+(1α)y\alpha x + (1 - \alpha) y
float_s32_sqrt()x\sqrt{x}
float_s32_exp()exp(x)exp(x)
s16_mul()x×yx \times y
s32_sqrt()x\sqrt{x}
s32_mul()x×yx \times y
s32_odd_powers()x,x3,x5,x7,x, x^3, x^5, x^7, \dots

非标准复数浮点标量运算(Non-standard Complex Scalar Float Ops)

函数简介
float_complex_s16_mul()x×yx \times y
float_complex_s16_add()x+yx + y
float_complex_s16_sub()xyx - y
float_complex_s32_mul()x×yx \times y
float_complex_s32_add()x+yx + y
float_complex_s32_sub()xyx - y